google-cloud-retail-v2 0.1.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 +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-retail-v2.rb +21 -0
- data/lib/google/cloud/retail/v2.rb +41 -0
- data/lib/google/cloud/retail/v2/catalog_pb.rb +32 -0
- data/lib/google/cloud/retail/v2/catalog_service.rb +49 -0
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +490 -0
- data/lib/google/cloud/retail/v2/catalog_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/catalog_service/paths.rb +69 -0
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +42 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +48 -0
- data/lib/google/cloud/retail/v2/common_pb.rb +46 -0
- data/lib/google/cloud/retail/v2/import_config_pb.rb +104 -0
- data/lib/google/cloud/retail/v2/prediction_service.rb +49 -0
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +472 -0
- data/lib/google/cloud/retail/v2/prediction_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/prediction_service/paths.rb +56 -0
- data/lib/google/cloud/retail/v2/prediction_service_pb.rb +46 -0
- data/lib/google/cloud/retail/v2/prediction_service_services_pb.rb +45 -0
- data/lib/google/cloud/retail/v2/product_pb.rb +58 -0
- data/lib/google/cloud/retail/v2/product_service.rb +51 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +752 -0
- data/lib/google/cloud/retail/v2/product_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/product_service/operations.rb +570 -0
- data/lib/google/cloud/retail/v2/product_service/paths.rb +77 -0
- data/lib/google/cloud/retail/v2/product_service_pb.rb +47 -0
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +60 -0
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +33 -0
- data/lib/google/cloud/retail/v2/user_event_pb.rb +55 -0
- data/lib/google/cloud/retail/v2/user_event_service.rb +50 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +760 -0
- data/lib/google/cloud/retail/v2/user_event_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +570 -0
- data/lib/google/cloud/retail/v2/user_event_service/paths.rb +56 -0
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +56 -0
- data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +72 -0
- data/lib/google/cloud/retail/v2/version.rb +28 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/httpbody.rb +75 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/retail/v2/catalog.rb +101 -0
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +106 -0
- data/proto_docs/google/cloud/retail/v2/common.rb +169 -0
- data/proto_docs/google/cloud/retail/v2/import_config.rb +270 -0
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +205 -0
- data/proto_docs/google/cloud/retail/v2/product.rb +278 -0
- data/proto_docs/google/cloud/retail/v2/product_service.rb +117 -0
- data/proto_docs/google/cloud/retail/v2/purge_config.rb +85 -0
- data/proto_docs/google/cloud/retail/v2/user_event.rb +238 -0
- data/proto_docs/google/cloud/retail/v2/user_event_service.rb +114 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +245 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2021 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
|
+
# Configures what level the product should be uploaded with regards to
|
|
25
|
+
# how users will be send events and how predictions will be made.
|
|
26
|
+
# @!attribute [rw] ingestion_product_type
|
|
27
|
+
# @return [::String]
|
|
28
|
+
# The type of {::Google::Cloud::Retail::V2::Product Product}s allowed to be
|
|
29
|
+
# ingested into the catalog. Acceptable values are:
|
|
30
|
+
#
|
|
31
|
+
# * `primary` (default): You can only ingest
|
|
32
|
+
# {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Product.Type.PRIMARY}
|
|
33
|
+
# {::Google::Cloud::Retail::V2::Product Product}s. This means
|
|
34
|
+
# {::Google::Cloud::Retail::V2::Product#primary_product_id Product.primary_product_id}
|
|
35
|
+
# can only be empty or set to the same value as
|
|
36
|
+
# {::Google::Cloud::Retail::V2::Product#id Product.id}.
|
|
37
|
+
# * `variant`: You can only ingest
|
|
38
|
+
# {::Google::Cloud::Retail::V2::Product::Type::VARIANT Product.Type.VARIANT}
|
|
39
|
+
# {::Google::Cloud::Retail::V2::Product Product}s.
|
|
40
|
+
# This means
|
|
41
|
+
# {::Google::Cloud::Retail::V2::Product#primary_product_id Product.primary_product_id}
|
|
42
|
+
# cannot be empty.
|
|
43
|
+
#
|
|
44
|
+
# If this field is set to an invalid value other than these, an
|
|
45
|
+
# INVALID_ARGUMENT error is returned.
|
|
46
|
+
#
|
|
47
|
+
# If this field is `variant` and
|
|
48
|
+
# {::Google::Cloud::Retail::V2::ProductLevelConfig#merchant_center_product_id_field merchant_center_product_id_field}
|
|
49
|
+
# is `itemGroupId`, an INVALID_ARGUMENT error is returned.
|
|
50
|
+
#
|
|
51
|
+
# See [Using catalog
|
|
52
|
+
# levels](/retail/recommendations-ai/docs/catalog#catalog-levels) for more
|
|
53
|
+
# details.
|
|
54
|
+
# @!attribute [rw] merchant_center_product_id_field
|
|
55
|
+
# @return [::String]
|
|
56
|
+
# Which field of [Merchant Center
|
|
57
|
+
# Product](/bigquery-transfer/docs/merchant-center-products-schema) should be
|
|
58
|
+
# imported as {::Google::Cloud::Retail::V2::Product#id Product.id}. Acceptable
|
|
59
|
+
# values are:
|
|
60
|
+
#
|
|
61
|
+
# * `offerId` (default): Import `offerId` as the product ID.
|
|
62
|
+
# * `itemGroupId`: Import `itemGroupId` as the product ID. Notice that Retail
|
|
63
|
+
# API will choose one item from the ones with the same `itemGroupId`, and
|
|
64
|
+
# use it to represent the item group.
|
|
65
|
+
#
|
|
66
|
+
# If this field is set to an invalid value other than these, an
|
|
67
|
+
# INVALID_ARGUMENT error is returned.
|
|
68
|
+
#
|
|
69
|
+
# If this field is `itemGroupId` and
|
|
70
|
+
# {::Google::Cloud::Retail::V2::ProductLevelConfig#ingestion_product_type ingestion_product_type}
|
|
71
|
+
# is `variant`, an INVALID_ARGUMENT error is returned.
|
|
72
|
+
#
|
|
73
|
+
# See [Using catalog
|
|
74
|
+
# levels](/retail/recommendations-ai/docs/catalog#catalog-levels) for more
|
|
75
|
+
# details.
|
|
76
|
+
class ProductLevelConfig
|
|
77
|
+
include ::Google::Protobuf::MessageExts
|
|
78
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# The catalog configuration.
|
|
82
|
+
# @!attribute [rw] name
|
|
83
|
+
# @return [::String]
|
|
84
|
+
# Required. Immutable. The fully qualified resource name of the catalog.
|
|
85
|
+
# @!attribute [rw] display_name
|
|
86
|
+
# @return [::String]
|
|
87
|
+
# Required. Immutable. The catalog display name.
|
|
88
|
+
#
|
|
89
|
+
# This field must be a UTF-8 encoded string with a length limit of 128
|
|
90
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
91
|
+
# @!attribute [rw] product_level_config
|
|
92
|
+
# @return [::Google::Cloud::Retail::V2::ProductLevelConfig]
|
|
93
|
+
# Required. The product level configuration.
|
|
94
|
+
class Catalog
|
|
95
|
+
include ::Google::Protobuf::MessageExts
|
|
96
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2021 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
|
+
# Request for
|
|
25
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#list_catalogs CatalogService.ListCatalogs}
|
|
26
|
+
# method.
|
|
27
|
+
# @!attribute [rw] parent
|
|
28
|
+
# @return [::String]
|
|
29
|
+
# Required. The account resource name with an associated location.
|
|
30
|
+
#
|
|
31
|
+
# If the caller does not have permission to list
|
|
32
|
+
# {::Google::Cloud::Retail::V2::Catalog Catalog}s under this location, regardless
|
|
33
|
+
# of whether or not this location exists, a PERMISSION_DENIED error is
|
|
34
|
+
# returned.
|
|
35
|
+
# @!attribute [rw] page_size
|
|
36
|
+
# @return [::Integer]
|
|
37
|
+
# Maximum number of {::Google::Cloud::Retail::V2::Catalog Catalog}s to return. If
|
|
38
|
+
# unspecified, defaults to 50. The maximum allowed value is 1000. Values
|
|
39
|
+
# above 1000 will be coerced to 1000.
|
|
40
|
+
#
|
|
41
|
+
# If this field is negative, an INVALID_ARGUMENT is returned.
|
|
42
|
+
# @!attribute [rw] page_token
|
|
43
|
+
# @return [::String]
|
|
44
|
+
# A page token
|
|
45
|
+
# {::Google::Cloud::Retail::V2::ListCatalogsResponse#next_page_token ListCatalogsResponse.next_page_token},
|
|
46
|
+
# received from a previous
|
|
47
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#list_catalogs CatalogService.ListCatalogs}
|
|
48
|
+
# call. Provide this to retrieve the subsequent page.
|
|
49
|
+
#
|
|
50
|
+
# When paginating, all other parameters provided to
|
|
51
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#list_catalogs CatalogService.ListCatalogs}
|
|
52
|
+
# must match the call that provided the page token. Otherwise, an
|
|
53
|
+
# INVALID_ARGUMENT error is returned.
|
|
54
|
+
class ListCatalogsRequest
|
|
55
|
+
include ::Google::Protobuf::MessageExts
|
|
56
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Response for
|
|
60
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#list_catalogs CatalogService.ListCatalogs}
|
|
61
|
+
# method.
|
|
62
|
+
# @!attribute [rw] catalogs
|
|
63
|
+
# @return [::Array<::Google::Cloud::Retail::V2::Catalog>]
|
|
64
|
+
# All the customer's {::Google::Cloud::Retail::V2::Catalog Catalog}s.
|
|
65
|
+
# @!attribute [rw] next_page_token
|
|
66
|
+
# @return [::String]
|
|
67
|
+
# A token that can be sent as
|
|
68
|
+
# {::Google::Cloud::Retail::V2::ListCatalogsRequest#page_token ListCatalogsRequest.page_token}
|
|
69
|
+
# to retrieve the next page. If this field is omitted, there are no
|
|
70
|
+
# subsequent pages.
|
|
71
|
+
class ListCatalogsResponse
|
|
72
|
+
include ::Google::Protobuf::MessageExts
|
|
73
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Request for
|
|
77
|
+
# {::Google::Cloud::Retail::V2::CatalogService::Client#update_catalog CatalogService.UpdateCatalog}
|
|
78
|
+
# method.
|
|
79
|
+
# @!attribute [rw] catalog
|
|
80
|
+
# @return [::Google::Cloud::Retail::V2::Catalog]
|
|
81
|
+
# Required. The {::Google::Cloud::Retail::V2::Catalog Catalog} to update.
|
|
82
|
+
#
|
|
83
|
+
# If the caller does not have permission to update the
|
|
84
|
+
# {::Google::Cloud::Retail::V2::Catalog Catalog}, regardless of whether or not it
|
|
85
|
+
# exists, a PERMISSION_DENIED error is returned.
|
|
86
|
+
#
|
|
87
|
+
# If the {::Google::Cloud::Retail::V2::Catalog Catalog} to update does not exist,
|
|
88
|
+
# a NOT_FOUND error is returned.
|
|
89
|
+
# @!attribute [rw] update_mask
|
|
90
|
+
# @return [::Google::Protobuf::FieldMask]
|
|
91
|
+
# Indicates which fields in the provided
|
|
92
|
+
# {::Google::Cloud::Retail::V2::Catalog Catalog} to update. If not set, will only
|
|
93
|
+
# update the
|
|
94
|
+
# {::Google::Cloud::Retail::V2::Catalog#product_level_config Catalog.product_level_config}
|
|
95
|
+
# field, which is also the only currently supported field to update.
|
|
96
|
+
#
|
|
97
|
+
# If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
|
|
98
|
+
# is returned.
|
|
99
|
+
class UpdateCatalogRequest
|
|
100
|
+
include ::Google::Protobuf::MessageExts
|
|
101
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2021 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
|
+
# A custom attribute that is not explicitly modeled in
|
|
25
|
+
# {::Google::Cloud::Retail::V2::Product Product}].
|
|
26
|
+
# @!attribute [rw] text
|
|
27
|
+
# @return [::Array<::String>]
|
|
28
|
+
# The textual values of this custom attribute. For example, `["yellow",
|
|
29
|
+
# "green"]` when the key is "color".
|
|
30
|
+
#
|
|
31
|
+
# At most 400 values are allowed. Empty values are not allowed. Each value
|
|
32
|
+
# must be a UTF-8 encoded string with a length limit of 256 characters.
|
|
33
|
+
# Otherwise, an INVALID_ARGUMENT error is returned.
|
|
34
|
+
#
|
|
35
|
+
# Exactly one of {::Google::Cloud::Retail::V2::CustomAttribute#text text} or
|
|
36
|
+
# {::Google::Cloud::Retail::V2::CustomAttribute#numbers numbers} should be set.
|
|
37
|
+
# Otherwise, an INVALID_ARGUMENT error is returned.
|
|
38
|
+
# @!attribute [rw] numbers
|
|
39
|
+
# @return [::Array<::Float>]
|
|
40
|
+
# The numerical values of this custom attribute. For example, `[2.3, 15.4]`
|
|
41
|
+
# when the key is "lengths_cm".
|
|
42
|
+
#
|
|
43
|
+
# At most 400 values are allowed.Otherwise, an INVALID_ARGUMENT error is
|
|
44
|
+
# returned.
|
|
45
|
+
#
|
|
46
|
+
# Exactly one of {::Google::Cloud::Retail::V2::CustomAttribute#text text} or
|
|
47
|
+
# {::Google::Cloud::Retail::V2::CustomAttribute#numbers numbers} should be set.
|
|
48
|
+
# Otherwise, an INVALID_ARGUMENT error is returned.
|
|
49
|
+
class CustomAttribute
|
|
50
|
+
include ::Google::Protobuf::MessageExts
|
|
51
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# {::Google::Cloud::Retail::V2::Product Product} thumbnail/detail image.
|
|
55
|
+
# @!attribute [rw] uri
|
|
56
|
+
# @return [::String]
|
|
57
|
+
# Required. URI of the image.
|
|
58
|
+
#
|
|
59
|
+
# This field must be a valid UTF-8 encoded URI with a length limit of 5,000
|
|
60
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
61
|
+
#
|
|
62
|
+
# Google Merchant Center property
|
|
63
|
+
# [image_link](https://support.google.com/merchants/answer/6324350).
|
|
64
|
+
# Schema.org property [Product.image](https://schema.org/image).
|
|
65
|
+
# @!attribute [rw] height
|
|
66
|
+
# @return [::Integer]
|
|
67
|
+
# Height of the image in number of pixels.
|
|
68
|
+
#
|
|
69
|
+
# This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is
|
|
70
|
+
# returned.
|
|
71
|
+
# @!attribute [rw] width
|
|
72
|
+
# @return [::Integer]
|
|
73
|
+
# Width of the image in number of pixels.
|
|
74
|
+
#
|
|
75
|
+
# This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is
|
|
76
|
+
# returned.
|
|
77
|
+
class Image
|
|
78
|
+
include ::Google::Protobuf::MessageExts
|
|
79
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# The price information of a {::Google::Cloud::Retail::V2::Product Product}.
|
|
83
|
+
# @!attribute [rw] currency_code
|
|
84
|
+
# @return [::String]
|
|
85
|
+
# The 3-letter currency code defined in [ISO
|
|
86
|
+
# 4217](https://www.iso.org/iso-4217-currency-codes.html).
|
|
87
|
+
#
|
|
88
|
+
# If this field is an unrecognizable currency code, an INVALID_ARGUMENT
|
|
89
|
+
# error is returned.
|
|
90
|
+
# @!attribute [rw] price
|
|
91
|
+
# @return [::Float]
|
|
92
|
+
# Price of the product.
|
|
93
|
+
#
|
|
94
|
+
# Google Merchant Center property
|
|
95
|
+
# [price](https://support.google.com/merchants/answer/6324371). Schema.org
|
|
96
|
+
# property [Offer.priceSpecification](https://schema.org/priceSpecification).
|
|
97
|
+
# @!attribute [rw] original_price
|
|
98
|
+
# @return [::Float]
|
|
99
|
+
# Price of the product without any discount. If zero, by default set to be
|
|
100
|
+
# the {::Google::Cloud::Retail::V2::PriceInfo#price price}.
|
|
101
|
+
# @!attribute [rw] cost
|
|
102
|
+
# @return [::Float]
|
|
103
|
+
# The costs associated with the sale of a particular product. Used for gross
|
|
104
|
+
# profit reporting.
|
|
105
|
+
#
|
|
106
|
+
# * Profit = {::Google::Cloud::Retail::V2::PriceInfo#price price} -
|
|
107
|
+
# {::Google::Cloud::Retail::V2::PriceInfo#cost cost}
|
|
108
|
+
#
|
|
109
|
+
# Google Merchant Center property
|
|
110
|
+
# [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
|
|
111
|
+
class PriceInfo
|
|
112
|
+
include ::Google::Protobuf::MessageExts
|
|
113
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Information of an end user.
|
|
117
|
+
# @!attribute [rw] user_id
|
|
118
|
+
# @return [::String]
|
|
119
|
+
# Highly recommended for logged-in users. Unique identifier for logged-in
|
|
120
|
+
# user, such as a user name.
|
|
121
|
+
#
|
|
122
|
+
# The field must be a UTF-8 encoded string with a length limit of 128
|
|
123
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
124
|
+
# @!attribute [rw] ip_address
|
|
125
|
+
# @return [::String]
|
|
126
|
+
# The end user's IP address. This field is used to extract location
|
|
127
|
+
# information for personalization.
|
|
128
|
+
#
|
|
129
|
+
# This field must be either an IPv4 address (e.g. "104.133.9.80") or an IPv6
|
|
130
|
+
# address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334"). Otherwise, an
|
|
131
|
+
# INVALID_ARGUMENT error is returned.
|
|
132
|
+
#
|
|
133
|
+
# This should not be set when using the JavaScript tag in
|
|
134
|
+
# {::Google::Cloud::Retail::V2::UserEventService::Client#collect_user_event UserEventService.CollectUserEvent}
|
|
135
|
+
# or if
|
|
136
|
+
# {::Google::Cloud::Retail::V2::UserInfo#direct_user_request direct_user_request}
|
|
137
|
+
# is set.
|
|
138
|
+
# @!attribute [rw] user_agent
|
|
139
|
+
# @return [::String]
|
|
140
|
+
# User agent as included in the HTTP header.
|
|
141
|
+
#
|
|
142
|
+
# The field must be a UTF-8 encoded string with a length limit of 1,000
|
|
143
|
+
# characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
144
|
+
#
|
|
145
|
+
# This should not be set when using the client side event reporting with
|
|
146
|
+
# GTM or JavaScript tag in
|
|
147
|
+
# {::Google::Cloud::Retail::V2::UserEventService::Client#collect_user_event UserEventService.CollectUserEvent}
|
|
148
|
+
# or if
|
|
149
|
+
# {::Google::Cloud::Retail::V2::UserInfo#direct_user_request direct_user_request}
|
|
150
|
+
# is set.
|
|
151
|
+
# @!attribute [rw] direct_user_request
|
|
152
|
+
# @return [::Boolean]
|
|
153
|
+
# True if the request is made directly from the end user, in which case the
|
|
154
|
+
# {::Google::Cloud::Retail::V2::UserInfo#ip_address ip_address} and
|
|
155
|
+
# {::Google::Cloud::Retail::V2::UserInfo#user_agent user_agent} can be populated
|
|
156
|
+
# from the HTTP request. This flag should be set only if the API request is
|
|
157
|
+
# made directly from the end user such as a mobile app (and not if a gateway
|
|
158
|
+
# or a server is processing and pushing the user events).
|
|
159
|
+
#
|
|
160
|
+
# This should not be set when using the JavaScript tag in
|
|
161
|
+
# {::Google::Cloud::Retail::V2::UserEventService::Client#collect_user_event UserEventService.CollectUserEvent}.
|
|
162
|
+
class UserInfo
|
|
163
|
+
include ::Google::Protobuf::MessageExts
|
|
164
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
end
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2021 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
|
+
# Google Cloud Storage location for input content.
|
|
25
|
+
# format.
|
|
26
|
+
# @!attribute [rw] input_uris
|
|
27
|
+
# @return [::Array<::String>]
|
|
28
|
+
# Required. Google Cloud Storage URIs to input files. URI can be up to
|
|
29
|
+
# 2000 characters long. URIs can match the full object path (for example,
|
|
30
|
+
# gs://bucket/directory/object.json) or a pattern matching one or more
|
|
31
|
+
# files, such as gs://bucket/directory/*.json. A request can
|
|
32
|
+
# contain at most 100 files, and each file can be up to 2 GB. See
|
|
33
|
+
# [Importing product information](/recommendations-ai/docs/upload-catalog)
|
|
34
|
+
# for the expected file format and setup instructions.
|
|
35
|
+
# @!attribute [rw] data_schema
|
|
36
|
+
# @return [::String]
|
|
37
|
+
# The schema to use when parsing the data from the source.
|
|
38
|
+
#
|
|
39
|
+
# Supported values for product imports:
|
|
40
|
+
#
|
|
41
|
+
# * `product` (default): One JSON {::Google::Cloud::Retail::V2::Product Product}
|
|
42
|
+
# per line. Each product must
|
|
43
|
+
# have a valid {::Google::Cloud::Retail::V2::Product#id Product.id}.
|
|
44
|
+
# * `product_merchant_center`: See [Importing catalog data from Merchant
|
|
45
|
+
# Center](/retail/recommendations-ai/docs/upload-catalog#mc).
|
|
46
|
+
#
|
|
47
|
+
# Supported values for user events imports:
|
|
48
|
+
#
|
|
49
|
+
# * `user_event` (default): One JSON
|
|
50
|
+
# {::Google::Cloud::Retail::V2::UserEvent UserEvent} per line.
|
|
51
|
+
# * `user_event_ga360`: Using
|
|
52
|
+
# https://support.google.com/analytics/answer/3437719?hl=en.
|
|
53
|
+
class GcsSource
|
|
54
|
+
include ::Google::Protobuf::MessageExts
|
|
55
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# BigQuery source import data from.
|
|
59
|
+
# @!attribute [rw] project_id
|
|
60
|
+
# @return [::String]
|
|
61
|
+
# The project id (can be project # or id) that the BigQuery source is in with
|
|
62
|
+
# a length limit of 128 characters. If not specified, inherits the project
|
|
63
|
+
# id from the parent request.
|
|
64
|
+
# @!attribute [rw] dataset_id
|
|
65
|
+
# @return [::String]
|
|
66
|
+
# Required. The BigQuery data set to copy the data from with a length limit
|
|
67
|
+
# of 1,024 characters.
|
|
68
|
+
# @!attribute [rw] table_id
|
|
69
|
+
# @return [::String]
|
|
70
|
+
# Required. The BigQuery table to copy the data from with a length limit of
|
|
71
|
+
# 1,024 characters.
|
|
72
|
+
# @!attribute [rw] gcs_staging_dir
|
|
73
|
+
# @return [::String]
|
|
74
|
+
# Intermediate Cloud Storage directory used for the import with a length
|
|
75
|
+
# limit of 2,000 characters. Can be specified if one wants to have the
|
|
76
|
+
# BigQuery export to a specific Cloud Storage directory.
|
|
77
|
+
# @!attribute [rw] data_schema
|
|
78
|
+
# @return [::String]
|
|
79
|
+
# The schema to use when parsing the data from the source.
|
|
80
|
+
#
|
|
81
|
+
# Supported values for product imports:
|
|
82
|
+
#
|
|
83
|
+
# * `product` (default): One JSON {::Google::Cloud::Retail::V2::Product Product}
|
|
84
|
+
# per line. Each product must
|
|
85
|
+
# have a valid {::Google::Cloud::Retail::V2::Product#id Product.id}.
|
|
86
|
+
# * `product_merchant_center`: See [Importing catalog data from Merchant
|
|
87
|
+
# Center](/retail/recommendations-ai/docs/upload-catalog#mc).
|
|
88
|
+
#
|
|
89
|
+
# Supported values for user events imports:
|
|
90
|
+
#
|
|
91
|
+
# * `user_event` (default): One JSON
|
|
92
|
+
# {::Google::Cloud::Retail::V2::UserEvent UserEvent} per line.
|
|
93
|
+
# * `user_event_ga360`: Using
|
|
94
|
+
# https://support.google.com/analytics/answer/3437719?hl=en.
|
|
95
|
+
class BigQuerySource
|
|
96
|
+
include ::Google::Protobuf::MessageExts
|
|
97
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# The inline source for the input config for ImportProducts method.
|
|
101
|
+
# @!attribute [rw] products
|
|
102
|
+
# @return [::Array<::Google::Cloud::Retail::V2::Product>]
|
|
103
|
+
# Required. A list of products to update/create. Each product must have a
|
|
104
|
+
# valid {::Google::Cloud::Retail::V2::Product#id Product.id}. Recommended max of
|
|
105
|
+
# 10k items.
|
|
106
|
+
class ProductInlineSource
|
|
107
|
+
include ::Google::Protobuf::MessageExts
|
|
108
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# The inline source for the input config for ImportUserEvents method.
|
|
112
|
+
# @!attribute [rw] user_events
|
|
113
|
+
# @return [::Array<::Google::Cloud::Retail::V2::UserEvent>]
|
|
114
|
+
# Required. A list of user events to import. Recommended max of 10k items.
|
|
115
|
+
class UserEventInlineSource
|
|
116
|
+
include ::Google::Protobuf::MessageExts
|
|
117
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Configuration of destination for Import related errors.
|
|
121
|
+
# @!attribute [rw] gcs_prefix
|
|
122
|
+
# @return [::String]
|
|
123
|
+
# Google Cloud Storage path for import errors. This must be an empty,
|
|
124
|
+
# existing Cloud Storage bucket. Import errors will be written to a file in
|
|
125
|
+
# this bucket, one per line, as a JSON-encoded
|
|
126
|
+
# `google.rpc.Status` message.
|
|
127
|
+
class ImportErrorsConfig
|
|
128
|
+
include ::Google::Protobuf::MessageExts
|
|
129
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Request message for Import methods.
|
|
133
|
+
# @!attribute [rw] parent
|
|
134
|
+
# @return [::String]
|
|
135
|
+
# Required.
|
|
136
|
+
# "projects/1234/locations/global/catalogs/default_catalog/branches/default_branch"
|
|
137
|
+
#
|
|
138
|
+
# If no updateMask is specified, requires products.create permission.
|
|
139
|
+
# If updateMask is specified, requires products.update permission.
|
|
140
|
+
# @!attribute [rw] input_config
|
|
141
|
+
# @return [::Google::Cloud::Retail::V2::ProductInputConfig]
|
|
142
|
+
# Required. The desired input location of the data.
|
|
143
|
+
# @!attribute [rw] errors_config
|
|
144
|
+
# @return [::Google::Cloud::Retail::V2::ImportErrorsConfig]
|
|
145
|
+
# The desired location of errors incurred during the Import.
|
|
146
|
+
# @!attribute [rw] update_mask
|
|
147
|
+
# @return [::Google::Protobuf::FieldMask]
|
|
148
|
+
# Indicates which fields in the provided imported 'products' to update. If
|
|
149
|
+
# not set, will by default update all fields.
|
|
150
|
+
class ImportProductsRequest
|
|
151
|
+
include ::Google::Protobuf::MessageExts
|
|
152
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Request message for the ImportUserEvents request.
|
|
156
|
+
# @!attribute [rw] parent
|
|
157
|
+
# @return [::String]
|
|
158
|
+
# Required. "projects/1234/locations/global/catalogs/default_catalog"
|
|
159
|
+
# @!attribute [rw] input_config
|
|
160
|
+
# @return [::Google::Cloud::Retail::V2::UserEventInputConfig]
|
|
161
|
+
# Required. The desired input location of the data.
|
|
162
|
+
# @!attribute [rw] errors_config
|
|
163
|
+
# @return [::Google::Cloud::Retail::V2::ImportErrorsConfig]
|
|
164
|
+
# The desired location of errors incurred during the Import. Cannot be set
|
|
165
|
+
# for inline user event imports.
|
|
166
|
+
class ImportUserEventsRequest
|
|
167
|
+
include ::Google::Protobuf::MessageExts
|
|
168
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# The input config source for products.
|
|
172
|
+
# @!attribute [rw] product_inline_source
|
|
173
|
+
# @return [::Google::Cloud::Retail::V2::ProductInlineSource]
|
|
174
|
+
# The Inline source for the input content for products.
|
|
175
|
+
# @!attribute [rw] gcs_source
|
|
176
|
+
# @return [::Google::Cloud::Retail::V2::GcsSource]
|
|
177
|
+
# Google Cloud Storage location for the input content.
|
|
178
|
+
# @!attribute [rw] big_query_source
|
|
179
|
+
# @return [::Google::Cloud::Retail::V2::BigQuerySource]
|
|
180
|
+
# BigQuery input source.
|
|
181
|
+
class ProductInputConfig
|
|
182
|
+
include ::Google::Protobuf::MessageExts
|
|
183
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# The input config source for user events.
|
|
187
|
+
# @!attribute [rw] user_event_inline_source
|
|
188
|
+
# @return [::Google::Cloud::Retail::V2::UserEventInlineSource]
|
|
189
|
+
# Required. The Inline source for the input content for UserEvents.
|
|
190
|
+
# @!attribute [rw] gcs_source
|
|
191
|
+
# @return [::Google::Cloud::Retail::V2::GcsSource]
|
|
192
|
+
# Required. Google Cloud Storage location for the input content.
|
|
193
|
+
# @!attribute [rw] big_query_source
|
|
194
|
+
# @return [::Google::Cloud::Retail::V2::BigQuerySource]
|
|
195
|
+
# Required. BigQuery input source.
|
|
196
|
+
class UserEventInputConfig
|
|
197
|
+
include ::Google::Protobuf::MessageExts
|
|
198
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Metadata related to the progress of the Import operation. This will be
|
|
202
|
+
# returned by the google.longrunning.Operation.metadata field.
|
|
203
|
+
# @!attribute [rw] create_time
|
|
204
|
+
# @return [::Google::Protobuf::Timestamp]
|
|
205
|
+
# Operation create time.
|
|
206
|
+
# @!attribute [rw] update_time
|
|
207
|
+
# @return [::Google::Protobuf::Timestamp]
|
|
208
|
+
# Operation last update time. If the operation is done, this is also the
|
|
209
|
+
# finish time.
|
|
210
|
+
# @!attribute [rw] success_count
|
|
211
|
+
# @return [::Integer]
|
|
212
|
+
# Count of entries that were processed successfully.
|
|
213
|
+
# @!attribute [rw] failure_count
|
|
214
|
+
# @return [::Integer]
|
|
215
|
+
# Count of entries that encountered errors while processing.
|
|
216
|
+
class ImportMetadata
|
|
217
|
+
include ::Google::Protobuf::MessageExts
|
|
218
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Response of the
|
|
222
|
+
# {::Google::Cloud::Retail::V2::ImportProductsRequest ImportProductsRequest}. If the
|
|
223
|
+
# long running operation is done, then this message is returned by the
|
|
224
|
+
# google.longrunning.Operations.response field if the operation was successful.
|
|
225
|
+
# @!attribute [rw] error_samples
|
|
226
|
+
# @return [::Array<::Google::Rpc::Status>]
|
|
227
|
+
# A sample of errors encountered while processing the request.
|
|
228
|
+
# @!attribute [rw] errors_config
|
|
229
|
+
# @return [::Google::Cloud::Retail::V2::ImportErrorsConfig]
|
|
230
|
+
# Echoes the destination for the complete errors in the request if set.
|
|
231
|
+
class ImportProductsResponse
|
|
232
|
+
include ::Google::Protobuf::MessageExts
|
|
233
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Response of the ImportUserEventsRequest. If the long running
|
|
237
|
+
# operation was successful, then this message is returned by the
|
|
238
|
+
# google.longrunning.Operations.response field if the operation was successful.
|
|
239
|
+
# @!attribute [rw] error_samples
|
|
240
|
+
# @return [::Array<::Google::Rpc::Status>]
|
|
241
|
+
# A sample of errors encountered while processing the request.
|
|
242
|
+
# @!attribute [rw] errors_config
|
|
243
|
+
# @return [::Google::Cloud::Retail::V2::ImportErrorsConfig]
|
|
244
|
+
# Echoes the destination for the complete errors if this field was set in
|
|
245
|
+
# the request.
|
|
246
|
+
# @!attribute [rw] import_summary
|
|
247
|
+
# @return [::Google::Cloud::Retail::V2::UserEventImportSummary]
|
|
248
|
+
# Aggregated statistics of user event import status.
|
|
249
|
+
class ImportUserEventsResponse
|
|
250
|
+
include ::Google::Protobuf::MessageExts
|
|
251
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# A summary of import result. The UserEventImportSummary summarizes
|
|
255
|
+
# the import status for user events.
|
|
256
|
+
# @!attribute [rw] joined_events_count
|
|
257
|
+
# @return [::Integer]
|
|
258
|
+
# Count of user events imported with complete existing catalog information.
|
|
259
|
+
# @!attribute [rw] unjoined_events_count
|
|
260
|
+
# @return [::Integer]
|
|
261
|
+
# Count of user events imported, but with catalog information not found
|
|
262
|
+
# in the imported catalog.
|
|
263
|
+
class UserEventImportSummary
|
|
264
|
+
include ::Google::Protobuf::MessageExts
|
|
265
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
end
|