google-cloud-retail-v2 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/retail/v2/catalog_pb.rb +55 -0
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +718 -0
- data/lib/google/cloud/retail/v2/catalog_service/paths.rb +38 -0
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +34 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +38 -0
- data/lib/google/cloud/retail/v2/common_pb.rb +86 -0
- data/lib/google/cloud/retail/v2/completion_service/client.rb +4 -3
- data/lib/google/cloud/retail/v2/control_pb.rb +33 -0
- data/lib/google/cloud/retail/v2/control_service/client.rb +807 -0
- data/lib/google/cloud/retail/v2/control_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/control_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/control_service.rb +49 -0
- data/lib/google/cloud/retail/v2/control_service_pb.rb +57 -0
- data/lib/google/cloud/retail/v2/control_service_services_pb.rb +65 -0
- data/lib/google/cloud/retail/v2/prediction_service_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/product_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +42 -12
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +35 -0
- data/lib/google/cloud/retail/v2/search_service/client.rb +12 -1
- data/lib/google/cloud/retail/v2/search_service_pb.rb +1 -0
- data/lib/google/cloud/retail/v2/serving_config_pb.rb +44 -0
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +998 -0
- data/lib/google/cloud/retail/v2/serving_config_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/serving_config_service/paths.rb +73 -0
- data/lib/google/cloud/retail/v2/serving_config_service.rb +49 -0
- data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +66 -0
- data/lib/google/cloud/retail/v2/serving_config_service_services_pb.rb +74 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +2 -2
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +0 -1
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +2 -2
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/lib/google/cloud/retail/v2.rb +2 -0
- data/proto_docs/google/cloud/retail/v2/catalog.rb +233 -0
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +133 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +314 -4
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +2 -1
- data/proto_docs/google/cloud/retail/v2/control.rb +76 -0
- data/proto_docs/google/cloud/retail/v2/control_service.rb +122 -0
- data/proto_docs/google/cloud/retail/v2/import_config.rb +20 -35
- data/proto_docs/google/cloud/retail/v2/product.rb +7 -1
- data/proto_docs/google/cloud/retail/v2/search_service.rb +29 -2
- data/proto_docs/google/cloud/retail/v2/serving_config.rb +238 -0
- data/proto_docs/google/cloud/retail/v2/serving_config_service.rb +143 -0
- metadata +20 -2
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2022 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "googleauth"
|
|
20
|
+
|
|
21
|
+
module Google
|
|
22
|
+
module Cloud
|
|
23
|
+
module Retail
|
|
24
|
+
module V2
|
|
25
|
+
module ServingConfigService
|
|
26
|
+
# Credentials for the ServingConfigService API.
|
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
|
28
|
+
self.scope = [
|
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform"
|
|
30
|
+
]
|
|
31
|
+
self.env_vars = [
|
|
32
|
+
"RETAIL_CREDENTIALS",
|
|
33
|
+
"RETAIL_KEYFILE",
|
|
34
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
|
35
|
+
"GOOGLE_CLOUD_KEYFILE",
|
|
36
|
+
"GCLOUD_KEYFILE",
|
|
37
|
+
"RETAIL_CREDENTIALS_JSON",
|
|
38
|
+
"RETAIL_KEYFILE_JSON",
|
|
39
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
|
40
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
|
41
|
+
"GCLOUD_KEYFILE_JSON"
|
|
42
|
+
]
|
|
43
|
+
self.paths = [
|
|
44
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
|
45
|
+
]
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2022 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Cloud
|
|
22
|
+
module Retail
|
|
23
|
+
module V2
|
|
24
|
+
module ServingConfigService
|
|
25
|
+
# Path helper methods for the ServingConfigService API.
|
|
26
|
+
module Paths
|
|
27
|
+
##
|
|
28
|
+
# Create a fully-qualified Catalog resource string.
|
|
29
|
+
#
|
|
30
|
+
# The resource will be in the following format:
|
|
31
|
+
#
|
|
32
|
+
# `projects/{project}/locations/{location}/catalogs/{catalog}`
|
|
33
|
+
#
|
|
34
|
+
# @param project [String]
|
|
35
|
+
# @param location [String]
|
|
36
|
+
# @param catalog [String]
|
|
37
|
+
#
|
|
38
|
+
# @return [::String]
|
|
39
|
+
def catalog_path project:, location:, catalog:
|
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
42
|
+
|
|
43
|
+
"projects/#{project}/locations/#{location}/catalogs/#{catalog}"
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Create a fully-qualified ServingConfig resource string.
|
|
48
|
+
#
|
|
49
|
+
# The resource will be in the following format:
|
|
50
|
+
#
|
|
51
|
+
# `projects/{project}/locations/{location}/catalogs/{catalog}/servingConfigs/{serving_config}`
|
|
52
|
+
#
|
|
53
|
+
# @param project [String]
|
|
54
|
+
# @param location [String]
|
|
55
|
+
# @param catalog [String]
|
|
56
|
+
# @param serving_config [String]
|
|
57
|
+
#
|
|
58
|
+
# @return [::String]
|
|
59
|
+
def serving_config_path project:, location:, catalog:, serving_config:
|
|
60
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
61
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
62
|
+
raise ::ArgumentError, "catalog cannot contain /" if catalog.to_s.include? "/"
|
|
63
|
+
|
|
64
|
+
"projects/#{project}/locations/#{location}/catalogs/#{catalog}/servingConfigs/#{serving_config}"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
extend self
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2022 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "gapic/common"
|
|
20
|
+
require "gapic/config"
|
|
21
|
+
require "gapic/config/method"
|
|
22
|
+
|
|
23
|
+
require "google/cloud/retail/v2/version"
|
|
24
|
+
|
|
25
|
+
require "google/cloud/retail/v2/serving_config_service/credentials"
|
|
26
|
+
require "google/cloud/retail/v2/serving_config_service/paths"
|
|
27
|
+
require "google/cloud/retail/v2/serving_config_service/client"
|
|
28
|
+
|
|
29
|
+
module Google
|
|
30
|
+
module Cloud
|
|
31
|
+
module Retail
|
|
32
|
+
module V2
|
|
33
|
+
##
|
|
34
|
+
# Service for modifying ServingConfig.
|
|
35
|
+
#
|
|
36
|
+
# To load this service and instantiate a client:
|
|
37
|
+
#
|
|
38
|
+
# require "google/cloud/retail/v2/serving_config_service"
|
|
39
|
+
# client = ::Google::Cloud::Retail::V2::ServingConfigService::Client.new
|
|
40
|
+
#
|
|
41
|
+
module ServingConfigService
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
helper_path = ::File.join __dir__, "serving_config_service", "helpers.rb"
|
|
49
|
+
require "google/cloud/retail/v2/serving_config_service/helpers" if ::File.file? helper_path
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# source: google/cloud/retail/v2/serving_config_service.proto
|
|
3
|
+
|
|
4
|
+
require 'google/protobuf'
|
|
5
|
+
|
|
6
|
+
require 'google/api/annotations_pb'
|
|
7
|
+
require 'google/api/client_pb'
|
|
8
|
+
require 'google/api/field_behavior_pb'
|
|
9
|
+
require 'google/api/resource_pb'
|
|
10
|
+
require 'google/cloud/retail/v2/serving_config_pb'
|
|
11
|
+
require 'google/protobuf/empty_pb'
|
|
12
|
+
require 'google/protobuf/field_mask_pb'
|
|
13
|
+
|
|
14
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
15
|
+
add_file("google/cloud/retail/v2/serving_config_service.proto", :syntax => :proto3) do
|
|
16
|
+
add_message "google.cloud.retail.v2.CreateServingConfigRequest" do
|
|
17
|
+
optional :parent, :string, 1
|
|
18
|
+
optional :serving_config, :message, 2, "google.cloud.retail.v2.ServingConfig"
|
|
19
|
+
optional :serving_config_id, :string, 3
|
|
20
|
+
end
|
|
21
|
+
add_message "google.cloud.retail.v2.UpdateServingConfigRequest" do
|
|
22
|
+
optional :serving_config, :message, 1, "google.cloud.retail.v2.ServingConfig"
|
|
23
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
|
24
|
+
end
|
|
25
|
+
add_message "google.cloud.retail.v2.DeleteServingConfigRequest" do
|
|
26
|
+
optional :name, :string, 1
|
|
27
|
+
end
|
|
28
|
+
add_message "google.cloud.retail.v2.GetServingConfigRequest" do
|
|
29
|
+
optional :name, :string, 1
|
|
30
|
+
end
|
|
31
|
+
add_message "google.cloud.retail.v2.ListServingConfigsRequest" do
|
|
32
|
+
optional :parent, :string, 1
|
|
33
|
+
optional :page_size, :int32, 2
|
|
34
|
+
optional :page_token, :string, 3
|
|
35
|
+
end
|
|
36
|
+
add_message "google.cloud.retail.v2.ListServingConfigsResponse" do
|
|
37
|
+
repeated :serving_configs, :message, 1, "google.cloud.retail.v2.ServingConfig"
|
|
38
|
+
optional :next_page_token, :string, 2
|
|
39
|
+
end
|
|
40
|
+
add_message "google.cloud.retail.v2.AddControlRequest" do
|
|
41
|
+
optional :serving_config, :string, 1
|
|
42
|
+
optional :control_id, :string, 2
|
|
43
|
+
end
|
|
44
|
+
add_message "google.cloud.retail.v2.RemoveControlRequest" do
|
|
45
|
+
optional :serving_config, :string, 1
|
|
46
|
+
optional :control_id, :string, 2
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
module Google
|
|
52
|
+
module Cloud
|
|
53
|
+
module Retail
|
|
54
|
+
module V2
|
|
55
|
+
CreateServingConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.CreateServingConfigRequest").msgclass
|
|
56
|
+
UpdateServingConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.UpdateServingConfigRequest").msgclass
|
|
57
|
+
DeleteServingConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.DeleteServingConfigRequest").msgclass
|
|
58
|
+
GetServingConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.GetServingConfigRequest").msgclass
|
|
59
|
+
ListServingConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ListServingConfigsRequest").msgclass
|
|
60
|
+
ListServingConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ListServingConfigsResponse").msgclass
|
|
61
|
+
AddControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.AddControlRequest").msgclass
|
|
62
|
+
RemoveControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.RemoveControlRequest").msgclass
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: google/cloud/retail/v2/serving_config_service.proto for package 'Google.Cloud.Retail.V2'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Copyright 2021 Google LLC
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
# you may not use this file except in compliance with the License.
|
|
8
|
+
# You may obtain a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
# See the License for the specific language governing permissions and
|
|
16
|
+
# limitations under the License.
|
|
17
|
+
#
|
|
18
|
+
|
|
19
|
+
require 'grpc'
|
|
20
|
+
require 'google/cloud/retail/v2/serving_config_service_pb'
|
|
21
|
+
|
|
22
|
+
module Google
|
|
23
|
+
module Cloud
|
|
24
|
+
module Retail
|
|
25
|
+
module V2
|
|
26
|
+
module ServingConfigService
|
|
27
|
+
# Service for modifying ServingConfig.
|
|
28
|
+
class Service
|
|
29
|
+
|
|
30
|
+
include ::GRPC::GenericService
|
|
31
|
+
|
|
32
|
+
self.marshal_class_method = :encode
|
|
33
|
+
self.unmarshal_class_method = :decode
|
|
34
|
+
self.service_name = 'google.cloud.retail.v2.ServingConfigService'
|
|
35
|
+
|
|
36
|
+
# Creates a ServingConfig.
|
|
37
|
+
#
|
|
38
|
+
# A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are
|
|
39
|
+
# allowed in a [Catalog][google.cloud.retail.v2.Catalog], otherwise a
|
|
40
|
+
# FAILED_PRECONDITION error is returned.
|
|
41
|
+
rpc :CreateServingConfig, ::Google::Cloud::Retail::V2::CreateServingConfigRequest, ::Google::Cloud::Retail::V2::ServingConfig
|
|
42
|
+
# Deletes a ServingConfig.
|
|
43
|
+
#
|
|
44
|
+
# Returns a NotFound error if the ServingConfig does not exist.
|
|
45
|
+
rpc :DeleteServingConfig, ::Google::Cloud::Retail::V2::DeleteServingConfigRequest, ::Google::Protobuf::Empty
|
|
46
|
+
# Updates a ServingConfig.
|
|
47
|
+
rpc :UpdateServingConfig, ::Google::Cloud::Retail::V2::UpdateServingConfigRequest, ::Google::Cloud::Retail::V2::ServingConfig
|
|
48
|
+
# Gets a ServingConfig.
|
|
49
|
+
#
|
|
50
|
+
# Returns a NotFound error if the ServingConfig does not exist.
|
|
51
|
+
rpc :GetServingConfig, ::Google::Cloud::Retail::V2::GetServingConfigRequest, ::Google::Cloud::Retail::V2::ServingConfig
|
|
52
|
+
# Lists all ServingConfigs linked to this catalog.
|
|
53
|
+
rpc :ListServingConfigs, ::Google::Cloud::Retail::V2::ListServingConfigsRequest, ::Google::Cloud::Retail::V2::ListServingConfigsResponse
|
|
54
|
+
# Enables a Control on the specified ServingConfig.
|
|
55
|
+
# The control is added in the last position of the list of controls
|
|
56
|
+
# it belongs to (e.g. if it's a facet spec control it will be applied
|
|
57
|
+
# in the last position of servingConfig.facetSpecIds)
|
|
58
|
+
# Returns a ALREADY_EXISTS error if the control has already been applied.
|
|
59
|
+
# Returns a FAILED_PRECONDITION error if the addition could exceed maximum
|
|
60
|
+
# number of control allowed for that type of control.
|
|
61
|
+
rpc :AddControl, ::Google::Cloud::Retail::V2::AddControlRequest, ::Google::Cloud::Retail::V2::ServingConfig
|
|
62
|
+
# Disables a Control on the specified ServingConfig.
|
|
63
|
+
# The control is removed from the ServingConfig.
|
|
64
|
+
# Returns a NOT_FOUND error if the Control is not enabled for the
|
|
65
|
+
# ServingConfig.
|
|
66
|
+
rpc :RemoveControl, ::Google::Cloud::Retail::V2::RemoveControlRequest, ::Google::Cloud::Retail::V2::ServingConfig
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
Stub = Service.rpc_stub_class
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -493,9 +493,9 @@ module Google
|
|
|
493
493
|
# synchronous. Events that already exist are skipped.
|
|
494
494
|
# Use this method for backfilling historical user events.
|
|
495
495
|
#
|
|
496
|
-
# Operation.response is of type ImportResponse
|
|
496
|
+
# `Operation.response` is of type `ImportResponse`. Note that it is
|
|
497
497
|
# possible for a subset of the items to be successfully inserted.
|
|
498
|
-
# Operation.metadata is of type ImportMetadata
|
|
498
|
+
# `Operation.metadata` is of type `ImportMetadata`.
|
|
499
499
|
#
|
|
500
500
|
# @overload import_user_events(request, options = nil)
|
|
501
501
|
# Pass arguments to `import_user_events` via a request object, either of type
|
|
@@ -7,7 +7,6 @@ require 'google/api/annotations_pb'
|
|
|
7
7
|
require 'google/api/client_pb'
|
|
8
8
|
require 'google/api/field_behavior_pb'
|
|
9
9
|
require 'google/api/httpbody_pb'
|
|
10
|
-
require 'google/api/resource_pb'
|
|
11
10
|
require 'google/cloud/retail/v2/import_config_pb'
|
|
12
11
|
require 'google/cloud/retail/v2/purge_config_pb'
|
|
13
12
|
require 'google/cloud/retail/v2/user_event_pb'
|
|
@@ -50,9 +50,9 @@ module Google
|
|
|
50
50
|
# synchronous. Events that already exist are skipped.
|
|
51
51
|
# Use this method for backfilling historical user events.
|
|
52
52
|
#
|
|
53
|
-
# Operation.response is of type ImportResponse
|
|
53
|
+
# `Operation.response` is of type `ImportResponse`. Note that it is
|
|
54
54
|
# possible for a subset of the items to be successfully inserted.
|
|
55
|
-
# Operation.metadata is of type ImportMetadata
|
|
55
|
+
# `Operation.metadata` is of type `ImportMetadata`.
|
|
56
56
|
rpc :ImportUserEvents, ::Google::Cloud::Retail::V2::ImportUserEventsRequest, ::Google::Longrunning::Operation
|
|
57
57
|
# Starts a user event rejoin operation with latest product catalog. Events
|
|
58
58
|
# will not be annotated with detailed product information if product is
|
|
@@ -18,9 +18,11 @@
|
|
|
18
18
|
|
|
19
19
|
require "google/cloud/retail/v2/catalog_service"
|
|
20
20
|
require "google/cloud/retail/v2/completion_service"
|
|
21
|
+
require "google/cloud/retail/v2/control_service"
|
|
21
22
|
require "google/cloud/retail/v2/prediction_service"
|
|
22
23
|
require "google/cloud/retail/v2/product_service"
|
|
23
24
|
require "google/cloud/retail/v2/search_service"
|
|
25
|
+
require "google/cloud/retail/v2/serving_config_service"
|
|
24
26
|
require "google/cloud/retail/v2/user_event_service"
|
|
25
27
|
require "google/cloud/retail/v2/version"
|
|
26
28
|
|
|
@@ -78,6 +78,239 @@ module Google
|
|
|
78
78
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
+
# Catalog level attribute config for an attribute. For example, if customers
|
|
82
|
+
# want to enable/disable facet for a specific attribute.
|
|
83
|
+
# @!attribute [rw] key
|
|
84
|
+
# @return [::String]
|
|
85
|
+
# Required. Attribute name.
|
|
86
|
+
# For example: `color`, `brands`, `attributes.custom_attribute`, such as
|
|
87
|
+
# `attributes.xyz`.
|
|
88
|
+
# To be indexable, the attribute name can contain only alpha-numeric
|
|
89
|
+
# characters and underscores. For example, an attribute named
|
|
90
|
+
# `attributes.abc_xyz` can be indexed, but an attribute named
|
|
91
|
+
# `attributes.abc-xyz` cannot be indexed.
|
|
92
|
+
# @!attribute [r] in_use
|
|
93
|
+
# @return [::Boolean]
|
|
94
|
+
# Output only. Indicates whether this attribute has been used by any
|
|
95
|
+
# products. `True` if at least one {::Google::Cloud::Retail::V2::Product Product}
|
|
96
|
+
# is using this attribute in
|
|
97
|
+
# {::Google::Cloud::Retail::V2::Product#attributes Product.attributes}. Otherwise,
|
|
98
|
+
# this field is `False`.
|
|
99
|
+
#
|
|
100
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute} can be
|
|
101
|
+
# pre-loaded by using
|
|
102
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#add_catalog_attribute CatalogService.AddCatalogAttribute},
|
|
103
|
+
# [CatalogService.ImportCatalogAttributes][], or
|
|
104
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#update_attributes_config CatalogService.UpdateAttributesConfig}
|
|
105
|
+
# APIs. This field is `False` for pre-loaded
|
|
106
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}s.
|
|
107
|
+
#
|
|
108
|
+
# Only pre-loaded
|
|
109
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}s that are
|
|
110
|
+
# neither in use by products nor predefined can be deleted.
|
|
111
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute CatalogAttribute}s that are
|
|
112
|
+
# either in use by products or are predefined cannot be deleted; however,
|
|
113
|
+
# their configuration properties will reset to default values upon removal
|
|
114
|
+
# request.
|
|
115
|
+
#
|
|
116
|
+
# After catalog changes, it takes about 10 minutes for this field to update.
|
|
117
|
+
# @!attribute [r] type
|
|
118
|
+
# @return [::Google::Cloud::Retail::V2::CatalogAttribute::AttributeType]
|
|
119
|
+
# Output only. The type of this attribute. This is derived from the attribute
|
|
120
|
+
# in {::Google::Cloud::Retail::V2::Product#attributes Product.attributes}.
|
|
121
|
+
# @!attribute [rw] indexable_option
|
|
122
|
+
# @return [::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption]
|
|
123
|
+
# When
|
|
124
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level AttributesConfig.attribute_config_level}
|
|
125
|
+
# is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values
|
|
126
|
+
# are indexed so that it can be filtered, faceted, or boosted in
|
|
127
|
+
# {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
|
|
128
|
+
# @!attribute [rw] dynamic_facetable_option
|
|
129
|
+
# @return [::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption]
|
|
130
|
+
# If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic
|
|
131
|
+
# facet. Could only be DYNAMIC_FACETABLE_DISABLED if
|
|
132
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute#indexable_option CatalogAttribute.indexable_option}
|
|
133
|
+
# is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
134
|
+
# @!attribute [rw] searchable_option
|
|
135
|
+
# @return [::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption]
|
|
136
|
+
# When
|
|
137
|
+
# {::Google::Cloud::Retail::V2::AttributesConfig#attribute_config_level AttributesConfig.attribute_config_level}
|
|
138
|
+
# is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values
|
|
139
|
+
# are searchable by text queries in
|
|
140
|
+
# {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
|
|
141
|
+
#
|
|
142
|
+
# If SEARCHABLE_ENABLED but attribute type is numerical, attribute values
|
|
143
|
+
# will not be searchable by text queries in
|
|
144
|
+
# {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}, as
|
|
145
|
+
# there are no text values associated to numerical attributes.
|
|
146
|
+
class CatalogAttribute
|
|
147
|
+
include ::Google::Protobuf::MessageExts
|
|
148
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
149
|
+
|
|
150
|
+
# The type of an attribute.
|
|
151
|
+
module AttributeType
|
|
152
|
+
# The type of the attribute is unknown.
|
|
153
|
+
#
|
|
154
|
+
# Used when type cannot be derived from attribute that is not
|
|
155
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute#in_use in_use}.
|
|
156
|
+
UNKNOWN = 0
|
|
157
|
+
|
|
158
|
+
# Textual attribute.
|
|
159
|
+
TEXTUAL = 1
|
|
160
|
+
|
|
161
|
+
# Numerical attribute.
|
|
162
|
+
NUMERICAL = 2
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# The status of the indexable option of a catalog attribute.
|
|
166
|
+
module IndexableOption
|
|
167
|
+
# Value used when unset. Defaults to
|
|
168
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption::INDEXABLE_ENABLED INDEXABLE_ENABLED}.
|
|
169
|
+
INDEXABLE_OPTION_UNSPECIFIED = 0
|
|
170
|
+
|
|
171
|
+
# Indexable option enabled for an attribute.
|
|
172
|
+
INDEXABLE_ENABLED = 1
|
|
173
|
+
|
|
174
|
+
# Indexable option disabled for an attribute.
|
|
175
|
+
INDEXABLE_DISABLED = 2
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# The status of the dynamic facetable option of a catalog attribute.
|
|
179
|
+
module DynamicFacetableOption
|
|
180
|
+
# Value used when unset. Defaults to
|
|
181
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption::DYNAMIC_FACETABLE_ENABLED DYNAMIC_FACETABLE_ENABLED}.
|
|
182
|
+
DYNAMIC_FACETABLE_OPTION_UNSPECIFIED = 0
|
|
183
|
+
|
|
184
|
+
# Dynamic facetable option enabled for an attribute.
|
|
185
|
+
DYNAMIC_FACETABLE_ENABLED = 1
|
|
186
|
+
|
|
187
|
+
# Dynamic facetable option disabled for an attribute.
|
|
188
|
+
DYNAMIC_FACETABLE_DISABLED = 2
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# The status of the searchable option of a catalog attribute.
|
|
192
|
+
module SearchableOption
|
|
193
|
+
# Value used when unset. Defaults to
|
|
194
|
+
# {::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption::SEARCHABLE_DISABLED SEARCHABLE_DISABLED}.
|
|
195
|
+
SEARCHABLE_OPTION_UNSPECIFIED = 0
|
|
196
|
+
|
|
197
|
+
# Searchable option enabled for an attribute.
|
|
198
|
+
SEARCHABLE_ENABLED = 1
|
|
199
|
+
|
|
200
|
+
# Searchable option disabled for an attribute.
|
|
201
|
+
SEARCHABLE_DISABLED = 2
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Catalog level attribute config.
|
|
206
|
+
# @!attribute [rw] name
|
|
207
|
+
# @return [::String]
|
|
208
|
+
# Required. Immutable. The fully qualified resource name of the attribute
|
|
209
|
+
# config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`
|
|
210
|
+
# @!attribute [rw] catalog_attributes
|
|
211
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Retail::V2::CatalogAttribute}]
|
|
212
|
+
# Enable attribute(s) config at catalog level.
|
|
213
|
+
# For example, indexable, dynamic_facetable, or searchable for each
|
|
214
|
+
# attribute.
|
|
215
|
+
#
|
|
216
|
+
# The key is catalog attribute's name.
|
|
217
|
+
# For example: `color`, `brands`, `attributes.custom_attribute`, such as
|
|
218
|
+
# `attributes.xyz`.
|
|
219
|
+
#
|
|
220
|
+
# The maximum number of catalog attributes allowed in a request is 1000.
|
|
221
|
+
# @!attribute [r] attribute_config_level
|
|
222
|
+
# @return [::Google::Cloud::Retail::V2::AttributeConfigLevel]
|
|
223
|
+
# Output only. The
|
|
224
|
+
# {::Google::Cloud::Retail::V2::AttributeConfigLevel AttributeConfigLevel} used
|
|
225
|
+
# for this catalog.
|
|
226
|
+
class AttributesConfig
|
|
227
|
+
include ::Google::Protobuf::MessageExts
|
|
228
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
229
|
+
|
|
230
|
+
# @!attribute [rw] key
|
|
231
|
+
# @return [::String]
|
|
232
|
+
# @!attribute [rw] value
|
|
233
|
+
# @return [::Google::Cloud::Retail::V2::CatalogAttribute]
|
|
234
|
+
class CatalogAttributesEntry
|
|
235
|
+
include ::Google::Protobuf::MessageExts
|
|
236
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Catalog level autocomplete config for customers to customize autocomplete
|
|
241
|
+
# feature's settings.
|
|
242
|
+
# @!attribute [rw] name
|
|
243
|
+
# @return [::String]
|
|
244
|
+
# Required. Immutable. Fully qualified name
|
|
245
|
+
# `projects/*/locations/*/catalogs/*/completionConfig`
|
|
246
|
+
# @!attribute [rw] matching_order
|
|
247
|
+
# @return [::String]
|
|
248
|
+
# Specifies the matching order for autocomplete suggestions, e.g., a query
|
|
249
|
+
# consisting of 'sh' with 'out-of-order' specified would suggest "women's
|
|
250
|
+
# shoes", whereas a query of 'red s' with 'exact-prefix' specified would
|
|
251
|
+
# suggest "red shoes". Currently supported values:
|
|
252
|
+
#
|
|
253
|
+
# * 'out-of-order'
|
|
254
|
+
# * 'exact-prefix'
|
|
255
|
+
#
|
|
256
|
+
# Default value: 'exact-prefix'.
|
|
257
|
+
# @!attribute [rw] max_suggestions
|
|
258
|
+
# @return [::Integer]
|
|
259
|
+
# The maximum number of autocomplete suggestions returned per term. Default
|
|
260
|
+
# value is 20. If left unset or set to 0, then will fallback to default
|
|
261
|
+
# value.
|
|
262
|
+
#
|
|
263
|
+
# Value range is 1 to 20.
|
|
264
|
+
# @!attribute [rw] min_prefix_length
|
|
265
|
+
# @return [::Integer]
|
|
266
|
+
# The minimum number of characters needed to be typed in order to get
|
|
267
|
+
# suggestions. Default value is 2. If left unset or set to 0, then will
|
|
268
|
+
# fallback to default value.
|
|
269
|
+
#
|
|
270
|
+
# Value range is 1 to 20.
|
|
271
|
+
# @!attribute [rw] auto_learning
|
|
272
|
+
# @return [::Boolean]
|
|
273
|
+
# If set to true, the auto learning function is enabled. Auto learning uses
|
|
274
|
+
# user data to generate suggestions using ML techniques. Default value is
|
|
275
|
+
# false. Only after enabling auto learning can users use `cloud-retail`
|
|
276
|
+
# data in
|
|
277
|
+
# {::Google::Cloud::Retail::V2::CompleteQueryRequest CompleteQueryRequest}.
|
|
278
|
+
# @!attribute [r] suggestions_input_config
|
|
279
|
+
# @return [::Google::Cloud::Retail::V2::CompletionDataInputConfig]
|
|
280
|
+
# Output only. The source data for the latest import of the autocomplete
|
|
281
|
+
# suggestion phrases.
|
|
282
|
+
# @!attribute [r] last_suggestions_import_operation
|
|
283
|
+
# @return [::String]
|
|
284
|
+
# Output only. Name of the LRO corresponding to the latest suggestion terms
|
|
285
|
+
# list import.
|
|
286
|
+
#
|
|
287
|
+
# Can use GetOperation API to
|
|
288
|
+
# retrieve the latest state of the Long Running Operation.
|
|
289
|
+
# @!attribute [r] denylist_input_config
|
|
290
|
+
# @return [::Google::Cloud::Retail::V2::CompletionDataInputConfig]
|
|
291
|
+
# Output only. The source data for the latest import of the autocomplete
|
|
292
|
+
# denylist phrases.
|
|
293
|
+
# @!attribute [r] last_denylist_import_operation
|
|
294
|
+
# @return [::String]
|
|
295
|
+
# Output only. Name of the LRO corresponding to the latest denylist import.
|
|
296
|
+
#
|
|
297
|
+
# Can use GetOperation API to
|
|
298
|
+
# retrieve the latest state of the Long Running Operation.
|
|
299
|
+
# @!attribute [r] allowlist_input_config
|
|
300
|
+
# @return [::Google::Cloud::Retail::V2::CompletionDataInputConfig]
|
|
301
|
+
# Output only. The source data for the latest import of the autocomplete
|
|
302
|
+
# allowlist phrases.
|
|
303
|
+
# @!attribute [r] last_allowlist_import_operation
|
|
304
|
+
# @return [::String]
|
|
305
|
+
# Output only. Name of the LRO corresponding to the latest allowlist import.
|
|
306
|
+
#
|
|
307
|
+
# Can use GetOperation API to
|
|
308
|
+
# retrieve the latest state of the Long Running Operation.
|
|
309
|
+
class CompletionConfig
|
|
310
|
+
include ::Google::Protobuf::MessageExts
|
|
311
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
312
|
+
end
|
|
313
|
+
|
|
81
314
|
# The catalog configuration.
|
|
82
315
|
# @!attribute [rw] name
|
|
83
316
|
# @return [::String]
|