Skip to content

Commit 785c08b

Browse files
feat: [retail] add analytics service (#4975)
* feat: add analytics service PiperOrigin-RevId: 599976565 Source-Link: googleapis/googleapis@3d20b39 Source-Link: googleapis/googleapis-gen@f916ef8 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiZjkxNmVmODY1ZjhhYjg1Y2NmNTBkMTBhNjQ0ZTQzNTYzODljODdjYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add analytics service PiperOrigin-RevId: 600040070 Source-Link: googleapis/googleapis@f4efe4b Source-Link: googleapis/googleapis-gen@2154296 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJldGFpbC8uT3dsQm90LnlhbWwiLCJoIjoiMjE1NDI5NmRkNzFjMDBiYjgwNWIzZDFlOWI5YjcxNTczOTE0NTYyMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Denis DelGrosso <[email protected]>
1 parent 529d1d8 commit 785c08b

49 files changed

Lines changed: 62090 additions & 51650 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-retail/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
137137
| User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js,packages/google-cloud-retail/samples/README.md) |
138138
| User_event_service.rejoin_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js,packages/google-cloud-retail/samples/README.md) |
139139
| User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js,packages/google-cloud-retail/samples/README.md) |
140+
| Analytics_service.export_analytics_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/analytics_service.export_analytics_metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/analytics_service.export_analytics_metrics.js,packages/google-cloud-retail/samples/README.md) |
140141
| Catalog_service.add_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js,packages/google-cloud-retail/samples/README.md) |
141142
| Catalog_service.batch_remove_catalog_attributes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.batch_remove_catalog_attributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.batch_remove_catalog_attributes.js,packages/google-cloud-retail/samples/README.md) |
142143
| Catalog_service.get_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_attributes_config.js,packages/google-cloud-retail/samples/README.md) |
@@ -193,6 +194,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
193194
| User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js,packages/google-cloud-retail/samples/README.md) |
194195
| User_event_service.rejoin_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js,packages/google-cloud-retail/samples/README.md) |
195196
| User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js,packages/google-cloud-retail/samples/README.md) |
197+
| Analytics_service.export_analytics_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/analytics_service.export_analytics_metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/analytics_service.export_analytics_metrics.js,packages/google-cloud-retail/samples/README.md) |
196198
| Catalog_service.add_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.add_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.add_catalog_attribute.js,packages/google-cloud-retail/samples/README.md) |
197199
| Catalog_service.batch_remove_catalog_attributes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js,packages/google-cloud-retail/samples/README.md) |
198200
| Catalog_service.get_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_attributes_config.js,packages/google-cloud-retail/samples/README.md) |
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Copyright 2021 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.retail.v2alpha;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
23+
import "google/cloud/retail/v2alpha/export_config.proto";
24+
import "google/longrunning/operations.proto";
25+
26+
option csharp_namespace = "Google.Cloud.Retail.V2Alpha";
27+
option go_package = "cloud.google.com/go/retail/apiv2alpha/retailpb;retailpb";
28+
option java_multiple_files = true;
29+
option java_outer_classname = "AnalyticsServiceProto";
30+
option java_package = "com.google.cloud.retail.v2alpha";
31+
option objc_class_prefix = "RETAIL";
32+
option php_namespace = "Google\\Cloud\\Retail\\V2alpha";
33+
option ruby_package = "Google::Cloud::Retail::V2alpha";
34+
35+
// Service for managing & accessing retail search business metric.
36+
// Retail recommendation business metric is currently not available.
37+
service AnalyticsService {
38+
option (google.api.default_host) = "retail.googleapis.com";
39+
option (google.api.oauth_scopes) =
40+
"https://www.googleapis.com/auth/cloud-platform";
41+
42+
// Exports analytics metrics.
43+
//
44+
// `Operation.response` is of type `ExportAnalyticsMetricsResponse`.
45+
// `Operation.metadata` is of type `ExportMetadata`.
46+
rpc ExportAnalyticsMetrics(ExportAnalyticsMetricsRequest)
47+
returns (google.longrunning.Operation) {
48+
option (google.api.http) = {
49+
post: "/v2alpha/{catalog=projects/*/locations/*/catalogs/*}:exportAnalyticsMetrics"
50+
body: "*"
51+
};
52+
option (google.longrunning.operation_info) = {
53+
response_type: "google.cloud.retail.v2alpha.ExportAnalyticsMetricsResponse"
54+
metadata_type: "google.cloud.retail.v2alpha.ExportMetadata"
55+
};
56+
}
57+
}

packages/google-cloud-retail/protos/google/cloud/retail/v2alpha/export_config.proto

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,45 @@ option objc_class_prefix = "RETAIL";
3030
option php_namespace = "Google\\Cloud\\Retail\\V2alpha";
3131
option ruby_package = "Google::Cloud::Retail::V2alpha";
3232

33+
// The output configuration setting.
34+
message OutputConfig {
35+
// The Google Cloud Storage output destination configuration.
36+
message GcsDestination {
37+
// Required. The output uri prefix for saving output data to json files.
38+
// Some mapping examples are as follows:
39+
// output_uri_prefix sample output(assuming the object is foo.json)
40+
// ======================== =============================================
41+
// gs://bucket/ gs://bucket/foo.json
42+
// gs://bucket/folder/ gs://bucket/folder/foo.json
43+
// gs://bucket/folder/item_ gs://bucket/folder/item_foo.json
44+
string output_uri_prefix = 1 [(google.api.field_behavior) = REQUIRED];
45+
}
46+
47+
// The BigQuery output destination configuration.
48+
message BigQueryDestination {
49+
// Required. The ID of a BigQuery Dataset.
50+
string dataset_id = 1 [(google.api.field_behavior) = REQUIRED];
51+
52+
// Required. The prefix of exported BigQuery tables.
53+
string table_id_prefix = 2 [(google.api.field_behavior) = REQUIRED];
54+
55+
// Required. Describes the table type. The following values are supported:
56+
//
57+
// * `table`: A BigQuery native table.
58+
// * `view`: A virtual table defined by a SQL query.
59+
string table_type = 3 [(google.api.field_behavior) = REQUIRED];
60+
}
61+
62+
// The configuration of destination for holding output data.
63+
oneof destination {
64+
// The Google Cloud Storage location where the output is to be written to.
65+
GcsDestination gcs_destination = 1;
66+
67+
// The BigQuery location where the output is to be written to.
68+
BigQueryDestination bigquery_destination = 2;
69+
}
70+
}
71+
3372
// Configuration of destination for Export related errors.
3473
message ExportErrorsConfig {
3574
// Required. Errors destination.
@@ -42,6 +81,35 @@ message ExportErrorsConfig {
4281
}
4382
}
4483

84+
// Request message for the `ExportAnalyticsMetrics` method.
85+
message ExportAnalyticsMetricsRequest {
86+
// Required. Full resource name of the parent catalog.
87+
// Expected format: `projects/*/locations/*/catalogs/*`
88+
string catalog = 1 [(google.api.field_behavior) = REQUIRED];
89+
90+
// Required. The output location of the data.
91+
OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED];
92+
93+
// A filtering expression to specify restrictions on returned metrics.
94+
// The expression is a sequence of terms. Each term applies a restriction to
95+
// the returned metrics. Use this expression to restrict results to a
96+
// specific time range.
97+
//
98+
// Currently we expect only one types of fields:
99+
//
100+
// * `timestamp`: This can be specified twice, once with a
101+
// less than operator and once with a greater than operator. The
102+
// `timestamp` restriction should result in one, contiguous, valid,
103+
// `timestamp` range.
104+
//
105+
// Some examples of valid filters expressions:
106+
//
107+
// * Example 1: `timestamp > "2012-04-23T18:25:43.511Z"
108+
// timestamp < "2012-04-23T18:30:43.511Z"`
109+
// * Example 2: `timestamp > "2012-04-23T18:25:43.511Z"`
110+
string filter = 3;
111+
}
112+
45113
// Metadata related to the progress of the Export operation. This is
46114
// returned by the google.longrunning.Operation.metadata field.
47115
message ExportMetadata {
@@ -81,6 +149,20 @@ message ExportUserEventsResponse {
81149
OutputResult output_result = 3;
82150
}
83151

152+
// Response of the ExportAnalyticsMetricsRequest. If the long running
153+
// operation was successful, then this message is returned by the
154+
// google.longrunning.Operations.response field if the operation was successful.
155+
message ExportAnalyticsMetricsResponse {
156+
// A sample of errors encountered while processing the request.
157+
repeated google.rpc.Status error_samples = 1;
158+
159+
// This field is never set.
160+
ExportErrorsConfig errors_config = 2;
161+
162+
// Output result indicating where the data were exported to.
163+
OutputResult output_result = 3;
164+
}
165+
84166
// Output result that stores the information about where the exported data is
85167
// stored.
86168
message OutputResult {
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Copyright 2021 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.retail.v2beta;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
23+
import "google/cloud/retail/v2beta/export_config.proto";
24+
import "google/longrunning/operations.proto";
25+
26+
option csharp_namespace = "Google.Cloud.Retail.V2Beta";
27+
option go_package = "cloud.google.com/go/retail/apiv2beta/retailpb;retailpb";
28+
option java_multiple_files = true;
29+
option java_outer_classname = "AnalyticsServiceProto";
30+
option java_package = "com.google.cloud.retail.v2beta";
31+
option objc_class_prefix = "RETAIL";
32+
option php_namespace = "Google\\Cloud\\Retail\\V2beta";
33+
option ruby_package = "Google::Cloud::Retail::V2beta";
34+
35+
// Service for managing & accessing retail search business metric.
36+
// Retail recommendation business metric is currently not available.
37+
service AnalyticsService {
38+
option (google.api.default_host) = "retail.googleapis.com";
39+
option (google.api.oauth_scopes) =
40+
"https://www.googleapis.com/auth/cloud-platform";
41+
42+
// Exports analytics metrics.
43+
//
44+
// `Operation.response` is of type `ExportAnalyticsMetricsResponse`.
45+
// `Operation.metadata` is of type `ExportMetadata`.
46+
rpc ExportAnalyticsMetrics(ExportAnalyticsMetricsRequest)
47+
returns (google.longrunning.Operation) {
48+
option (google.api.http) = {
49+
post: "/v2beta/{catalog=projects/*/locations/*/catalogs/*}:exportAnalyticsMetrics"
50+
body: "*"
51+
};
52+
option (google.longrunning.operation_info) = {
53+
response_type: "google.cloud.retail.v2beta.ExportAnalyticsMetricsResponse"
54+
metadata_type: "google.cloud.retail.v2beta.ExportMetadata"
55+
};
56+
}
57+
}

0 commit comments

Comments
 (0)