diff --git a/docs/dyn/discoveryengine_v1.html b/docs/dyn/discoveryengine_v1.html new file mode 100644 index 0000000000..03947fffd7 --- /dev/null +++ b/docs/dyn/discoveryengine_v1.html @@ -0,0 +1,111 @@ +
+ + +
+ projects()
+
Returns the projects Resource.
+ +
+ close()
Close httplib2 connections.
+ +Create a BatchHttpRequest object based on the discovery document.
+close()
+ Close httplib2 connections.+
new_batch_http_request()
+ Create a BatchHttpRequest object based on the discovery document. + + Args: + callback: callable, A callback to be called for each response, of the + form callback(id, response, exception). The first parameter is the + request id, and the second is the deserialized response object. The + third is an apiclient.errors.HttpError exception object if an HTTP + error occurred while processing the request, or None if no error + occurred. + + Returns: + A BatchHttpRequest object based on the discovery document. ++
+ locations()
+
Returns the locations Resource.
+ +
+ operations()
+
Returns the operations Resource.
+ +
+ close()
Close httplib2 connections.
+close()
+ Close httplib2 connections.+
+ operations()
+
Returns the operations Resource.
+ +
+ close()
Close httplib2 connections.
+close()
+ Close httplib2 connections.+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ create(parent, body=None, documentId=None, x__xgafv=None)
Creates a Document.
+ +Deletes a Document.
+ +Gets a Document.
+
+ import_(parent, body=None, x__xgafv=None)
Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.
+
+ list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Gets a list of Documents.
+ +Retrieves the next page of results.
+
+ patch(name, allowMissing=None, body=None, updateMask=None, x__xgafv=None)
Updates a Document.
+
+ purge(parent, body=None, x__xgafv=None)
Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.
+close()
+ Close httplib2 connections.+
create(parent, body=None, documentId=None, x__xgafv=None)
+ Creates a Document. + +Args: + parent: string, Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, +} + + documentId: string, Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, +}+
delete(name, x__xgafv=None)
+ Deletes a Document. + +Args: + name: string, Required. Full resource name of 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, 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. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # 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); } +}+
get(name, x__xgafv=None)
+ Gets a Document. + +Args: + name: string, Required. Full resource name of 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, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, +}+
import_(parent, body=None, x__xgafv=None)
+ Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated. + +Args: + parent: string, Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for Import methods. + "autoGenerateIds": True or False, # Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwise, documents without IDs fail to be imported. Supported data sources: * 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. + "bigquerySource": { # BigQuery source import data from. # BigQuery input source. + "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `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. + "datasetId": "A String", # Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters. + "gcsStagingDir": "A String", # 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. + "partitionDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. + "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. + "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. + }, + "projectId": "A String", # The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. + "tableId": "A String", # Required. The BigQuery table to copy the data from with a length limit of 1,024 characters. + }, + "bigtableSource": { # The Cloud Bigtable source for importing data. # Cloud Bigtable input source. + "bigtableOptions": { # The Bigtable Options object that contains information to support the import. # Required. Bigtable options that contains information needed when parsing data into typed structures. For example, column type annotations. + "families": { # 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. + "a_key": { # The column family of the Bigtable. + "columns": [ # 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 column of the Bigtable. + "encoding": "A String", # 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. + "fieldName": "A String", # 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. + "qualifier": "A String", # Required. Qualifier of the column. If it cannot be decoded with utf-8, use a base-64 encoded string instead. + "type": "A String", # 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`. + }, + ], + "encoding": "A String", # 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. + "fieldName": "A String", # The field name to use for this column family in the document. The name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the family name with best effort. However, due to different naming patterns, field name collisions could happen, where parsing behavior is undefined. + "type": "A String", # 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`. + }, + }, + "keyFieldName": "A String", # The field name used for saving row key value in the document. The name has to match the pattern `a-zA-Z0-9*`. + }, + "instanceId": "A String", # Required. The instance ID of the Cloud Bigtable that needs to be imported. + "projectId": "A String", # The project ID that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. + "tableId": "A String", # Required. The table ID of the Cloud Bigtable that needs to be imported. + }, + "cloudSqlSource": { # Cloud SQL source import data from. # Cloud SQL input source. + "databaseId": "A String", # Required. The Cloud SQL database to copy the data from with a length limit of 256 characters. + "gcsStagingDir": "A String", # 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. + "instanceId": "A String", # Required. The Cloud SQL instance to copy the data from with a length limit of 256 characters. + "offload": True or False, # Option for serverless export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/sql/pricing#serverless). + "projectId": "A String", # 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. + "tableId": "A String", # Required. The Cloud SQL table to copy the data from with a length limit of 256 characters. + }, + "errorConfig": { # Configuration of destination for Import related errors. # The desired location of errors incurred during the Import. + "gcsPrefix": "A String", # 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. + }, + "fhirStoreSource": { # Cloud FhirStore source import data from. # FhirStore input source. + "fhirStore": "A String", # 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}`. + "gcsStagingDir": "A String", # 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. + }, + "firestoreSource": { # Firestore source import data from. # Firestore input source. + "collectionId": "A String", # Required. The Firestore collection to copy the data from with a length limit of 1,500 characters. + "databaseId": "A String", # Required. The Firestore database to copy the data from with a length limit of 256 characters. + "gcsStagingDir": "A String", # 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. + "projectId": "A String", # 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. + }, + "gcsSource": { # Cloud Storage location for input content. # Cloud Storage location for the input content. + "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must 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 even imports: * `user_event` (default): One JSON UserEvent per line. + "inputUris": [ # Required. Cloud Storage URIs to input files. 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 String", + ], + }, + "idField": "A String", # The field indicates the ID field or column to be used as unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. For others, it may be the column name of the table where the unique ids are stored. The values of the JSON field or the table column are used as the Document.ids. 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](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs fail to be imported. Only set this field when 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. 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. + "inlineSource": { # The inline source for the input config for ImportDocuments method. # The Inline source for the input content for documents. + "documents": [ # Required. A list of documents to update/create. Each document must have a valid Document.id. Recommended max of 100 items. + { # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + ], + }, + "reconciliationMode": "A String", # The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL. + "spannerSource": { # The Spanner source for importing data # Spanner input source. + "databaseId": "A String", # Required. The database ID of the source Spanner table. + "enableDataBoost": True or False, # Whether to apply data boost on Spanner export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + "instanceId": "A String", # Required. The instance ID of the source Spanner table. + "projectId": "A String", # The project ID that the Spanner source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. + "tableId": "A String", # Required. The table name of the Spanner database that needs to be imported. + }, + "updateMask": "A String", # Indicates which fields in the provided imported documents to update. If not set, the default is to update all fields. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
+ Gets a list of Documents. + +Args: + parent: string, 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 Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned. (required) + pageSize: integer, Maximum number of Documents 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. + pageToken: string, A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for DocumentService.ListDocuments method. + "documents": [ # The Documents. + { # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + ], + "nextPageToken": "A String", # A token that can be sent as ListDocumentsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, allowMissing=None, body=None, updateMask=None, x__xgafv=None)
+ Updates a Document. + +Args: + name: string, Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. (required) + body: object, The request body. + The object takes the form of: + +{ # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, +} + + allowMissing: boolean, If set to true, and the Document is not found, a new Document will be created. + updateMask: string, Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, +}+
purge(parent, body=None, x__xgafv=None)
+ Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false. + +Args: + parent: string, Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for DocumentService.PurgeDocuments method. + "filter": "A String", # Required. Filter matching documents to purge. Only currently supported value is `*` (all items). + "force": True or False, # Actually performs the purge. If `force` is set to false, return the expected purge count without deleting any documents. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ documents()
+
Returns the documents Resource.
+ +
+ operations()
+
Returns the operations Resource.
+ +
+ close()
Close httplib2 connections.
+close()
+ Close httplib2 connections.+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ converse(name, body=None, x__xgafv=None)
Converses a conversation.
+
+ create(parent, body=None, x__xgafv=None)
Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.
+ +Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.
+ +Gets a Conversation.
+
+ list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all Conversations by their parent DataStore.
+ +Retrieves the next page of results.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.
+close()
+ Close httplib2 connections.+
converse(name, body=None, x__xgafv=None)
+ Converses a conversation. + +Args: + name: string, 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. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for ConversationalSearchService.ConverseConversation method. + "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + "conditionBoostSpecs": [ # 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. + { # Boost applies to documents which match a condition. + "boost": 3.14, # 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. + "condition": "A String", # 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"))` + }, + ], + }, + "conversation": { # External conversation proto definition. # 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. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. + }, + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the summary response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + "query": { # Defines text input. # Required. Current user input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + "safeSearch": True or False, # Whether to turn on safe search. + "servingConfig": "A String", # 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. + "summarySpec": { # A specification for configuring a summary returned in a search response. # A specification for configuring the summary returned in the response. + "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead. + "ignoreNonSummarySeekingQuery": True or False, # 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. + "includeCitations": True or 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. 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. + "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature. + "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM. + "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide. + }, + "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM. + "version": "A String", # The model version used to generate the summary. 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](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + }, + "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + "useSemanticChunks": True or False, # 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. + }, + "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + "a_key": "A String", + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for ConversationalSearchService.ConverseConversation method. + "conversation": { # External conversation proto definition. # Updated conversation including the answer. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. + }, + "reply": { # Defines a reply message to user. # Answer to the current query. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "searchResults": [ # Search Results. + { # Represents the search results. + "document": { # Document captures all raw metadata information of items to be recommended or searched. # The document data snippet in the search response. Only fields that are marked as retrievable are populated. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + "id": "A String", # Document.id of the searched Document. + }, + ], +}+
create(parent, body=None, x__xgafv=None)
+ Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned. + +Args: + parent: string, Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` (required) + body: object, The request body. + The object takes the form of: + +{ # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +}+
delete(name, x__xgafv=None)
+ Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned. + +Args: + name: string, 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}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # 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); } +}+
get(name, x__xgafv=None)
+ Gets a Conversation. + +Args: + name: string, 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}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +}+
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists all Conversations by their parent DataStore. + +Args: + parent: string, Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` (required) + filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" + orderBy: string, 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` Example: "update_time desc" "create_time" + pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. + pageToken: string, A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response for ListConversations method. + "conversations": [ # All the Conversations for a given data store. + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. + }, + ], + "nextPageToken": "A String", # Pagination token, if not returned indicates the last page. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, updateMask=None, x__xgafv=None)
+ Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned. + +Args: + name: string, Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. (required) + body: object, The request body. + The object takes the form of: + +{ # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +} + + updateMask: string, Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +}+
+ branches()
+
Returns the branches Resource.
+ +
+ conversations()
+
Returns the conversations Resource.
+ +
+ models()
+
Returns the models Resource.
+ +
+ operations()
+
Returns the operations Resource.
+ +
+ schemas()
+
Returns the schemas Resource.
+ +
+ servingConfigs()
+
Returns the servingConfigs Resource.
+ + +Returns the siteSearchEngine Resource.
+ +
+ suggestionDenyListEntries()
+
Returns the suggestionDenyListEntries Resource.
+ +
+ userEvents()
+
Returns the userEvents Resource.
+ +
+ close()
Close httplib2 connections.
+ +Completes the specified user input with keyword suggestions.
+
+ create(parent, body=None, createAdvancedSiteSearch=None, dataStoreId=None, x__xgafv=None)
Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.
+ +Deletes a DataStore.
+ +Gets a DataStore.
+
+ getSiteSearchEngine(name, x__xgafv=None)
Gets the SiteSearchEngine.
+
+ list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all the DataStores associated with the project.
+ +Retrieves the next page of results.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a DataStore
+close()
+ Close httplib2 connections.+
completeQuery(dataStore, includeTailSuggestions=None, query=None, queryModel=None, userPseudoId=None, x__xgafv=None)
+ Completes the specified user input with keyword suggestions. + +Args: + dataStore: string, 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`. (required) + includeTailSuggestions: boolean, 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. + query: string, Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. + queryModel: string, 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. + userPseudoId: string, 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 and 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. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for CompletionService.CompleteQuery method. + "querySuggestions": [ # Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion. + { # Suggestions as search queries. + "completableFieldPaths": [ # 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. + "A String", + ], + "suggestion": "A String", # The suggestion for the query. + }, + ], + "tailMatchTriggered": True or False, # 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. +}+
create(parent, body=None, createAdvancedSiteSearch=None, dataStoreId=None, x__xgafv=None)
+ Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately. + +Args: + parent: string, Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`. (required) + body: object, The request body. + The object takes the form of: + +{ # DataStore captures global settings and configs at the DataStore level. + "contentConfig": "A String", # Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + "createTime": "A String", # Output only. Timestamp the DataStore was created at. + "defaultSchemaId": "A String", # Output only. The id of the default Schema asscociated to this data store. + "displayName": "A String", # Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + "documentProcessingConfig": { # A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. # Configuration for Document understanding and enrichment. + "defaultParsingConfig": { # Related configurations applied to a specific type of document parser. # 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. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + "name": "A String", # The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + "parsingConfigOverrides": { # 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 or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + "a_key": { # Related configurations applied to a specific type of document parser. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + }, + }, + "industryVertical": "A String", # Immutable. The industry vertical that the data store registers. + "name": "A String", # Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "solutionTypes": [ # The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + "A String", + ], + "startingSchema": { # Defines the structure and layout of a type of document data. # The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, +} + + createAdvancedSiteSearch: boolean, 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. + dataStoreId: string, Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
delete(name, x__xgafv=None)
+ Deletes a DataStore. + +Args: + name: string, Required. Full resource name of 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, 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. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
get(name, x__xgafv=None)
+ Gets a DataStore. + +Args: + name: string, Required. Full resource name of 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, 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. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # DataStore captures global settings and configs at the DataStore level. + "contentConfig": "A String", # Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + "createTime": "A String", # Output only. Timestamp the DataStore was created at. + "defaultSchemaId": "A String", # Output only. The id of the default Schema asscociated to this data store. + "displayName": "A String", # Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + "documentProcessingConfig": { # A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. # Configuration for Document understanding and enrichment. + "defaultParsingConfig": { # Related configurations applied to a specific type of document parser. # 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. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + "name": "A String", # The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + "parsingConfigOverrides": { # 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 or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + "a_key": { # Related configurations applied to a specific type of document parser. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + }, + }, + "industryVertical": "A String", # Immutable. The industry vertical that the data store registers. + "name": "A String", # Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "solutionTypes": [ # The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + "A String", + ], + "startingSchema": { # Defines the structure and layout of a type of document data. # The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, +}+
getSiteSearchEngine(name, x__xgafv=None)
+ Gets the SiteSearchEngine. + +Args: + name: string, Required. Resource name of 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. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # SiteSearchEngine captures DataStore level site search persisting configurations. It is a singleton value per data store. + "name": "A String", # The fully qualified resource name of the site search engine. Format: `projects/*/locations/*/dataStores/*/siteSearchEngine` +}+
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists all the DataStores associated with the project. + +Args: + parent: string, Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned. (required) + filter: string, Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' + pageSize: integer, Maximum number of DataStores 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. + pageToken: string, A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for DataStoreService.ListDataStores method. + "dataStores": [ # All the customer's DataStores. + { # DataStore captures global settings and configs at the DataStore level. + "contentConfig": "A String", # Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + "createTime": "A String", # Output only. Timestamp the DataStore was created at. + "defaultSchemaId": "A String", # Output only. The id of the default Schema asscociated to this data store. + "displayName": "A String", # Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + "documentProcessingConfig": { # A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. # Configuration for Document understanding and enrichment. + "defaultParsingConfig": { # Related configurations applied to a specific type of document parser. # 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. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + "name": "A String", # The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + "parsingConfigOverrides": { # 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 or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + "a_key": { # Related configurations applied to a specific type of document parser. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + }, + }, + "industryVertical": "A String", # Immutable. The industry vertical that the data store registers. + "name": "A String", # Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "solutionTypes": [ # The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + "A String", + ], + "startingSchema": { # Defines the structure and layout of a type of document data. # The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, + }, + ], + "nextPageToken": "A String", # A token that can be sent as ListDataStoresRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, updateMask=None, x__xgafv=None)
+ Updates a DataStore + +Args: + name: string, Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. (required) + body: object, The request body. + The object takes the form of: + +{ # DataStore captures global settings and configs at the DataStore level. + "contentConfig": "A String", # Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + "createTime": "A String", # Output only. Timestamp the DataStore was created at. + "defaultSchemaId": "A String", # Output only. The id of the default Schema asscociated to this data store. + "displayName": "A String", # Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + "documentProcessingConfig": { # A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. # Configuration for Document understanding and enrichment. + "defaultParsingConfig": { # Related configurations applied to a specific type of document parser. # 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. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + "name": "A String", # The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + "parsingConfigOverrides": { # 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 or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + "a_key": { # Related configurations applied to a specific type of document parser. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + }, + }, + "industryVertical": "A String", # Immutable. The industry vertical that the data store registers. + "name": "A String", # Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "solutionTypes": [ # The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + "A String", + ], + "startingSchema": { # Defines the structure and layout of a type of document data. # The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, +} + + updateMask: string, Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # DataStore captures global settings and configs at the DataStore level. + "contentConfig": "A String", # Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + "createTime": "A String", # Output only. Timestamp the DataStore was created at. + "defaultSchemaId": "A String", # Output only. The id of the default Schema asscociated to this data store. + "displayName": "A String", # Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + "documentProcessingConfig": { # A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. # Configuration for Document understanding and enrichment. + "defaultParsingConfig": { # Related configurations applied to a specific type of document parser. # 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. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + "name": "A String", # The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + "parsingConfigOverrides": { # 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 or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + "a_key": { # Related configurations applied to a specific type of document parser. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + }, + }, + "industryVertical": "A String", # Immutable. The industry vertical that the data store registers. + "name": "A String", # Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "solutionTypes": [ # The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + "A String", + ], + "startingSchema": { # Defines the structure and layout of a type of document data. # The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, +}+
+ operations()
+
Returns the operations Resource.
+ +
+ close()
Close httplib2 connections.
+close()
+ Close httplib2 connections.+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ operations()
+
Returns the operations Resource.
+ +
+ close()
Close httplib2 connections.
+
+ create(parent, body=None, schemaId=None, x__xgafv=None)
Creates a Schema.
+ +Deletes a Schema.
+ +Gets a Schema.
+
+ list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Gets a list of Schemas.
+ +Retrieves the next page of results.
+
+ patch(name, allowMissing=None, body=None, x__xgafv=None)
Updates a Schema.
+close()
+ Close httplib2 connections.+
create(parent, body=None, schemaId=None, x__xgafv=None)
+ Creates a Schema. + +Args: + parent: string, Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Defines the structure and layout of a type of document data. + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, +} + + schemaId: string, Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
delete(name, x__xgafv=None)
+ Deletes a Schema. + +Args: + name: string, Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
get(name, x__xgafv=None)
+ Gets a Schema. + +Args: + name: string, Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Defines the structure and layout of a type of document data. + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, +}+
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
+ Gets a list of Schemas. + +Args: + parent: string, Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required) + pageSize: integer, The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + pageToken: string, A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for SchemaService.ListSchemas method. + "nextPageToken": "A String", # A token that can be sent as ListSchemasRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. + "schemas": [ # The Schemas. + { # Defines the structure and layout of a type of document data. + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, allowMissing=None, body=None, x__xgafv=None)
+ Updates a Schema. + +Args: + name: string, Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. (required) + body: object, The request body. + The object takes the form of: + +{ # Defines the structure and layout of a type of document data. + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, +} + + allowMissing: boolean, If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ recommend(servingConfig, body=None, x__xgafv=None)
Makes a recommendation, which requires a contextual user event.
+
+ search(servingConfig, body=None, x__xgafv=None)
Performs a search.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
recommend(servingConfig, body=None, x__xgafv=None)
+ Makes a recommendation, which requires a contextual user event. + +Args: + servingConfig: string, Required. Full resource name of a 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 will be 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 requests. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for Recommend method. + "filter": "A String", # Filter for restricting recommendation results with a length limit of 5,000 characters. Currently, only filter expressions on the `filter_tags` attribute is supported. Examples: * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` If `attributeFilteringSyntax` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) If your filter blocks all results, the API will return 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 will never return Documents with `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. + "pageSize": 42, # Maximum number of results to return. Set this property to the number of recommendation results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100. + "params": { # Additional domain specific parameters for the recommendations. Allowed values: * `returnDocument`: Boolean. If set to true, the associated Document object will be returned in RecommendResponse.RecommendationResult.document. * `returnScore`: Boolean. If set to true, the recommendation 'score' corresponding to each returned Document will be 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 will return 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. + "a_key": "", + }, + "userEvent": { # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. # Required. Context about the user, what they are looking at and what action they took to trigger the Recommend request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.user_pseudo_id to a random unique ID and leave UserEvent.user_info.user_id unset. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. + }, + "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + "a_key": "A String", + }, + "validateOnly": True or False, # Use validate only mode for this recommendation query. If set to true, a fake model will be 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. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for Recommend method. + "attributionToken": "A String", # A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance. + "missingIds": [ # IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig. + "A String", + ], + "results": [ # A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least). + { # RecommendationResult represents a generic recommendation result with associated metadata. + "document": { # Document captures all raw metadata information of items to be recommended or searched. # Set if `returnDocument` is set to true in RecommendRequest.params. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + "id": "A String", # Resource ID of the recommended Document. + "metadata": { # Additional Document metadata / annotations. Possible values: * `score`: Recommendation score in double value. Is set if `returnScore` is set to true in RecommendRequest.params. + "a_key": "", + }, + }, + ], + "validateOnly": True or False, # True if RecommendRequest.validate_only was set. +}+
search(servingConfig, body=None, x__xgafv=None)
+ Performs a search. + +Args: + servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SearchService.Search method. + "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + "conditionBoostSpecs": [ # 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. + { # Boost applies to documents which match a condition. + "boost": 3.14, # 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. + "condition": "A String", # 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"))` + }, + ], + }, + "branch": "A String", # 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. + "canonicalFilter": "A String", # The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter. + "contentSearchSpec": { # A specification for configuring the behavior of content search. # A specification for configuring the behavior of content search. + "extractiveContentSpec": { # A specification for configuring the extractive content in a search response. # If there is no extractive_content_spec provided, there will be no extractive answer in the search response. + "maxExtractiveAnswerCount": 42, # 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. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult. + "maxExtractiveSegmentCount": 42, # The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is 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. 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`. + "numNextSegments": 42, # Return at most `num_next_segments` segments after each selected segments. + "numPreviousSegments": 42, # Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments. + "returnExtractiveSegmentScore": True or 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`. + }, + "snippetSpec": { # A specification for configuring snippets in a search response. # If `snippetSpec` is not specified, snippets are not included in the search response. + "maxSnippetCount": 42, # [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. + "referenceOnly": True or False, # [DEPRECATED] This field is deprecated and will have no affect on the snippet. + "returnSnippet": True or False, # If `true`, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + }, + "summarySpec": { # A specification for configuring a summary returned in a search response. # If `summarySpec` is not specified, summaries are not included in the search response. + "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead. + "ignoreNonSummarySeekingQuery": True or False, # 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. + "includeCitations": True or 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. 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. + "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature. + "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM. + "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide. + }, + "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM. + "version": "A String", # The model version used to generate the summary. 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](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + }, + "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + "useSemanticChunks": True or False, # 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. + }, + }, + "dataStoreSpecs": [ # A list of data store specs to apply on a search call. + { # A struct to define data stores to filter on in a search call. + "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. + }, + ], + "facetSpecs": [ # 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. + { # A facet specification to perform faceted search. + "enableDynamicPosition": True or False, # Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined automatically. If dynamic facets are enabled, it is ordered together. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined automatically. Another example, assuming you have the following facets in the request: * "rating", enable_dynamic_position = true * "price", enable_dynamic_position = false * "brands", enable_dynamic_position = false And also you have a dynamic facets enabled, which generates a facet `gender`. Then the final order of the facets in the response can be ("price", "brands", "rating", "gender") or ("price", "brands", "gender", "rating") depends on how API orders "gender" and "rating" facets. However, notice that "price" and "brands" are always ranked at first and second position because their enable_dynamic_position is false. + "excludedFilterKeys": [ # List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 documents with the color facet "Red" and 200 documents with the color facet "Blue". A query containing the filter "color:ANY("Red")" and having "color" as FacetKey.key 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. + "A String", + ], + "facetKey": { # Specifies how a facet is computed. # Required. The facet key specification. + "caseInsensitive": True or False, # True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise. + "contains": [ # Only get facet values that contains 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. + "A String", + ], + "intervals": [ # 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. + { # A floating point interval. + "exclusiveMaximum": 3.14, # Exclusive upper bound. + "exclusiveMinimum": 3.14, # Exclusive lower bound. + "maximum": 3.14, # Inclusive upper bound. + "minimum": 3.14, # Inclusive lower bound. + }, + ], + "key": "A String", # Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive. + "orderBy": "A String", # The order in which documents are returned. Allowed values are: * "count desc", which means order by SearchResponse.Facet.values.count descending. * "value desc", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals. + "prefixes": [ # 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. + "A String", + ], + "restrictedValues": [ # 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. + "A String", + ], + }, + "limit": 42, # Maximum of facet values that should be returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 are coerced to 300. If this field is negative, an `INVALID_ARGUMENT` is returned. + }, + ], + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + "imageQuery": { # Specifies the image query input. # Raw image query. + "imageBytes": "A String", # Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP. + }, + "offset": 42, # A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned. + "orderBy": "A String", # 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](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + "pageSize": 42, # Maximum number of Documents 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. + "pageToken": "A String", # A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + "params": { # 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. Example: user_country_code: "au" For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `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. Example: search_type: 1 + "a_key": "", + }, + "query": "A String", # Raw search query. + "queryExpansionSpec": { # Specification to determine under which conditions query expansion should occur. # The query expansion specification that specifies the conditions under which query expansion occurs. + "condition": "A String", # The condition under which query expansion should occur. Default to Condition.DISABLED. + "pinUnexpandedResults": True or False, # 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. + }, + "safeSearch": True or False, # Whether to turn on safe search. This is only supported for website search. + "spellCorrectionSpec": { # The specification for query spell correction. # The spell correction specification that specifies the mode under which spell correction takes effect. + "mode": "A String", # The mode under which spell correction should take effect to replace the original search query. Default to Mode.AUTO. + }, + "userInfo": { # Information of an end user. # Information about the end user. Highly recommended for analytics. UserInfo.user_agent is used to deduce `device_type` for analytics. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + "a_key": "A String", + }, + "userPseudoId": "A String", # 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 and 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. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for SearchService.Search method. + "attributionToken": "A String", # A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. + "correctedQuery": "A String", # 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. + "facets": [ # Results of facets requested by user. + { # A facet result. + "dynamicFacet": True or False, # Whether the facet is dynamically generated. + "key": "A String", # The key for this facet. E.g., "colors" or "price". It matches SearchRequest.FacetSpec.FacetKey.key. + "values": [ # The facet values for this field. + { # A facet value which contains value names and their count. + "count": "A String", # Number of items that have this facet value. + "interval": { # A floating point interval. # Interval value for a facet, such as 10, 20) for facet "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals. + "exclusiveMaximum": 3.14, # Exclusive upper bound. + "exclusiveMinimum": 3.14, # Exclusive lower bound. + "maximum": 3.14, # Inclusive upper bound. + "minimum": 3.14, # Inclusive lower bound. + }, + "value": "A String", # Text value of a facet, such as "Black" for facet "colors". + }, + ], + }, + ], + "nextPageToken": "A String", # A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. + "queryExpansionInfo": { # Information describing query expansion including whether expansion has occurred. # Query expansion information for the returned results. + "expandedQuery": True or False, # Bool describing whether query expansion has occurred. + "pinnedResultCount": "A String", # Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true. + }, + "redirectUri": "A String", # The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response. + "results": [ # A list of matched documents. The order represents the ranking. + { # Represents the search results. + "document": { # Document captures all raw metadata information of items to be recommended or searched. # The document data snippet in the search response. Only fields that are marked as retrievable are populated. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + "id": "A String", # Document.id of the searched Document. + }, + ], + "summary": { # Summary of the top N search result specified by the summary spec. # A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + "totalSize": 42, # The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches. +}+
search_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ operations()
+
Returns the operations Resource.
+ +
+ targetSites()
+
Returns the targetSites Resource.
+ +
+ batchVerifyTargetSites(parent, body=None, x__xgafv=None)
Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.
+
+ close()
Close httplib2 connections.
+
+ disableAdvancedSiteSearch(siteSearchEngine, body=None, x__xgafv=None)
Downgrade from advanced site search to basic site search.
+
+ enableAdvancedSiteSearch(siteSearchEngine, body=None, x__xgafv=None)
Upgrade from basic site search to advanced site search.
+
+ fetchDomainVerificationStatus(siteSearchEngine, pageSize=None, pageToken=None, x__xgafv=None)
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.
+
+ fetchDomainVerificationStatus_next()
Retrieves the next page of results.
+
+ recrawlUris(siteSearchEngine, body=None, x__xgafv=None)
Request on-demand recrawl for a list of URIs.
+batchVerifyTargetSites(parent, body=None, x__xgafv=None)
+ Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification. + +Args: + parent: string, Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SiteSearchEngineService.BatchVerifyTargetSites method. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
close()
+ Close httplib2 connections.+
disableAdvancedSiteSearch(siteSearchEngine, body=None, x__xgafv=None)
+ Downgrade from advanced site search to basic site search. + +Args: + siteSearchEngine: string, Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SiteSearchEngineService.DisableAdvancedSiteSearch method. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
enableAdvancedSiteSearch(siteSearchEngine, body=None, x__xgafv=None)
+ Upgrade from basic site search to advanced site search. + +Args: + siteSearchEngine: string, Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SiteSearchEngineService.EnableAdvancedSiteSearch method. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
fetchDomainVerificationStatus(siteSearchEngine, pageSize=None, pageToken=None, x__xgafv=None)
+ 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. + +Args: + siteSearchEngine: string, Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. (required) + pageSize: integer, Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned. + pageToken: string, A page token, received from a previous `FetchDomainVerificationStatus` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchDomainVerificationStatus` must match the call that provided the page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for SiteSearchEngineService.FetchDomainVerificationStatus method. + "nextPageToken": "A String", # A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + "targetSites": [ # List of TargetSites containing the site verification status. + { # A target site for the SiteSearchEngine. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. + }, + ], + "totalSize": 42, # The total number of items matching the request. This will always be populated in the response. +}+
fetchDomainVerificationStatus_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
recrawlUris(siteSearchEngine, body=None, x__xgafv=None)
+ Request on-demand recrawl for a list of URIs. + +Args: + siteSearchEngine: string, Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SiteSearchEngineService.RecrawlUris method. + "uris": [ # Required. List of URIs to crawl. At most 10K URIs are supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at least one TargetSite in `site_search_engine`. + "A String", + ], +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ operations()
+
Returns the operations Resource.
+ +
+ batchCreate(parent, body=None, x__xgafv=None)
Creates TargetSite in a batch.
+
+ close()
Close httplib2 connections.
+
+ create(parent, body=None, x__xgafv=None)
Creates a TargetSite.
+ +Deletes a TargetSite.
+ +Gets a TargetSite.
+
+ list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Gets a list of TargetSites.
+ +Retrieves the next page of results.
+
+ patch(name, body=None, x__xgafv=None)
Updates a TargetSite.
+batchCreate(parent, body=None, x__xgafv=None)
+ Creates TargetSite in a batch. + +Args: + parent: string, Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SiteSearchEngineService.BatchCreateTargetSites method. + "requests": [ # Required. The request message specifying the resources to create. A maximum of 20 TargetSites can be created in a batch. + { # Request message for SiteSearchEngineService.CreateTargetSite method. + "parent": "A String", # Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. + "targetSite": { # A target site for the SiteSearchEngine. # Required. The TargetSite to create. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. + }, + }, + ], +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
close()
+ Close httplib2 connections.+
create(parent, body=None, x__xgafv=None)
+ Creates a TargetSite. + +Args: + parent: string, Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. (required) + body: object, The request body. + The object takes the form of: + +{ # A target site for the SiteSearchEngine. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
delete(name, x__xgafv=None)
+ Deletes a TargetSite. + +Args: + name: string, Required. Full resource name of 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, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
get(name, x__xgafv=None)
+ Gets a TargetSite. + +Args: + name: string, Required. Full resource name of 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, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A target site for the SiteSearchEngine. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. +}+
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
+ Gets a list of TargetSites. + +Args: + parent: string, 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 TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. (required) + pageSize: integer, Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned. + pageToken: string, 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. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for SiteSearchEngineService.ListTargetSites method. + "nextPageToken": "A String", # A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + "targetSites": [ # List of TargetSites. + { # A target site for the SiteSearchEngine. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. + }, + ], + "totalSize": 42, # The total number of items matching the request. This will always be populated in the response. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, x__xgafv=None)
+ Updates a TargetSite. + +Args: + name: string, 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. (required) + body: object, The request body. + The object takes the form of: + +{ # A target site for the SiteSearchEngine. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ import_(parent, body=None, x__xgafv=None)
Imports all SuggestionDenyListEntry for a DataStore.
+
+ purge(parent, body=None, x__xgafv=None)
Permanently deletes all SuggestionDenyListEntry for a DataStore.
+close()
+ Close httplib2 connections.+
import_(parent, body=None, x__xgafv=None)
+ Imports all SuggestionDenyListEntry for a DataStore. + +Args: + parent: string, Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for CompletionService.ImportSuggestionDenyListEntries method. + "gcsSource": { # Cloud Storage location for input content. # Cloud Storage location for the input content. Only 1 file can be specified that contains all entries to import. Supported values `gcs_source.schema` for autocomplete suggestion deny list entry imports: * `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] per line. + "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must 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 even imports: * `user_event` (default): One JSON UserEvent per line. + "inputUris": [ # Required. Cloud Storage URIs to input files. 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 String", + ], + }, + "inlineSource": { # The inline source for SuggestionDenyListEntry. # The Inline source for the input content for suggestion deny list entries. + "entries": [ # Required. A list of all denylist entries to import. Max of 1000 items. + { # Suggestion deny list entry identifying the phrase to block from suggestions and the applied operation for the phrase. + "blockPhrase": "A String", # Required. Phrase to block from suggestions served. Can be maximum 125 characters. + "matchOperator": "A String", # Required. The match operator to apply for this phrase. Whether to block the exact phrase, or block any suggestions containing this phrase. + }, + ], + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
purge(parent, body=None, x__xgafv=None)
+ Permanently deletes all SuggestionDenyListEntry for a DataStore. + +Args: + parent: string, Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for CompletionService.PurgeSuggestionDenyListEntries method. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ close()
Close httplib2 connections.
+
+ collect(parent, ets=None, uri=None, userEvent=None, x__xgafv=None)
Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
+
+ import_(parent, body=None, x__xgafv=None)
Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.
+
+ write(parent, body=None, x__xgafv=None)
Writes a single user event.
+close()
+ Close httplib2 connections.+
collect(parent, ets=None, uri=None, userEvent=None, x__xgafv=None)
+ Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly. + +Args: + parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required) + ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes. + uri: string, 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. + userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # 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. + "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. + "data": "A String", # The HTTP request/response body as raw binary. + "extensions": [ # Application specific response metadata. Must be set in the first response for streaming APIs. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], +}+
import_(parent, body=None, x__xgafv=None)
+ Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata. + +Args: + parent: string, Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for the ImportUserEvents request. + "bigquerySource": { # BigQuery source import data from. # BigQuery input source. + "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `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. + "datasetId": "A String", # Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters. + "gcsStagingDir": "A String", # 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. + "partitionDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. + "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. + "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. + }, + "projectId": "A String", # The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. + "tableId": "A String", # Required. The BigQuery table to copy the data from with a length limit of 1,024 characters. + }, + "errorConfig": { # Configuration of destination for Import related errors. # The desired location of errors incurred during the Import. Cannot be set for inline user event imports. + "gcsPrefix": "A String", # 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. + }, + "gcsSource": { # Cloud Storage location for input content. # Cloud Storage location for the input content. + "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must 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 even imports: * `user_event` (default): One JSON UserEvent per line. + "inputUris": [ # Required. Cloud Storage URIs to input files. 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 String", + ], + }, + "inlineSource": { # The inline source for the input config for ImportUserEvents method. # The Inline source for the input content for UserEvents. + "userEvents": [ # Required. A list of user events to import. Recommended max of 10k items. + { # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. + }, + ], + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
write(parent, body=None, x__xgafv=None)
+ Writes a single user event. + +Args: + parent: string, 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 across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required) + body: object, The request body. + The object takes the form of: + +{ # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. +}+
+ close()
Close httplib2 connections.
+
+ converse(name, body=None, x__xgafv=None)
Converses a conversation.
+
+ create(parent, body=None, x__xgafv=None)
Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.
+ +Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.
+ +Gets a Conversation.
+
+ list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all Conversations by their parent DataStore.
+ +Retrieves the next page of results.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.
+close()
+ Close httplib2 connections.+
converse(name, body=None, x__xgafv=None)
+ Converses a conversation. + +Args: + name: string, 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. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for ConversationalSearchService.ConverseConversation method. + "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + "conditionBoostSpecs": [ # 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. + { # Boost applies to documents which match a condition. + "boost": 3.14, # 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. + "condition": "A String", # 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"))` + }, + ], + }, + "conversation": { # External conversation proto definition. # 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. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. + }, + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the summary response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + "query": { # Defines text input. # Required. Current user input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + "safeSearch": True or False, # Whether to turn on safe search. + "servingConfig": "A String", # 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. + "summarySpec": { # A specification for configuring a summary returned in a search response. # A specification for configuring the summary returned in the response. + "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead. + "ignoreNonSummarySeekingQuery": True or False, # 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. + "includeCitations": True or 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. 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. + "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature. + "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM. + "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide. + }, + "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM. + "version": "A String", # The model version used to generate the summary. 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](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + }, + "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + "useSemanticChunks": True or False, # 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. + }, + "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + "a_key": "A String", + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for ConversationalSearchService.ConverseConversation method. + "conversation": { # External conversation proto definition. # Updated conversation including the answer. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. + }, + "reply": { # Defines a reply message to user. # Answer to the current query. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "searchResults": [ # Search Results. + { # Represents the search results. + "document": { # Document captures all raw metadata information of items to be recommended or searched. # The document data snippet in the search response. Only fields that are marked as retrievable are populated. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + "id": "A String", # Document.id of the searched Document. + }, + ], +}+
create(parent, body=None, x__xgafv=None)
+ Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned. + +Args: + parent: string, Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` (required) + body: object, The request body. + The object takes the form of: + +{ # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +}+
delete(name, x__xgafv=None)
+ Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned. + +Args: + name: string, 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}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # 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); } +}+
get(name, x__xgafv=None)
+ Gets a Conversation. + +Args: + name: string, 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}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +}+
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists all Conversations by their parent DataStore. + +Args: + parent: string, Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` (required) + filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" + orderBy: string, 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` Example: "update_time desc" "create_time" + pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. + pageToken: string, A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response for ListConversations method. + "conversations": [ # All the Conversations for a given data store. + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. + }, + ], + "nextPageToken": "A String", # Pagination token, if not returned indicates the last page. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, updateMask=None, x__xgafv=None)
+ Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned. + +Args: + name: string, Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. (required) + body: object, The request body. + The object takes the form of: + +{ # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +} + + updateMask: string, Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +}+
+ conversations()
+
Returns the conversations Resource.
+ +
+ operations()
+
Returns the operations Resource.
+ +
+ servingConfigs()
+
Returns the servingConfigs Resource.
+ +
+ close()
Close httplib2 connections.
+
+ create(parent, body=None, engineId=None, x__xgafv=None)
Creates a Engine.
+ +Deletes a Engine.
+ +Gets a Engine.
+
+ list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all the Engines associated with the project.
+ +Retrieves the next page of results.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an Engine
+close()
+ Close httplib2 connections.+
create(parent, body=None, engineId=None, x__xgafv=None)
+ Creates a Engine. + +Args: + parent: string, Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Metadata that describes the training and serving parameters of an Engine. + "chatEngineConfig": { # Configurations for a Chat Engine. # Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + "agentCreationConfig": { # 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 or EngineService.ListEngines API after engine creation. # The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. + "business": "A String", # Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search. + "defaultLanguageCode": "A String", # Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. + "location": "A String", # 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. + "timeZone": "A String", # Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. + }, + "dialogflowAgentToLink": "A String", # The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created. + }, + "chatEngineMetadata": { # Additional information of a Chat Engine. Fields in this message are output only. # Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + "dialogflowAgent": "A String", # The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`. + }, + "commonConfig": { # Common configurations for an Engine. # Common config spec that specifies the metadata of the engine. + "companyName": "A String", # Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features. + }, + "createTime": "A String", # Output only. Timestamp the Recommendation Engine was created at. + "dataStoreIds": [ # The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations. + "A String", + ], + "displayName": "A String", # Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. + "industryVertical": "A String", # 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 liniked to the engine. + "name": "A String", # Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + "searchEngineConfig": { # Configurations for a Search Engine. # Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH. + "searchAddOns": [ # The add-on that this search engine enables. + "A String", + ], + "searchTier": "A String", # The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified. + }, + "solutionType": "A String", # Required. The solutions of the engine. + "updateTime": "A String", # Output only. Timestamp the Recommendation Engine was last updated. +} + + engineId: string, Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
delete(name, x__xgafv=None)
+ Deletes a Engine. + +Args: + name: string, Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
get(name, x__xgafv=None)
+ Gets a Engine. + +Args: + name: string, Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Metadata that describes the training and serving parameters of an Engine. + "chatEngineConfig": { # Configurations for a Chat Engine. # Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + "agentCreationConfig": { # 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 or EngineService.ListEngines API after engine creation. # The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. + "business": "A String", # Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search. + "defaultLanguageCode": "A String", # Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. + "location": "A String", # 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. + "timeZone": "A String", # Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. + }, + "dialogflowAgentToLink": "A String", # The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created. + }, + "chatEngineMetadata": { # Additional information of a Chat Engine. Fields in this message are output only. # Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + "dialogflowAgent": "A String", # The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`. + }, + "commonConfig": { # Common configurations for an Engine. # Common config spec that specifies the metadata of the engine. + "companyName": "A String", # Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features. + }, + "createTime": "A String", # Output only. Timestamp the Recommendation Engine was created at. + "dataStoreIds": [ # The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations. + "A String", + ], + "displayName": "A String", # Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. + "industryVertical": "A String", # 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 liniked to the engine. + "name": "A String", # Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + "searchEngineConfig": { # Configurations for a Search Engine. # Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH. + "searchAddOns": [ # The add-on that this search engine enables. + "A String", + ], + "searchTier": "A String", # The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified. + }, + "solutionType": "A String", # Required. The solutions of the engine. + "updateTime": "A String", # Output only. Timestamp the Recommendation Engine was last updated. +}+
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists all the Engines associated with the project. + +Args: + parent: string, Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. (required) + filter: string, Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH + pageSize: integer, Optional. Not supported. + pageToken: string, Optional. Not supported. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for EngineService.ListEngines method. + "engines": [ # All the customer's Engines. + { # Metadata that describes the training and serving parameters of an Engine. + "chatEngineConfig": { # Configurations for a Chat Engine. # Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + "agentCreationConfig": { # 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 or EngineService.ListEngines API after engine creation. # The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. + "business": "A String", # Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search. + "defaultLanguageCode": "A String", # Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. + "location": "A String", # 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. + "timeZone": "A String", # Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. + }, + "dialogflowAgentToLink": "A String", # The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created. + }, + "chatEngineMetadata": { # Additional information of a Chat Engine. Fields in this message are output only. # Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + "dialogflowAgent": "A String", # The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`. + }, + "commonConfig": { # Common configurations for an Engine. # Common config spec that specifies the metadata of the engine. + "companyName": "A String", # Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features. + }, + "createTime": "A String", # Output only. Timestamp the Recommendation Engine was created at. + "dataStoreIds": [ # The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations. + "A String", + ], + "displayName": "A String", # Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. + "industryVertical": "A String", # 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 liniked to the engine. + "name": "A String", # Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + "searchEngineConfig": { # Configurations for a Search Engine. # Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH. + "searchAddOns": [ # The add-on that this search engine enables. + "A String", + ], + "searchTier": "A String", # The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified. + }, + "solutionType": "A String", # Required. The solutions of the engine. + "updateTime": "A String", # Output only. Timestamp the Recommendation Engine was last updated. + }, + ], + "nextPageToken": "A String", # Not supported. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, updateMask=None, x__xgafv=None)
+ Updates an Engine + +Args: + name: string, Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. (required) + body: object, The request body. + The object takes the form of: + +{ # Metadata that describes the training and serving parameters of an Engine. + "chatEngineConfig": { # Configurations for a Chat Engine. # Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + "agentCreationConfig": { # 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 or EngineService.ListEngines API after engine creation. # The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. + "business": "A String", # Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search. + "defaultLanguageCode": "A String", # Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. + "location": "A String", # 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. + "timeZone": "A String", # Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. + }, + "dialogflowAgentToLink": "A String", # The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created. + }, + "chatEngineMetadata": { # Additional information of a Chat Engine. Fields in this message are output only. # Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + "dialogflowAgent": "A String", # The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`. + }, + "commonConfig": { # Common configurations for an Engine. # Common config spec that specifies the metadata of the engine. + "companyName": "A String", # Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features. + }, + "createTime": "A String", # Output only. Timestamp the Recommendation Engine was created at. + "dataStoreIds": [ # The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations. + "A String", + ], + "displayName": "A String", # Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. + "industryVertical": "A String", # 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 liniked to the engine. + "name": "A String", # Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + "searchEngineConfig": { # Configurations for a Search Engine. # Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH. + "searchAddOns": [ # The add-on that this search engine enables. + "A String", + ], + "searchTier": "A String", # The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified. + }, + "solutionType": "A String", # Required. The solutions of the engine. + "updateTime": "A String", # Output only. Timestamp the Recommendation Engine was last updated. +} + + updateMask: string, Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Metadata that describes the training and serving parameters of an Engine. + "chatEngineConfig": { # Configurations for a Chat Engine. # Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + "agentCreationConfig": { # 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 or EngineService.ListEngines API after engine creation. # The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. + "business": "A String", # Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search. + "defaultLanguageCode": "A String", # Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. + "location": "A String", # 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. + "timeZone": "A String", # Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. + }, + "dialogflowAgentToLink": "A String", # The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created. + }, + "chatEngineMetadata": { # Additional information of a Chat Engine. Fields in this message are output only. # Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + "dialogflowAgent": "A String", # The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`. + }, + "commonConfig": { # Common configurations for an Engine. # Common config spec that specifies the metadata of the engine. + "companyName": "A String", # Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features. + }, + "createTime": "A String", # Output only. Timestamp the Recommendation Engine was created at. + "dataStoreIds": [ # The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations. + "A String", + ], + "displayName": "A String", # Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters. + "industryVertical": "A String", # 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 liniked to the engine. + "name": "A String", # Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + "searchEngineConfig": { # Configurations for a Search Engine. # Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH. + "searchAddOns": [ # The add-on that this search engine enables. + "A String", + ], + "searchTier": "A String", # The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified. + }, + "solutionType": "A String", # Required. The solutions of the engine. + "updateTime": "A String", # Output only. Timestamp the Recommendation Engine was last updated. +}+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ recommend(servingConfig, body=None, x__xgafv=None)
Makes a recommendation, which requires a contextual user event.
+
+ search(servingConfig, body=None, x__xgafv=None)
Performs a search.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
recommend(servingConfig, body=None, x__xgafv=None)
+ Makes a recommendation, which requires a contextual user event. + +Args: + servingConfig: string, Required. Full resource name of a 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 will be 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 requests. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for Recommend method. + "filter": "A String", # Filter for restricting recommendation results with a length limit of 5,000 characters. Currently, only filter expressions on the `filter_tags` attribute is supported. Examples: * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` If `attributeFilteringSyntax` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) If your filter blocks all results, the API will return 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 will never return Documents with `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. + "pageSize": 42, # Maximum number of results to return. Set this property to the number of recommendation results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100. + "params": { # Additional domain specific parameters for the recommendations. Allowed values: * `returnDocument`: Boolean. If set to true, the associated Document object will be returned in RecommendResponse.RecommendationResult.document. * `returnScore`: Boolean. If set to true, the recommendation 'score' corresponding to each returned Document will be 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 will return 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. + "a_key": "", + }, + "userEvent": { # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. # Required. Context about the user, what they are looking at and what action they took to trigger the Recommend request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.user_pseudo_id to a random unique ID and leave UserEvent.user_info.user_id unset. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. + }, + "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + "a_key": "A String", + }, + "validateOnly": True or False, # Use validate only mode for this recommendation query. If set to true, a fake model will be 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. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for Recommend method. + "attributionToken": "A String", # A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance. + "missingIds": [ # IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig. + "A String", + ], + "results": [ # A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least). + { # RecommendationResult represents a generic recommendation result with associated metadata. + "document": { # Document captures all raw metadata information of items to be recommended or searched. # Set if `returnDocument` is set to true in RecommendRequest.params. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + "id": "A String", # Resource ID of the recommended Document. + "metadata": { # Additional Document metadata / annotations. Possible values: * `score`: Recommendation score in double value. Is set if `returnScore` is set to true in RecommendRequest.params. + "a_key": "", + }, + }, + ], + "validateOnly": True or False, # True if RecommendRequest.validate_only was set. +}+
search(servingConfig, body=None, x__xgafv=None)
+ Performs a search. + +Args: + servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SearchService.Search method. + "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + "conditionBoostSpecs": [ # 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. + { # Boost applies to documents which match a condition. + "boost": 3.14, # 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. + "condition": "A String", # 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"))` + }, + ], + }, + "branch": "A String", # 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. + "canonicalFilter": "A String", # The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter. + "contentSearchSpec": { # A specification for configuring the behavior of content search. # A specification for configuring the behavior of content search. + "extractiveContentSpec": { # A specification for configuring the extractive content in a search response. # If there is no extractive_content_spec provided, there will be no extractive answer in the search response. + "maxExtractiveAnswerCount": 42, # 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. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult. + "maxExtractiveSegmentCount": 42, # The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is 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. 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`. + "numNextSegments": 42, # Return at most `num_next_segments` segments after each selected segments. + "numPreviousSegments": 42, # Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments. + "returnExtractiveSegmentScore": True or 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`. + }, + "snippetSpec": { # A specification for configuring snippets in a search response. # If `snippetSpec` is not specified, snippets are not included in the search response. + "maxSnippetCount": 42, # [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. + "referenceOnly": True or False, # [DEPRECATED] This field is deprecated and will have no affect on the snippet. + "returnSnippet": True or False, # If `true`, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + }, + "summarySpec": { # A specification for configuring a summary returned in a search response. # If `summarySpec` is not specified, summaries are not included in the search response. + "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead. + "ignoreNonSummarySeekingQuery": True or False, # 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. + "includeCitations": True or 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. 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. + "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature. + "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM. + "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide. + }, + "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM. + "version": "A String", # The model version used to generate the summary. 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](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + }, + "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + "useSemanticChunks": True or False, # 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. + }, + }, + "dataStoreSpecs": [ # A list of data store specs to apply on a search call. + { # A struct to define data stores to filter on in a search call. + "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. + }, + ], + "facetSpecs": [ # 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. + { # A facet specification to perform faceted search. + "enableDynamicPosition": True or False, # Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined automatically. If dynamic facets are enabled, it is ordered together. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined automatically. Another example, assuming you have the following facets in the request: * "rating", enable_dynamic_position = true * "price", enable_dynamic_position = false * "brands", enable_dynamic_position = false And also you have a dynamic facets enabled, which generates a facet `gender`. Then the final order of the facets in the response can be ("price", "brands", "rating", "gender") or ("price", "brands", "gender", "rating") depends on how API orders "gender" and "rating" facets. However, notice that "price" and "brands" are always ranked at first and second position because their enable_dynamic_position is false. + "excludedFilterKeys": [ # List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 documents with the color facet "Red" and 200 documents with the color facet "Blue". A query containing the filter "color:ANY("Red")" and having "color" as FacetKey.key 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. + "A String", + ], + "facetKey": { # Specifies how a facet is computed. # Required. The facet key specification. + "caseInsensitive": True or False, # True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise. + "contains": [ # Only get facet values that contains 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. + "A String", + ], + "intervals": [ # 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. + { # A floating point interval. + "exclusiveMaximum": 3.14, # Exclusive upper bound. + "exclusiveMinimum": 3.14, # Exclusive lower bound. + "maximum": 3.14, # Inclusive upper bound. + "minimum": 3.14, # Inclusive lower bound. + }, + ], + "key": "A String", # Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive. + "orderBy": "A String", # The order in which documents are returned. Allowed values are: * "count desc", which means order by SearchResponse.Facet.values.count descending. * "value desc", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals. + "prefixes": [ # 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. + "A String", + ], + "restrictedValues": [ # 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. + "A String", + ], + }, + "limit": 42, # Maximum of facet values that should be returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 are coerced to 300. If this field is negative, an `INVALID_ARGUMENT` is returned. + }, + ], + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + "imageQuery": { # Specifies the image query input. # Raw image query. + "imageBytes": "A String", # Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP. + }, + "offset": 42, # A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned. + "orderBy": "A String", # 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](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + "pageSize": 42, # Maximum number of Documents 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. + "pageToken": "A String", # A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + "params": { # 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. Example: user_country_code: "au" For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `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. Example: search_type: 1 + "a_key": "", + }, + "query": "A String", # Raw search query. + "queryExpansionSpec": { # Specification to determine under which conditions query expansion should occur. # The query expansion specification that specifies the conditions under which query expansion occurs. + "condition": "A String", # The condition under which query expansion should occur. Default to Condition.DISABLED. + "pinUnexpandedResults": True or False, # 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. + }, + "safeSearch": True or False, # Whether to turn on safe search. This is only supported for website search. + "spellCorrectionSpec": { # The specification for query spell correction. # The spell correction specification that specifies the mode under which spell correction takes effect. + "mode": "A String", # The mode under which spell correction should take effect to replace the original search query. Default to Mode.AUTO. + }, + "userInfo": { # Information of an end user. # Information about the end user. Highly recommended for analytics. UserInfo.user_agent is used to deduce `device_type` for analytics. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + "a_key": "A String", + }, + "userPseudoId": "A String", # 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 and 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. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for SearchService.Search method. + "attributionToken": "A String", # A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. + "correctedQuery": "A String", # 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. + "facets": [ # Results of facets requested by user. + { # A facet result. + "dynamicFacet": True or False, # Whether the facet is dynamically generated. + "key": "A String", # The key for this facet. E.g., "colors" or "price". It matches SearchRequest.FacetSpec.FacetKey.key. + "values": [ # The facet values for this field. + { # A facet value which contains value names and their count. + "count": "A String", # Number of items that have this facet value. + "interval": { # A floating point interval. # Interval value for a facet, such as 10, 20) for facet "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals. + "exclusiveMaximum": 3.14, # Exclusive upper bound. + "exclusiveMinimum": 3.14, # Exclusive lower bound. + "maximum": 3.14, # Inclusive upper bound. + "minimum": 3.14, # Inclusive lower bound. + }, + "value": "A String", # Text value of a facet, such as "Black" for facet "colors". + }, + ], + }, + ], + "nextPageToken": "A String", # A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. + "queryExpansionInfo": { # Information describing query expansion including whether expansion has occurred. # Query expansion information for the returned results. + "expandedQuery": True or False, # Bool describing whether query expansion has occurred. + "pinnedResultCount": "A String", # Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true. + }, + "redirectUri": "A String", # The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response. + "results": [ # A list of matched documents. The order represents the ranking. + { # Represents the search results. + "document": { # Document captures all raw metadata information of items to be recommended or searched. # The document data snippet in the search response. Only fields that are marked as retrievable are populated. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + "id": "A String", # Document.id of the searched Document. + }, + ], + "summary": { # Summary of the top N search result specified by the summary spec. # A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + "totalSize": 42, # The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches. +}+
search_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ dataConnector()
+
Returns the dataConnector Resource.
+ +
+ dataStores()
+
Returns the dataStores Resource.
+ +
+ engines()
+
Returns the engines Resource.
+ +
+ operations()
+
Returns the operations Resource.
+ +
+ close()
Close httplib2 connections.
+close()
+ Close httplib2 connections.+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ create(parent, body=None, documentId=None, x__xgafv=None)
Creates a Document.
+ +Deletes a Document.
+ +Gets a Document.
+
+ import_(parent, body=None, x__xgafv=None)
Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.
+
+ list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Gets a list of Documents.
+ +Retrieves the next page of results.
+
+ patch(name, allowMissing=None, body=None, updateMask=None, x__xgafv=None)
Updates a Document.
+
+ purge(parent, body=None, x__xgafv=None)
Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.
+close()
+ Close httplib2 connections.+
create(parent, body=None, documentId=None, x__xgafv=None)
+ Creates a Document. + +Args: + parent: string, Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, +} + + documentId: string, Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, +}+
delete(name, x__xgafv=None)
+ Deletes a Document. + +Args: + name: string, Required. Full resource name of 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, 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. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # 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); } +}+
get(name, x__xgafv=None)
+ Gets a Document. + +Args: + name: string, Required. Full resource name of 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, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, +}+
import_(parent, body=None, x__xgafv=None)
+ Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated. + +Args: + parent: string, Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for Import methods. + "autoGenerateIds": True or False, # Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwise, documents without IDs fail to be imported. Supported data sources: * 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. + "bigquerySource": { # BigQuery source import data from. # BigQuery input source. + "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `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. + "datasetId": "A String", # Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters. + "gcsStagingDir": "A String", # 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. + "partitionDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. + "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. + "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. + }, + "projectId": "A String", # The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. + "tableId": "A String", # Required. The BigQuery table to copy the data from with a length limit of 1,024 characters. + }, + "bigtableSource": { # The Cloud Bigtable source for importing data. # Cloud Bigtable input source. + "bigtableOptions": { # The Bigtable Options object that contains information to support the import. # Required. Bigtable options that contains information needed when parsing data into typed structures. For example, column type annotations. + "families": { # 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. + "a_key": { # The column family of the Bigtable. + "columns": [ # 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 column of the Bigtable. + "encoding": "A String", # 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. + "fieldName": "A String", # 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. + "qualifier": "A String", # Required. Qualifier of the column. If it cannot be decoded with utf-8, use a base-64 encoded string instead. + "type": "A String", # 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`. + }, + ], + "encoding": "A String", # 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. + "fieldName": "A String", # The field name to use for this column family in the document. The name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the family name with best effort. However, due to different naming patterns, field name collisions could happen, where parsing behavior is undefined. + "type": "A String", # 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`. + }, + }, + "keyFieldName": "A String", # The field name used for saving row key value in the document. The name has to match the pattern `a-zA-Z0-9*`. + }, + "instanceId": "A String", # Required. The instance ID of the Cloud Bigtable that needs to be imported. + "projectId": "A String", # The project ID that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. + "tableId": "A String", # Required. The table ID of the Cloud Bigtable that needs to be imported. + }, + "cloudSqlSource": { # Cloud SQL source import data from. # Cloud SQL input source. + "databaseId": "A String", # Required. The Cloud SQL database to copy the data from with a length limit of 256 characters. + "gcsStagingDir": "A String", # 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. + "instanceId": "A String", # Required. The Cloud SQL instance to copy the data from with a length limit of 256 characters. + "offload": True or False, # Option for serverless export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/sql/pricing#serverless). + "projectId": "A String", # 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. + "tableId": "A String", # Required. The Cloud SQL table to copy the data from with a length limit of 256 characters. + }, + "errorConfig": { # Configuration of destination for Import related errors. # The desired location of errors incurred during the Import. + "gcsPrefix": "A String", # 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. + }, + "fhirStoreSource": { # Cloud FhirStore source import data from. # FhirStore input source. + "fhirStore": "A String", # 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}`. + "gcsStagingDir": "A String", # 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. + }, + "firestoreSource": { # Firestore source import data from. # Firestore input source. + "collectionId": "A String", # Required. The Firestore collection to copy the data from with a length limit of 1,500 characters. + "databaseId": "A String", # Required. The Firestore database to copy the data from with a length limit of 256 characters. + "gcsStagingDir": "A String", # 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. + "projectId": "A String", # 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. + }, + "gcsSource": { # Cloud Storage location for input content. # Cloud Storage location for the input content. + "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must 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 even imports: * `user_event` (default): One JSON UserEvent per line. + "inputUris": [ # Required. Cloud Storage URIs to input files. 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 String", + ], + }, + "idField": "A String", # The field indicates the ID field or column to be used as unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. For others, it may be the column name of the table where the unique ids are stored. The values of the JSON field or the table column are used as the Document.ids. 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](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs fail to be imported. Only set this field when 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. 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. + "inlineSource": { # The inline source for the input config for ImportDocuments method. # The Inline source for the input content for documents. + "documents": [ # Required. A list of documents to update/create. Each document must have a valid Document.id. Recommended max of 100 items. + { # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + ], + }, + "reconciliationMode": "A String", # The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL. + "spannerSource": { # The Spanner source for importing data # Spanner input source. + "databaseId": "A String", # Required. The database ID of the source Spanner table. + "enableDataBoost": True or False, # Whether to apply data boost on Spanner export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + "instanceId": "A String", # Required. The instance ID of the source Spanner table. + "projectId": "A String", # The project ID that the Spanner source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. + "tableId": "A String", # Required. The table name of the Spanner database that needs to be imported. + }, + "updateMask": "A String", # Indicates which fields in the provided imported documents to update. If not set, the default is to update all fields. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
+ Gets a list of Documents. + +Args: + parent: string, 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 Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned. (required) + pageSize: integer, Maximum number of Documents 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. + pageToken: string, A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for DocumentService.ListDocuments method. + "documents": [ # The Documents. + { # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + ], + "nextPageToken": "A String", # A token that can be sent as ListDocumentsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, allowMissing=None, body=None, updateMask=None, x__xgafv=None)
+ Updates a Document. + +Args: + name: string, Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. (required) + body: object, The request body. + The object takes the form of: + +{ # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, +} + + allowMissing: boolean, If set to true, and the Document is not found, a new Document will be created. + updateMask: string, Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Document captures all raw metadata information of items to be recommended or searched. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, +}+
purge(parent, body=None, x__xgafv=None)
+ Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false. + +Args: + parent: string, Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for DocumentService.PurgeDocuments method. + "filter": "A String", # Required. Filter matching documents to purge. Only currently supported value is `*` (all items). + "force": True or False, # Actually performs the purge. If `force` is set to false, return the expected purge count without deleting any documents. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ documents()
+
Returns the documents Resource.
+ +
+ operations()
+
Returns the operations Resource.
+ +
+ close()
Close httplib2 connections.
+close()
+ Close httplib2 connections.+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ converse(name, body=None, x__xgafv=None)
Converses a conversation.
+
+ create(parent, body=None, x__xgafv=None)
Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.
+ +Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.
+ +Gets a Conversation.
+
+ list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all Conversations by their parent DataStore.
+ +Retrieves the next page of results.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.
+close()
+ Close httplib2 connections.+
converse(name, body=None, x__xgafv=None)
+ Converses a conversation. + +Args: + name: string, 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. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for ConversationalSearchService.ConverseConversation method. + "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + "conditionBoostSpecs": [ # 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. + { # Boost applies to documents which match a condition. + "boost": 3.14, # 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. + "condition": "A String", # 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"))` + }, + ], + }, + "conversation": { # External conversation proto definition. # 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. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. + }, + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the summary response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + "query": { # Defines text input. # Required. Current user input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + "safeSearch": True or False, # Whether to turn on safe search. + "servingConfig": "A String", # 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. + "summarySpec": { # A specification for configuring a summary returned in a search response. # A specification for configuring the summary returned in the response. + "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead. + "ignoreNonSummarySeekingQuery": True or False, # 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. + "includeCitations": True or 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. 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. + "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature. + "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM. + "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide. + }, + "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM. + "version": "A String", # The model version used to generate the summary. 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](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + }, + "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + "useSemanticChunks": True or False, # 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. + }, + "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + "a_key": "A String", + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for ConversationalSearchService.ConverseConversation method. + "conversation": { # External conversation proto definition. # Updated conversation including the answer. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. + }, + "reply": { # Defines a reply message to user. # Answer to the current query. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "searchResults": [ # Search Results. + { # Represents the search results. + "document": { # Document captures all raw metadata information of items to be recommended or searched. # The document data snippet in the search response. Only fields that are marked as retrievable are populated. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + "id": "A String", # Document.id of the searched Document. + }, + ], +}+
create(parent, body=None, x__xgafv=None)
+ Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned. + +Args: + parent: string, Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` (required) + body: object, The request body. + The object takes the form of: + +{ # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +}+
delete(name, x__xgafv=None)
+ Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned. + +Args: + name: string, 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}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # 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); } +}+
get(name, x__xgafv=None)
+ Gets a Conversation. + +Args: + name: string, 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}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +}+
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists all Conversations by their parent DataStore. + +Args: + parent: string, Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` (required) + filter: string, A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: "user_pseudo_id = some_id" + orderBy: string, 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` Example: "update_time desc" "create_time" + pageSize: integer, Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000. + pageToken: string, A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response for ListConversations method. + "conversations": [ # All the Conversations for a given data store. + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. + }, + ], + "nextPageToken": "A String", # Pagination token, if not returned indicates the last page. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, updateMask=None, x__xgafv=None)
+ Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned. + +Args: + name: string, Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. (required) + body: object, The request body. + The object takes the form of: + +{ # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +} + + updateMask: string, Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # External conversation proto definition. + "endTime": "A String", # Output only. The time the conversation finished. + "messages": [ # Conversation messages. + { # Defines a conversation message. + "createTime": "A String", # Output only. Message creation timestamp. + "reply": { # Defines a reply message to user. # Search reply. + "summary": { # Summary of the top N search result specified by the summary spec. # Summary based on search results. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + }, + "userInput": { # Defines text input. # User text input. + "context": { # Defines context of the conversation # Conversation context of the input. + "activeDocument": "A String", # The current active document the user opened. It contains the document resource reference. + "contextDocuments": [ # The current list of documents the user is seeing. It contains the document resource references. + "A String", + ], + }, + "input": "A String", # Text input. + }, + }, + ], + "name": "A String", # Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`. + "startTime": "A String", # Output only. The time the conversation started. + "state": "A String", # The state of the Conversation. + "userPseudoId": "A String", # A unique identifier for tracking users. +}+
+ branches()
+
Returns the branches Resource.
+ +
+ conversations()
+
Returns the conversations Resource.
+ +
+ models()
+
Returns the models Resource.
+ +
+ operations()
+
Returns the operations Resource.
+ +
+ schemas()
+
Returns the schemas Resource.
+ +
+ servingConfigs()
+
Returns the servingConfigs Resource.
+ + +Returns the siteSearchEngine Resource.
+ +
+ suggestionDenyListEntries()
+
Returns the suggestionDenyListEntries Resource.
+ +
+ userEvents()
+
Returns the userEvents Resource.
+ +
+ close()
Close httplib2 connections.
+ +Completes the specified user input with keyword suggestions.
+
+ create(parent, body=None, createAdvancedSiteSearch=None, dataStoreId=None, x__xgafv=None)
Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.
+ +Deletes a DataStore.
+ +Gets a DataStore.
+
+ getSiteSearchEngine(name, x__xgafv=None)
Gets the SiteSearchEngine.
+
+ list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists all the DataStores associated with the project.
+ +Retrieves the next page of results.
+
+ patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a DataStore
+close()
+ Close httplib2 connections.+
completeQuery(dataStore, includeTailSuggestions=None, query=None, queryModel=None, userPseudoId=None, x__xgafv=None)
+ Completes the specified user input with keyword suggestions. + +Args: + dataStore: string, 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`. (required) + includeTailSuggestions: boolean, 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. + query: string, Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters. + queryModel: string, 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. + userPseudoId: string, 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 and 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. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for CompletionService.CompleteQuery method. + "querySuggestions": [ # Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion. + { # Suggestions as search queries. + "completableFieldPaths": [ # 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. + "A String", + ], + "suggestion": "A String", # The suggestion for the query. + }, + ], + "tailMatchTriggered": True or False, # 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. +}+
create(parent, body=None, createAdvancedSiteSearch=None, dataStoreId=None, x__xgafv=None)
+ Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately. + +Args: + parent: string, Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`. (required) + body: object, The request body. + The object takes the form of: + +{ # DataStore captures global settings and configs at the DataStore level. + "contentConfig": "A String", # Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + "createTime": "A String", # Output only. Timestamp the DataStore was created at. + "defaultSchemaId": "A String", # Output only. The id of the default Schema asscociated to this data store. + "displayName": "A String", # Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + "documentProcessingConfig": { # A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. # Configuration for Document understanding and enrichment. + "defaultParsingConfig": { # Related configurations applied to a specific type of document parser. # 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. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + "name": "A String", # The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + "parsingConfigOverrides": { # 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 or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + "a_key": { # Related configurations applied to a specific type of document parser. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + }, + }, + "industryVertical": "A String", # Immutable. The industry vertical that the data store registers. + "name": "A String", # Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "solutionTypes": [ # The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + "A String", + ], + "startingSchema": { # Defines the structure and layout of a type of document data. # The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, +} + + createAdvancedSiteSearch: boolean, 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. + dataStoreId: string, Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
delete(name, x__xgafv=None)
+ Deletes a DataStore. + +Args: + name: string, Required. Full resource name of 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, 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. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
get(name, x__xgafv=None)
+ Gets a DataStore. + +Args: + name: string, Required. Full resource name of 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, 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. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # DataStore captures global settings and configs at the DataStore level. + "contentConfig": "A String", # Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + "createTime": "A String", # Output only. Timestamp the DataStore was created at. + "defaultSchemaId": "A String", # Output only. The id of the default Schema asscociated to this data store. + "displayName": "A String", # Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + "documentProcessingConfig": { # A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. # Configuration for Document understanding and enrichment. + "defaultParsingConfig": { # Related configurations applied to a specific type of document parser. # 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. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + "name": "A String", # The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + "parsingConfigOverrides": { # 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 or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + "a_key": { # Related configurations applied to a specific type of document parser. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + }, + }, + "industryVertical": "A String", # Immutable. The industry vertical that the data store registers. + "name": "A String", # Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "solutionTypes": [ # The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + "A String", + ], + "startingSchema": { # Defines the structure and layout of a type of document data. # The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, +}+
getSiteSearchEngine(name, x__xgafv=None)
+ Gets the SiteSearchEngine. + +Args: + name: string, Required. Resource name of 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. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # SiteSearchEngine captures DataStore level site search persisting configurations. It is a singleton value per data store. + "name": "A String", # The fully qualified resource name of the site search engine. Format: `projects/*/locations/*/dataStores/*/siteSearchEngine` +}+
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists all the DataStores associated with the project. + +Args: + parent: string, Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned. (required) + filter: string, Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' + pageSize: integer, Maximum number of DataStores 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. + pageToken: string, A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for DataStoreService.ListDataStores method. + "dataStores": [ # All the customer's DataStores. + { # DataStore captures global settings and configs at the DataStore level. + "contentConfig": "A String", # Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + "createTime": "A String", # Output only. Timestamp the DataStore was created at. + "defaultSchemaId": "A String", # Output only. The id of the default Schema asscociated to this data store. + "displayName": "A String", # Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + "documentProcessingConfig": { # A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. # Configuration for Document understanding and enrichment. + "defaultParsingConfig": { # Related configurations applied to a specific type of document parser. # 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. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + "name": "A String", # The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + "parsingConfigOverrides": { # 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 or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + "a_key": { # Related configurations applied to a specific type of document parser. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + }, + }, + "industryVertical": "A String", # Immutable. The industry vertical that the data store registers. + "name": "A String", # Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "solutionTypes": [ # The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + "A String", + ], + "startingSchema": { # Defines the structure and layout of a type of document data. # The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, + }, + ], + "nextPageToken": "A String", # A token that can be sent as ListDataStoresRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, updateMask=None, x__xgafv=None)
+ Updates a DataStore + +Args: + name: string, Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. (required) + body: object, The request body. + The object takes the form of: + +{ # DataStore captures global settings and configs at the DataStore level. + "contentConfig": "A String", # Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + "createTime": "A String", # Output only. Timestamp the DataStore was created at. + "defaultSchemaId": "A String", # Output only. The id of the default Schema asscociated to this data store. + "displayName": "A String", # Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + "documentProcessingConfig": { # A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. # Configuration for Document understanding and enrichment. + "defaultParsingConfig": { # Related configurations applied to a specific type of document parser. # 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. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + "name": "A String", # The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + "parsingConfigOverrides": { # 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 or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + "a_key": { # Related configurations applied to a specific type of document parser. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + }, + }, + "industryVertical": "A String", # Immutable. The industry vertical that the data store registers. + "name": "A String", # Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "solutionTypes": [ # The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + "A String", + ], + "startingSchema": { # Defines the structure and layout of a type of document data. # The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, +} + + updateMask: string, Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # DataStore captures global settings and configs at the DataStore level. + "contentConfig": "A String", # Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. + "createTime": "A String", # Output only. Timestamp the DataStore was created at. + "defaultSchemaId": "A String", # Output only. The id of the default Schema asscociated to this data store. + "displayName": "A String", # Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + "documentProcessingConfig": { # A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config. # Configuration for Document understanding and enrichment. + "defaultParsingConfig": { # Related configurations applied to a specific type of document parser. # 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. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + "name": "A String", # The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + "parsingConfigOverrides": { # 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 or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported. + "a_key": { # Related configurations applied to a specific type of document parser. + "digitalParsingConfig": { # The digital parsing configurations for documents. # Configurations applied to digital parser. + }, + "ocrParsingConfig": { # The OCR parsing configurations for documents. # Configurations applied to OCR parser. Currently it only applies to PDFs. + "enhancedDocumentElements": [ # [DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`. + "A String", + ], + "useNativeText": True or False, # If true, will use native text instead of OCR text on pages containing native text. + }, + }, + }, + }, + "industryVertical": "A String", # Immutable. The industry vertical that the data store registers. + "name": "A String", # Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "solutionTypes": [ # The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled. + "A String", + ], + "startingSchema": { # Defines the structure and layout of a type of document data. # The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, +}+
+ operations()
+
Returns the operations Resource.
+ +
+ close()
Close httplib2 connections.
+close()
+ Close httplib2 connections.+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ create(parent, body=None, schemaId=None, x__xgafv=None)
Creates a Schema.
+ +Deletes a Schema.
+ +Gets a Schema.
+
+ list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Gets a list of Schemas.
+ +Retrieves the next page of results.
+
+ patch(name, allowMissing=None, body=None, x__xgafv=None)
Updates a Schema.
+close()
+ Close httplib2 connections.+
create(parent, body=None, schemaId=None, x__xgafv=None)
+ Creates a Schema. + +Args: + parent: string, Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Defines the structure and layout of a type of document data. + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, +} + + schemaId: string, Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
delete(name, x__xgafv=None)
+ Deletes a Schema. + +Args: + name: string, Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
get(name, x__xgafv=None)
+ Gets a Schema. + +Args: + name: string, Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Defines the structure and layout of a type of document data. + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, +}+
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
+ Gets a list of Schemas. + +Args: + parent: string, Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required) + pageSize: integer, The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. + pageToken: string, A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for SchemaService.ListSchemas method. + "nextPageToken": "A String", # A token that can be sent as ListSchemasRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. + "schemas": [ # The Schemas. + { # Defines the structure and layout of a type of document data. + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, allowMissing=None, body=None, x__xgafv=None)
+ Updates a Schema. + +Args: + name: string, Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. (required) + body: object, The request body. + The object takes the form of: + +{ # Defines the structure and layout of a type of document data. + "jsonSchema": "A String", # The JSON representation of the schema. + "name": "A String", # Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "structSchema": { # The structured representation of the schema. + "a_key": "", # Properties of the object. + }, +} + + allowMissing: boolean, If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ close()
Close httplib2 connections.
+
+ recommend(servingConfig, body=None, x__xgafv=None)
Makes a recommendation, which requires a contextual user event.
+
+ search(servingConfig, body=None, x__xgafv=None)
Performs a search.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
recommend(servingConfig, body=None, x__xgafv=None)
+ Makes a recommendation, which requires a contextual user event. + +Args: + servingConfig: string, Required. Full resource name of a 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 will be 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 requests. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for Recommend method. + "filter": "A String", # Filter for restricting recommendation results with a length limit of 5,000 characters. Currently, only filter expressions on the `filter_tags` attribute is supported. Examples: * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` If `attributeFilteringSyntax` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) If your filter blocks all results, the API will return 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 will never return Documents with `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices. + "pageSize": 42, # Maximum number of results to return. Set this property to the number of recommendation results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100. + "params": { # Additional domain specific parameters for the recommendations. Allowed values: * `returnDocument`: Boolean. If set to true, the associated Document object will be returned in RecommendResponse.RecommendationResult.document. * `returnScore`: Boolean. If set to true, the recommendation 'score' corresponding to each returned Document will be 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 will return 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. + "a_key": "", + }, + "userEvent": { # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. # Required. Context about the user, what they are looking at and what action they took to trigger the Recommend request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.user_pseudo_id to a random unique ID and leave UserEvent.user_info.user_id unset. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. + }, + "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + "a_key": "A String", + }, + "validateOnly": True or False, # Use validate only mode for this recommendation query. If set to true, a fake model will be 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. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for Recommend method. + "attributionToken": "A String", # A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance. + "missingIds": [ # IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig. + "A String", + ], + "results": [ # A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least). + { # RecommendationResult represents a generic recommendation result with associated metadata. + "document": { # Document captures all raw metadata information of items to be recommended or searched. # Set if `returnDocument` is set to true in RecommendRequest.params. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + "id": "A String", # Resource ID of the recommended Document. + "metadata": { # Additional Document metadata / annotations. Possible values: * `score`: Recommendation score in double value. Is set if `returnScore` is set to true in RecommendRequest.params. + "a_key": "", + }, + }, + ], + "validateOnly": True or False, # True if RecommendRequest.validate_only was set. +}+
search(servingConfig, body=None, x__xgafv=None)
+ Performs a search. + +Args: + servingConfig: string, Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SearchService.Search method. + "boostSpec": { # Boost specification to boost certain documents. # Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + "conditionBoostSpecs": [ # 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. + { # Boost applies to documents which match a condition. + "boost": 3.14, # 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. + "condition": "A String", # 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"))` + }, + ], + }, + "branch": "A String", # 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. + "canonicalFilter": "A String", # The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter. + "contentSearchSpec": { # A specification for configuring the behavior of content search. # A specification for configuring the behavior of content search. + "extractiveContentSpec": { # A specification for configuring the extractive content in a search response. # If there is no extractive_content_spec provided, there will be no extractive answer in the search response. + "maxExtractiveAnswerCount": 42, # 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. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult. + "maxExtractiveSegmentCount": 42, # The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is 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. 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`. + "numNextSegments": 42, # Return at most `num_next_segments` segments after each selected segments. + "numPreviousSegments": 42, # Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments. + "returnExtractiveSegmentScore": True or 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`. + }, + "snippetSpec": { # A specification for configuring snippets in a search response. # If `snippetSpec` is not specified, snippets are not included in the search response. + "maxSnippetCount": 42, # [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. + "referenceOnly": True or False, # [DEPRECATED] This field is deprecated and will have no affect on the snippet. + "returnSnippet": True or False, # If `true`, then return snippet. If no snippet can be generated, we return "No snippet is available for this page." A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned. + }, + "summarySpec": { # A specification for configuring a summary returned in a search response. # If `summarySpec` is not specified, summaries are not included in the search response. + "ignoreAdversarialQuery": True or False, # Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead. + "ignoreNonSummarySeekingQuery": True or False, # 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. + "includeCitations": True or 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. 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. + "languageCode": "A String", # Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature. + "modelPromptSpec": { # Specification of the prompt to use with the model. # If specified, the spec will be used to modify the prompt provided to the LLM. + "preamble": "A String", # Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide. + }, + "modelSpec": { # Specification of the model. # If specified, the spec will be used to modify the model specification provided to the LLM. + "version": "A String", # The model version used to generate the summary. 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](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + }, + "summaryResultCount": 42, # The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + "useSemanticChunks": True or False, # 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. + }, + }, + "dataStoreSpecs": [ # A list of data store specs to apply on a search call. + { # A struct to define data stores to filter on in a search call. + "dataStore": "A String", # Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. + }, + ], + "facetSpecs": [ # 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. + { # A facet specification to perform faceted search. + "enableDynamicPosition": True or False, # Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined automatically. If dynamic facets are enabled, it is ordered together. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined automatically. Another example, assuming you have the following facets in the request: * "rating", enable_dynamic_position = true * "price", enable_dynamic_position = false * "brands", enable_dynamic_position = false And also you have a dynamic facets enabled, which generates a facet `gender`. Then the final order of the facets in the response can be ("price", "brands", "rating", "gender") or ("price", "brands", "gender", "rating") depends on how API orders "gender" and "rating" facets. However, notice that "price" and "brands" are always ranked at first and second position because their enable_dynamic_position is false. + "excludedFilterKeys": [ # List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 documents with the color facet "Red" and 200 documents with the color facet "Blue". A query containing the filter "color:ANY("Red")" and having "color" as FacetKey.key 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. + "A String", + ], + "facetKey": { # Specifies how a facet is computed. # Required. The facet key specification. + "caseInsensitive": True or False, # True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise. + "contains": [ # Only get facet values that contains 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. + "A String", + ], + "intervals": [ # 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. + { # A floating point interval. + "exclusiveMaximum": 3.14, # Exclusive upper bound. + "exclusiveMinimum": 3.14, # Exclusive lower bound. + "maximum": 3.14, # Inclusive upper bound. + "minimum": 3.14, # Inclusive lower bound. + }, + ], + "key": "A String", # Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive. + "orderBy": "A String", # The order in which documents are returned. Allowed values are: * "count desc", which means order by SearchResponse.Facet.values.count descending. * "value desc", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals. + "prefixes": [ # 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. + "A String", + ], + "restrictedValues": [ # 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. + "A String", + ], + }, + "limit": 42, # Maximum of facet values that should be returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 are coerced to 300. If this field is negative, an `INVALID_ARGUMENT` is returned. + }, + ], + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --> name:'ANY("king kong")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + "imageQuery": { # Specifies the image query input. # Raw image query. + "imageBytes": "A String", # Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP. + }, + "offset": 42, # A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned. + "orderBy": "A String", # 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](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + "pageSize": 42, # Maximum number of Documents 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. + "pageToken": "A String", # A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + "params": { # 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. Example: user_country_code: "au" For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `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. Example: search_type: 1 + "a_key": "", + }, + "query": "A String", # Raw search query. + "queryExpansionSpec": { # Specification to determine under which conditions query expansion should occur. # The query expansion specification that specifies the conditions under which query expansion occurs. + "condition": "A String", # The condition under which query expansion should occur. Default to Condition.DISABLED. + "pinUnexpandedResults": True or False, # 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. + }, + "safeSearch": True or False, # Whether to turn on safe search. This is only supported for website search. + "spellCorrectionSpec": { # The specification for query spell correction. # The spell correction specification that specifies the mode under which spell correction takes effect. + "mode": "A String", # The mode under which spell correction should take effect to replace the original search query. Default to Mode.AUTO. + }, + "userInfo": { # Information of an end user. # Information about the end user. Highly recommended for analytics. UserInfo.user_agent is used to deduce `device_type` for analytics. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userLabels": { # The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details. + "a_key": "A String", + }, + "userPseudoId": "A String", # 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 and 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. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for SearchService.Search method. + "attributionToken": "A String", # A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance. + "correctedQuery": "A String", # 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. + "facets": [ # Results of facets requested by user. + { # A facet result. + "dynamicFacet": True or False, # Whether the facet is dynamically generated. + "key": "A String", # The key for this facet. E.g., "colors" or "price". It matches SearchRequest.FacetSpec.FacetKey.key. + "values": [ # The facet values for this field. + { # A facet value which contains value names and their count. + "count": "A String", # Number of items that have this facet value. + "interval": { # A floating point interval. # Interval value for a facet, such as 10, 20) for facet "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals. + "exclusiveMaximum": 3.14, # Exclusive upper bound. + "exclusiveMinimum": 3.14, # Exclusive lower bound. + "maximum": 3.14, # Inclusive upper bound. + "minimum": 3.14, # Inclusive lower bound. + }, + "value": "A String", # Text value of a facet, such as "Black" for facet "colors". + }, + ], + }, + ], + "nextPageToken": "A String", # A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. + "queryExpansionInfo": { # Information describing query expansion including whether expansion has occurred. # Query expansion information for the returned results. + "expandedQuery": True or False, # Bool describing whether query expansion has occurred. + "pinnedResultCount": "A String", # Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true. + }, + "redirectUri": "A String", # The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response. + "results": [ # A list of matched documents. The order represents the ranking. + { # Represents the search results. + "document": { # Document captures all raw metadata information of items to be recommended or searched. # The document data snippet in the search response. Only fields that are marked as retrievable are populated. + "content": { # Unstructured data linked to this document. # The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store. + "mimeType": "A String", # 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) See https://www.iana.org/assignments/media-types/media-types.xhtml. + "rawBytes": "A String", # The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json. + "uri": "A String", # 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, 100 MB for other formats. + }, + "derivedStructData": { # Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. + "a_key": "", # Properties of the object. + }, + "id": "A String", # Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "indexTime": "A String", # 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. + "jsonData": "A String", # The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "name": "A String", # Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters. + "parentDocumentId": "A String", # The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. + "schemaId": "A String", # The identifier of the schema located in the same data store. + "structData": { # The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + "a_key": "", # Properties of the object. + }, + }, + "id": "A String", # Document.id of the searched Document. + }, + ], + "summary": { # Summary of the top N search result specified by the summary spec. # A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set. + "safetyAttributes": { # Safety Attribute categories and their associated confidence scores. # A collection of Safety Attribute categories and their associated confidence scores. + "categories": [ # The display names of Safety Attribute categories associated with the generated content. Order matches the Scores. + "A String", + ], + "scores": [ # The confidence scores of the each category, higher value means higher confidence. Order matches the Categories. + 3.14, + ], + }, + "summarySkippedReasons": [ # Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set. + "A String", + ], + "summaryText": "A String", # The summary content. + "summaryWithMetadata": { # Summary with metadata information. # Summary with metadata information. + "citationMetadata": { # Citation metadata. # Citation metadata for given summary. + "citations": [ # Citations for segments. + { # Citation info for a segment. + "endIndex": "A String", # End of the attributed segment, exclusive. + "sources": [ # Citation sources for the attributed segment. + { # Citation source. + "referenceIndex": "A String", # Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly. + }, + ], + "startIndex": "A String", # Index indicates the start of the segment, measured in bytes/unicode. + }, + ], + }, + "references": [ # Document References. + { # Document reference. + "chunkContents": [ # List of cited chunk contents derived from document content. + { # Chunk content. + "content": "A String", # Chunk textual content. + "pageIdentifier": "A String", # Page identifier. + }, + ], + "document": "A String", # Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + "title": "A String", # Title of the document. + "uri": "A String", # Cloud Storage or HTTP uri for the document. + }, + ], + "summary": "A String", # Summary text with no citation information. + }, + }, + "totalSize": 42, # The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches. +}+
search_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ targetSites()
+
Returns the targetSites Resource.
+ +
+ close()
Close httplib2 connections.
+
+ disableAdvancedSiteSearch(siteSearchEngine, body=None, x__xgafv=None)
Downgrade from advanced site search to basic site search.
+
+ enableAdvancedSiteSearch(siteSearchEngine, body=None, x__xgafv=None)
Upgrade from basic site search to advanced site search.
+
+ recrawlUris(siteSearchEngine, body=None, x__xgafv=None)
Request on-demand recrawl for a list of URIs.
+close()
+ Close httplib2 connections.+
disableAdvancedSiteSearch(siteSearchEngine, body=None, x__xgafv=None)
+ Downgrade from advanced site search to basic site search. + +Args: + siteSearchEngine: string, Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SiteSearchEngineService.DisableAdvancedSiteSearch method. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
enableAdvancedSiteSearch(siteSearchEngine, body=None, x__xgafv=None)
+ Upgrade from basic site search to advanced site search. + +Args: + siteSearchEngine: string, Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SiteSearchEngineService.EnableAdvancedSiteSearch method. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
recrawlUris(siteSearchEngine, body=None, x__xgafv=None)
+ Request on-demand recrawl for a list of URIs. + +Args: + siteSearchEngine: string, Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SiteSearchEngineService.RecrawlUris method. + "uris": [ # Required. List of URIs to crawl. At most 10K URIs are supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at least one TargetSite in `site_search_engine`. + "A String", + ], +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ batchCreate(parent, body=None, x__xgafv=None)
Creates TargetSite in a batch.
+
+ close()
Close httplib2 connections.
+
+ create(parent, body=None, x__xgafv=None)
Creates a TargetSite.
+ +Deletes a TargetSite.
+ +Gets a TargetSite.
+
+ list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Gets a list of TargetSites.
+ +Retrieves the next page of results.
+
+ patch(name, body=None, x__xgafv=None)
Updates a TargetSite.
+batchCreate(parent, body=None, x__xgafv=None)
+ Creates TargetSite in a batch. + +Args: + parent: string, Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for SiteSearchEngineService.BatchCreateTargetSites method. + "requests": [ # Required. The request message specifying the resources to create. A maximum of 20 TargetSites can be created in a batch. + { # Request message for SiteSearchEngineService.CreateTargetSite method. + "parent": "A String", # Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. + "targetSite": { # A target site for the SiteSearchEngine. # Required. The TargetSite to create. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. + }, + }, + ], +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
close()
+ Close httplib2 connections.+
create(parent, body=None, x__xgafv=None)
+ Creates a TargetSite. + +Args: + parent: string, Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. (required) + body: object, The request body. + The object takes the form of: + +{ # A target site for the SiteSearchEngine. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
delete(name, x__xgafv=None)
+ Deletes a TargetSite. + +Args: + name: string, Required. Full resource name of 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, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
get(name, x__xgafv=None)
+ Gets a TargetSite. + +Args: + name: string, Required. Full resource name of 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, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A target site for the SiteSearchEngine. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. +}+
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
+ Gets a list of TargetSites. + +Args: + parent: string, 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 TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. (required) + pageSize: integer, Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned. + pageToken: string, 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. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for SiteSearchEngineService.ListTargetSites method. + "nextPageToken": "A String", # A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + "targetSites": [ # List of TargetSites. + { # A target site for the SiteSearchEngine. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. + }, + ], + "totalSize": 42, # The total number of items matching the request. This will always be populated in the response. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
patch(name, body=None, x__xgafv=None)
+ Updates a TargetSite. + +Args: + name: string, 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. (required) + body: object, The request body. + The object takes the form of: + +{ # A target site for the SiteSearchEngine. + "exactMatch": True or False, # 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. + "failureReason": { # Site search indexing failure reasons. # Output only. Failure reason. + "quotaFailure": { # Failed due to insufficient quota. # Failed due to insufficient quota. + "totalRequiredQuota": "A String", # This number is an estimation on how much total quota this project needs to successfully complete indexing. + }, + }, + "generatedUriPattern": "A String", # Output only. This is system-generated based on the provided_uri_pattern. + "indexingStatus": "A String", # Output only. Indexing status. + "name": "A String", # 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. + "providedUriPattern": "A String", # Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated. + "siteVerificationInfo": { # Verification information for target sites in advanced site search. # Output only. Site ownership and validity verification status. + "siteVerificationState": "A String", # Site verification state indicating the ownership and validity. + "verifyTime": "A String", # Latest site verification time. + }, + "type": "A String", # The type of the target site, e.g., whether the site is to be included or excluded. + "updateTime": "A String", # Output only. The target site's last updated time. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ close()
Close httplib2 connections.
+
+ import_(parent, body=None, x__xgafv=None)
Imports all SuggestionDenyListEntry for a DataStore.
+
+ purge(parent, body=None, x__xgafv=None)
Permanently deletes all SuggestionDenyListEntry for a DataStore.
+close()
+ Close httplib2 connections.+
import_(parent, body=None, x__xgafv=None)
+ Imports all SuggestionDenyListEntry for a DataStore. + +Args: + parent: string, Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for CompletionService.ImportSuggestionDenyListEntries method. + "gcsSource": { # Cloud Storage location for input content. # Cloud Storage location for the input content. Only 1 file can be specified that contains all entries to import. Supported values `gcs_source.schema` for autocomplete suggestion deny list entry imports: * `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] per line. + "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must 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 even imports: * `user_event` (default): One JSON UserEvent per line. + "inputUris": [ # Required. Cloud Storage URIs to input files. 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 String", + ], + }, + "inlineSource": { # The inline source for SuggestionDenyListEntry. # The Inline source for the input content for suggestion deny list entries. + "entries": [ # Required. A list of all denylist entries to import. Max of 1000 items. + { # Suggestion deny list entry identifying the phrase to block from suggestions and the applied operation for the phrase. + "blockPhrase": "A String", # Required. Phrase to block from suggestions served. Can be maximum 125 characters. + "matchOperator": "A String", # Required. The match operator to apply for this phrase. Whether to block the exact phrase, or block any suggestions containing this phrase. + }, + ], + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
purge(parent, body=None, x__xgafv=None)
+ Permanently deletes all SuggestionDenyListEntry for a DataStore. + +Args: + parent: string, Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*. (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for CompletionService.PurgeSuggestionDenyListEntries method. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ close()
Close httplib2 connections.
+
+ collect(parent, ets=None, uri=None, userEvent=None, x__xgafv=None)
Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
+
+ import_(parent, body=None, x__xgafv=None)
Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.
+
+ write(parent, body=None, x__xgafv=None)
Writes a single user event.
+close()
+ Close httplib2 connections.+
collect(parent, ets=None, uri=None, userEvent=None, x__xgafv=None)
+ Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly. + +Args: + parent: string, Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. (required) + ets: string, The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes. + uri: string, 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. + userEvent: string, Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # 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. + "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. + "data": "A String", # The HTTP request/response body as raw binary. + "extensions": [ # Application specific response metadata. Must be set in the first response for streaming APIs. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], +}+
import_(parent, body=None, x__xgafv=None)
+ Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata. + +Args: + parent: string, Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}` (required) + body: object, The request body. + The object takes the form of: + +{ # Request message for the ImportUserEvents request. + "bigquerySource": { # BigQuery source import data from. # BigQuery input source. + "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `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. + "datasetId": "A String", # Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters. + "gcsStagingDir": "A String", # 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. + "partitionDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. + "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. + "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. + "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. + }, + "projectId": "A String", # The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request. + "tableId": "A String", # Required. The BigQuery table to copy the data from with a length limit of 1,024 characters. + }, + "errorConfig": { # Configuration of destination for Import related errors. # The desired location of errors incurred during the Import. Cannot be set for inline user event imports. + "gcsPrefix": "A String", # 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. + }, + "gcsSource": { # Cloud Storage location for input content. # Cloud Storage location for the input content. + "dataSchema": "A String", # The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must 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 even imports: * `user_event` (default): One JSON UserEvent per line. + "inputUris": [ # Required. Cloud Storage URIs to input files. 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 String", + ], + }, + "inlineSource": { # The inline source for the input config for ImportUserEvents method. # The Inline source for the input content for UserEvents. + "userEvents": [ # Required. A list of user events to import. Recommended max of 10k items. + { # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. + }, + ], + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
write(parent, body=None, x__xgafv=None)
+ Writes a single user event. + +Args: + parent: string, 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 across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required) + body: object, The request body. + The object takes the form of: + +{ # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. +}+
+ collections()
+
Returns the collections Resource.
+ +
+ dataStores()
+
Returns the dataStores Resource.
+ +
+ operations()
+
Returns the operations Resource.
+ +
+ userEvents()
+
Returns the userEvents Resource.
+ +
+ close()
Close httplib2 connections.
+close()
+ Close httplib2 connections.+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ write(parent, body=None, x__xgafv=None)
Writes a single user event.
+close()
+ Close httplib2 connections.+
write(parent, body=None, x__xgafv=None)
+ Writes a single user event. + +Args: + parent: string, 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 across multiple DataStore, the format is: `projects/{project}/locations/{location}`. (required) + body: object, The request body. + The object takes the form of: + +{ # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with customers' website. + "attributes": { # 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. + "a_key": { # A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent. + "numbers": [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + 3.14, + ], + "text": [ # 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 or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned. + "A String", + ], + }, + }, + "attributionToken": "A String", # Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field. + "completionInfo": { # Detailed completion information including completion attribution token and clicked completion info. # 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. + "selectedPosition": 42, # End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + "selectedSuggestion": "A String", # End user selected CompleteQueryResponse.QuerySuggestion.suggestion. + }, + "directUserRequest": True or False, # Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent. + "documents": [ # List of Documents 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 is desired. + { # Detailed document information associated with a user event. + "id": "A String", # The Document resource ID. + "name": "A String", # 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}` + "promotionIds": [ # The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID. + "A String", + ], + "quantity": 42, # Quantity of the Document associated with the user event. Defaults to 1. For example, this field will be 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` + "uri": "A String", # The Document URI - only allowed for website data stores. + }, + ], + "eventTime": "A String", # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened. + "eventType": "A String", # Required. User event type. Allowed values are: 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 Retail-related values: * `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. + "filter": "A String", # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + "mediaInfo": { # Media-specific user event information. # Media-specific info. + "mediaProgressDuration": "A String", # 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. + "mediaProgressPercentage": 3.14, # Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset. + }, + "pageInfo": { # Detailed page information. # Page metadata such as categories and other critical information for certain event types such as `view-category-page`. + "pageCategory": "A String", # The most specific category associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `"pageCategory" : "Sales > 2017 Black Friday Deals"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "pageviewId": "A String", # 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. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. + "referrerUri": "A String", # 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. + "uri": "A String", # 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. + }, + "panel": { # Detailed panel information associated with a user event. # Panel metadata associated with this user event. + "displayName": "A String", # The display name of the panel. + "panelId": "A String", # Required. The panel ID. + "panelPosition": 42, # The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set. + "totalPanels": 42, # The total number of panels, including this one, shown to the user. Must be set if panel_position is set. + }, + "promotionIds": [ # The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID. + "A String", + ], + "searchInfo": { # Detailed search information. # SearchService.Search details related to the event. This field should be set for `search` event. + "offset": 42, # 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 for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned. + "orderBy": "A String", # The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `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. + "searchQuery": "A String", # The user's search query. See 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. At least one of 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. + }, + "sessionId": "A String", # 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 as prefix. + "tagIds": [ # 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 on the customer end. + "A String", + ], + "transactionInfo": { # A transaction represents the entire purchase transaction. # The transaction metadata (if any) associated with this user event. + "cost": 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost + "currency": "A String", # Required. Currency code. Use three-character ISO-4217 code. + "discountValue": 3.14, # The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost + "tax": 3.14, # All the taxes associated with the transaction. + "transactionId": "A String", # The transaction ID with a length limit of 128 characters. + "value": 3.14, # 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. + }, + "userInfo": { # Information of an end user. # Information about the end user. + "userAgent": "A String", # 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. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set. + "userId": "A String", # 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. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + }, + "userPseudoId": "A String", # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field. +}+
+ close()
Close httplib2 connections.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
Close httplib2 connections.
+ +Gets a Project. Returns NOT_FOUND when the project is not yet created.
+
+ provision(name, body=None, x__xgafv=None)
Provisions the project resource. During the process, related systems will get prepared and initialized. Caller must read the [Terms for data use](https://cloud.google.com/retail/data-use-terms), and optionally specify in request to provide consent to that service terms.
+
+ reportConsentChange(project, body=None, x__xgafv=None)
Updates service terms for this project. This method can be used to retroactively accept the latest terms. Terms available for update: * [Terms for data use](https://cloud.google.com/retail/data-use-terms)
close()
Close httplib2 connections.
get(name, x__xgafv=None)
+ Gets a Project. Returns NOT_FOUND when the project is not yet created. + +Args: + name: string, Required. Full resource name of a Project, such as `projects/{project_id_or_number}`. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Metadata and configurations for a Google Cloud project in the service. + "createTime": "A String", # Output only. The timestamp when this project is created. + "name": "A String", # 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. + "provisionCompletionTime": "A String", # Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use. + "serviceTermsMap": { # Output only. A map of terms of services. The key is the `id` of ServiceTerms. + "a_key": { # Metadata about the terms of service. + "acceptTime": "A String", # The last time when the project agreed to the terms of service. + "declineTime": "A String", # The last time when the project declined or revoked the agreement to terms of service. + "id": "A String", # The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`. + "state": "A String", # Whether the project has accepted/rejected the service terms or it is still pending. + "version": "A String", # The version string of the terms of service. For acceptable values, see the comments for id above. + }, + }, +}+
provision(name, body=None, x__xgafv=None)
+ Provisions the project resource. During the process, related systems will get prepared and initialized. Caller must read the [Terms for data use](https://cloud.google.com/retail/data-use-terms), and optionally specify in request to provide consent to that service terms. + +Args: + name: string, Required. Full resource name of a Project, such as `projects/{project_id_or_number}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request for ProjectService.ProvisionProject method. + "acceptDataUseTerms": True or False, # Required. Set to `true` to specify that caller has read and would like to give consent to the [Terms for data use](https://cloud.google.com/retail/data-use-terms). + "dataUseTermsVersion": "A String", # Required. The version of the [Terms for data use](https://cloud.google.com/retail/data-use-terms) that caller has read and would like to give consent to. Acceptable version is `2022-11-23`, and this may change over time. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
reportConsentChange(project, body=None, x__xgafv=None)
+ Updates service terms for this project. This method can be used to retroactively accept the latest terms. Terms available for update: * [Terms for data use](https://cloud.google.com/retail/data-use-terms) + +Args: + project: string, Required. Full resource name of a Project, such as `projects/{project_id_or_number}`. (required) + body: object, The request body. + The object takes the form of: + +{ # Request for ReportConsentChange method. + "consentChangeAction": "A String", # Required. Whether customer decides to accept or decline service term. At this moment, only accept action is supported. + "serviceTermId": "A String", # Required. The unique identifier of the terms of service to update. Available term ids: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this service term id, the acceptable service_term_version to provide is `2022-11-23`. + "serviceTermVersion": "A String", # Required. The version string of the terms of service to update. +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Metadata and configurations for a Google Cloud project in the service. + "createTime": "A String", # Output only. The timestamp when this project is created. + "name": "A String", # 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. + "provisionCompletionTime": "A String", # Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use. + "serviceTermsMap": { # Output only. A map of terms of services. The key is the `id` of ServiceTerms. + "a_key": { # Metadata about the terms of service. + "acceptTime": "A String", # The last time when the project agreed to the terms of service. + "declineTime": "A String", # The last time when the project declined or revoked the agreement to terms of service. + "id": "A String", # The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`. + "state": "A String", # Whether the project has accepted/rejected the service terms or it is still pending. + "version": "A String", # The version string of the terms of service. For acceptable values, see the comments for id above. + }, + }, +}+