From e01a97afee104c9e115bb8692c404f75402b15ac Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Thu, 25 Jul 2024 14:10:28 +0000 Subject: [PATCH] feat(retail): update the api #### retail:v2alpha The following keys were added: - resources.projects.resources.locations.resources.catalogs.resources.userEvents.methods.export (Total Keys: 12) - schemas.GoogleCloudRetailV2alphaExportUserEventsRequest (Total Keys: 4) #### retail:v2beta The following keys were added: - resources.projects.resources.locations.resources.catalogs.resources.userEvents.methods.export (Total Keys: 12) - schemas.GoogleCloudRetailV2betaExportUserEventsRequest (Total Keys: 4) --- ...rojects.locations.catalogs.userEvents.html | 55 +++++++++++++++++++ ...rojects.locations.catalogs.userEvents.html | 55 +++++++++++++++++++ .../documents/retail.v2alpha.json | 45 ++++++++++++++- .../documents/retail.v2beta.json | 45 ++++++++++++++- 4 files changed, 198 insertions(+), 2 deletions(-) diff --git a/docs/dyn/retail_v2alpha.projects.locations.catalogs.userEvents.html b/docs/dyn/retail_v2alpha.projects.locations.catalogs.userEvents.html index 0154f88c249..83c5280d19d 100644 --- a/docs/dyn/retail_v2alpha.projects.locations.catalogs.userEvents.html +++ b/docs/dyn/retail_v2alpha.projects.locations.catalogs.userEvents.html @@ -80,6 +80,9 @@

Instance Methods

collect(parent, ets=None, prebuiltRule=None, rawJson=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 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.

+

+ export(parent, body=None, x__xgafv=None)

+

Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.

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`.

@@ -128,6 +131,58 @@

Method Details

} +
+ export(parent, body=None, x__xgafv=None) +
Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.
+
+Args:
+  parent: string, Required. Resource name of a Catalog. For example `projects/1234/locations/global/catalogs/default_catalog` (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for the `ExportUserEvents` method.
+  "filter": "A String", # A filtering expression to specify restrictions on returned events. The expression is a sequence of terms. Each term applies a restriction to the returned user events. Use this expression to restrict results to a specific time range or to filter events by eventType. For example, `eventTime > "2012-04-23T18:25:43.511Z" eventsMissingCatalogItems eventTime<"2012-04-23T18:25:43.511Z" eventType=search` We expect only three types of fields: * `eventTime`: This can be specified twice, once with a less than operator and once with a greater than operator. The `eventTime` restriction should result in one, contiguous, valid, `eventTime` range. * `eventType`: Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses and the operators are separated from the tag values by a space. * `eventsMissingCatalogItems`: This restricts results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: `eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"` * Example 2: `eventTime > "2012-04-23T18:25:43.511Z" eventType = detail-page-view` * Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime < "2018-04-23T18:30:43.511Z"` * Example 4: `eventTime > "2012-04-23T18:25:43.511Z"` * Example 5: `eventType = (detail-page-view OR search)` * Example 6: `eventsMissingCatalogItems`
+  "outputConfig": { # The output configuration setting. # Required. The output location of the data.
+    "bigqueryDestination": { # The BigQuery output destination configuration. # The BigQuery location where the output is to be written to.
+      "datasetId": "A String", # Required. The ID of a BigQuery Dataset.
+      "tableIdPrefix": "A String", # Required. The prefix of exported BigQuery tables.
+      "tableType": "A String", # Required. Describes the table type. The following values are supported: * `table`: A BigQuery native table. * `view`: A virtual table defined by a SQL query.
+    },
+    "gcsDestination": { # The Google Cloud Storage output destination configuration. # The Google Cloud Storage location where the output is to be written to.
+      "outputUriPrefix": "A String", # Required. The output uri prefix for saving output data to json files. Some mapping examples are as follows: output_uri_prefix sample output(assuming the object is foo.json) ======================== ============================================= gs://bucket/ gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json gs://bucket/folder/item_ gs://bucket/folder/item_foo.json
+    },
+  },
+}
+
+  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.
+  },
+}
+
+
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`.
diff --git a/docs/dyn/retail_v2beta.projects.locations.catalogs.userEvents.html b/docs/dyn/retail_v2beta.projects.locations.catalogs.userEvents.html
index ff43faa6812..b9a1903e4be 100644
--- a/docs/dyn/retail_v2beta.projects.locations.catalogs.userEvents.html
+++ b/docs/dyn/retail_v2beta.projects.locations.catalogs.userEvents.html
@@ -80,6 +80,9 @@ 

Instance Methods

collect(parent, ets=None, prebuiltRule=None, rawJson=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 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.

+

+ export(parent, body=None, x__xgafv=None)

+

Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.

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`.

@@ -128,6 +131,58 @@

Method Details

}
+
+ export(parent, body=None, x__xgafv=None) +
Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.
+
+Args:
+  parent: string, Required. Resource name of a Catalog. For example `projects/1234/locations/global/catalogs/default_catalog` (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request message for the `ExportUserEvents` method.
+  "filter": "A String", # A filtering expression to specify restrictions on returned events. The expression is a sequence of terms. Each term applies a restriction to the returned user events. Use this expression to restrict results to a specific time range or to filter events by eventType. For example, `eventTime > "2012-04-23T18:25:43.511Z" eventsMissingCatalogItems eventTime<"2012-04-23T18:25:43.511Z" eventType=search` We expect only three types of fields: * `eventTime`: This can be specified twice, once with a less than operator and once with a greater than operator. The `eventTime` restriction should result in one, contiguous, valid, `eventTime` range. * `eventType`: Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses and the operators are separated from the tag values by a space. * `eventsMissingCatalogItems`: This restricts results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: `eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"` * Example 2: `eventTime > "2012-04-23T18:25:43.511Z" eventType = detail-page-view` * Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime < "2018-04-23T18:30:43.511Z"` * Example 4: `eventTime > "2012-04-23T18:25:43.511Z"` * Example 5: `eventType = (detail-page-view OR search)` * Example 6: `eventsMissingCatalogItems`
+  "outputConfig": { # The output configuration setting. # Required. The output location of the data.
+    "bigqueryDestination": { # The BigQuery output destination configuration. # The BigQuery location where the output is to be written to.
+      "datasetId": "A String", # Required. The ID of a BigQuery Dataset.
+      "tableIdPrefix": "A String", # Required. The prefix of exported BigQuery tables.
+      "tableType": "A String", # Required. Describes the table type. The following values are supported: * `table`: A BigQuery native table. * `view`: A virtual table defined by a SQL query.
+    },
+    "gcsDestination": { # The Google Cloud Storage output destination configuration. # The Google Cloud Storage location where the output is to be written to.
+      "outputUriPrefix": "A String", # Required. The output uri prefix for saving output data to json files. Some mapping examples are as follows: output_uri_prefix sample output(assuming the object is foo.json) ======================== ============================================= gs://bucket/ gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json gs://bucket/folder/item_ gs://bucket/folder/item_foo.json
+    },
+  },
+}
+
+  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.
+  },
+}
+
+
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`.
diff --git a/googleapiclient/discovery_cache/documents/retail.v2alpha.json b/googleapiclient/discovery_cache/documents/retail.v2alpha.json
index 6dfefb6f379..3325597cd47 100644
--- a/googleapiclient/discovery_cache/documents/retail.v2alpha.json
+++ b/googleapiclient/discovery_cache/documents/retail.v2alpha.json
@@ -2259,6 +2259,34 @@
 "https://www.googleapis.com/auth/cloud-platform"
 ]
 },
+"export": {
+"description": "Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.",
+"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:export",
+"httpMethod": "POST",
+"id": "retail.projects.locations.catalogs.userEvents.export",
+"parameterOrder": [
+"parent"
+],
+"parameters": {
+"parent": {
+"description": "Required. Resource name of a Catalog. For example `projects/1234/locations/global/catalogs/default_catalog`",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v2alpha/{+parent}/userEvents:export",
+"request": {
+"$ref": "GoogleCloudRetailV2alphaExportUserEventsRequest"
+},
+"response": {
+"$ref": "GoogleLongrunningOperation"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
+},
 "import": {
 "description": "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`.",
 "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:import",
@@ -2557,7 +2585,7 @@
 }
 }
 },
-"revision": "20240702",
+"revision": "20240711",
 "rootUrl": "https://retail.googleapis.com/",
 "schemas": {
 "GoogleApiHttpBody": {
@@ -4483,6 +4511,21 @@
 },
 "type": "object"
 },
+"GoogleCloudRetailV2alphaExportUserEventsRequest": {
+"description": "Request message for the `ExportUserEvents` method.",
+"id": "GoogleCloudRetailV2alphaExportUserEventsRequest",
+"properties": {
+"filter": {
+"description": "A filtering expression to specify restrictions on returned events. The expression is a sequence of terms. Each term applies a restriction to the returned user events. Use this expression to restrict results to a specific time range or to filter events by eventType. For example, `eventTime > \"2012-04-23T18:25:43.511Z\" eventsMissingCatalogItems eventTime<\"2012-04-23T18:25:43.511Z\" eventType=search` We expect only three types of fields: * `eventTime`: This can be specified twice, once with a less than operator and once with a greater than operator. The `eventTime` restriction should result in one, contiguous, valid, `eventTime` range. * `eventType`: Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses and the operators are separated from the tag values by a space. * `eventsMissingCatalogItems`: This restricts results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: `eventTime > \"2012-04-23T18:25:43.511Z\" eventTime < \"2012-04-23T18:30:43.511Z\"` * Example 2: `eventTime > \"2012-04-23T18:25:43.511Z\" eventType = detail-page-view` * Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime < \"2018-04-23T18:30:43.511Z\"` * Example 4: `eventTime > \"2012-04-23T18:25:43.511Z\"` * Example 5: `eventType = (detail-page-view OR search)` * Example 6: `eventsMissingCatalogItems`",
+"type": "string"
+},
+"outputConfig": {
+"$ref": "GoogleCloudRetailV2alphaOutputConfig",
+"description": "Required. The output location of the data."
+}
+},
+"type": "object"
+},
 "GoogleCloudRetailV2alphaExportUserEventsResponse": {
 "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.",
 "id": "GoogleCloudRetailV2alphaExportUserEventsResponse",
diff --git a/googleapiclient/discovery_cache/documents/retail.v2beta.json b/googleapiclient/discovery_cache/documents/retail.v2beta.json
index 9658a0902e2..834fda6071e 100644
--- a/googleapiclient/discovery_cache/documents/retail.v2beta.json
+++ b/googleapiclient/discovery_cache/documents/retail.v2beta.json
@@ -1854,6 +1854,34 @@
 "https://www.googleapis.com/auth/cloud-platform"
 ]
 },
+"export": {
+"description": "Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.",
+"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:export",
+"httpMethod": "POST",
+"id": "retail.projects.locations.catalogs.userEvents.export",
+"parameterOrder": [
+"parent"
+],
+"parameters": {
+"parent": {
+"description": "Required. Resource name of a Catalog. For example `projects/1234/locations/global/catalogs/default_catalog`",
+"location": "path",
+"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$",
+"required": true,
+"type": "string"
+}
+},
+"path": "v2beta/{+parent}/userEvents:export",
+"request": {
+"$ref": "GoogleCloudRetailV2betaExportUserEventsRequest"
+},
+"response": {
+"$ref": "GoogleLongrunningOperation"
+},
+"scopes": [
+"https://www.googleapis.com/auth/cloud-platform"
+]
+},
 "import": {
 "description": "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`.",
 "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:import",
@@ -2120,7 +2148,7 @@
 }
 }
 },
-"revision": "20240702",
+"revision": "20240711",
 "rootUrl": "https://retail.googleapis.com/",
 "schemas": {
 "GoogleApiHttpBody": {
@@ -4606,6 +4634,21 @@
 },
 "type": "object"
 },
+"GoogleCloudRetailV2betaExportUserEventsRequest": {
+"description": "Request message for the `ExportUserEvents` method.",
+"id": "GoogleCloudRetailV2betaExportUserEventsRequest",
+"properties": {
+"filter": {
+"description": "A filtering expression to specify restrictions on returned events. The expression is a sequence of terms. Each term applies a restriction to the returned user events. Use this expression to restrict results to a specific time range or to filter events by eventType. For example, `eventTime > \"2012-04-23T18:25:43.511Z\" eventsMissingCatalogItems eventTime<\"2012-04-23T18:25:43.511Z\" eventType=search` We expect only three types of fields: * `eventTime`: This can be specified twice, once with a less than operator and once with a greater than operator. The `eventTime` restriction should result in one, contiguous, valid, `eventTime` range. * `eventType`: Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses and the operators are separated from the tag values by a space. * `eventsMissingCatalogItems`: This restricts results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: `eventTime > \"2012-04-23T18:25:43.511Z\" eventTime < \"2012-04-23T18:30:43.511Z\"` * Example 2: `eventTime > \"2012-04-23T18:25:43.511Z\" eventType = detail-page-view` * Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime < \"2018-04-23T18:30:43.511Z\"` * Example 4: `eventTime > \"2012-04-23T18:25:43.511Z\"` * Example 5: `eventType = (detail-page-view OR search)` * Example 6: `eventsMissingCatalogItems`",
+"type": "string"
+},
+"outputConfig": {
+"$ref": "GoogleCloudRetailV2betaOutputConfig",
+"description": "Required. The output location of the data."
+}
+},
+"type": "object"
+},
 "GoogleCloudRetailV2betaExportUserEventsResponse": {
 "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.",
 "id": "GoogleCloudRetailV2betaExportUserEventsResponse",