google-shopping-merchant-data_sources-v1 0.a → 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 +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/client.rb +967 -0
- data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/paths.rb +66 -0
- data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/client.rb +899 -0
- data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest/service_stub.rb +452 -0
- data/lib/google/shopping/merchant/data_sources/v1/data_sources_service/rest.rb +56 -0
- data/lib/google/shopping/merchant/data_sources/v1/data_sources_service.rb +59 -0
- data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/client.rb +467 -0
- data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/credentials.rb +49 -0
- data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/paths.rb +54 -0
- data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/client.rb +434 -0
- data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest/service_stub.rb +144 -0
- data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service/rest.rb +54 -0
- data/lib/google/shopping/merchant/data_sources/v1/file_uploads_service.rb +57 -0
- data/lib/google/shopping/merchant/data_sources/v1/rest.rb +40 -0
- data/lib/google/shopping/merchant/data_sources/v1/version.rb +7 -2
- data/lib/google/shopping/merchant/data_sources/v1.rb +48 -0
- data/lib/google/shopping/merchant/datasources/v1/datasources_pb.rb +64 -0
- data/lib/google/shopping/merchant/datasources/v1/datasources_services_pb.rb +65 -0
- data/lib/google/shopping/merchant/datasources/v1/datasourcetypes_pb.rb +57 -0
- data/lib/google/shopping/merchant/datasources/v1/fileinputs_pb.rb +52 -0
- data/lib/google/shopping/merchant/datasources/v1/fileuploads_pb.rb +55 -0
- data/lib/google/shopping/merchant/datasources/v1/fileuploads_services_pb.rb +48 -0
- data/lib/google-shopping-merchant-data_sources-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +473 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/shopping/merchant/datasources/v1/datasources.rb +231 -0
- data/proto_docs/google/shopping/merchant/datasources/v1/datasourcetypes.rb +298 -0
- data/proto_docs/google/shopping/merchant/datasources/v1/fileinputs.rb +145 -0
- data/proto_docs/google/shopping/merchant/datasources/v1/fileuploads.rb +131 -0
- data/proto_docs/google/shopping/type/types.rb +210 -0
- data/proto_docs/google/type/dayofweek.rb +49 -0
- data/proto_docs/google/type/timeofday.rb +45 -0
- metadata +103 -9
@@ -0,0 +1,127 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 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 Protobuf
|
22
|
+
# A Timestamp represents a point in time independent of any time zone or local
|
23
|
+
# calendar, encoded as a count of seconds and fractions of seconds at
|
24
|
+
# nanosecond resolution. The count is relative to an epoch at UTC midnight on
|
25
|
+
# January 1, 1970, in the proleptic Gregorian calendar which extends the
|
26
|
+
# Gregorian calendar backwards to year one.
|
27
|
+
#
|
28
|
+
# All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
|
29
|
+
# second table is needed for interpretation, using a [24-hour linear
|
30
|
+
# smear](https://developers.google.com/time/smear).
|
31
|
+
#
|
32
|
+
# The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
|
33
|
+
# restricting to that range, we ensure that we can convert to and from [RFC
|
34
|
+
# 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
|
35
|
+
#
|
36
|
+
# # Examples
|
37
|
+
#
|
38
|
+
# Example 1: Compute Timestamp from POSIX `time()`.
|
39
|
+
#
|
40
|
+
# Timestamp timestamp;
|
41
|
+
# timestamp.set_seconds(time(NULL));
|
42
|
+
# timestamp.set_nanos(0);
|
43
|
+
#
|
44
|
+
# Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
45
|
+
#
|
46
|
+
# struct timeval tv;
|
47
|
+
# gettimeofday(&tv, NULL);
|
48
|
+
#
|
49
|
+
# Timestamp timestamp;
|
50
|
+
# timestamp.set_seconds(tv.tv_sec);
|
51
|
+
# timestamp.set_nanos(tv.tv_usec * 1000);
|
52
|
+
#
|
53
|
+
# Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
54
|
+
#
|
55
|
+
# FILETIME ft;
|
56
|
+
# GetSystemTimeAsFileTime(&ft);
|
57
|
+
# UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
58
|
+
#
|
59
|
+
# // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
60
|
+
# // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
61
|
+
# Timestamp timestamp;
|
62
|
+
# timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
63
|
+
# timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
64
|
+
#
|
65
|
+
# Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
66
|
+
#
|
67
|
+
# long millis = System.currentTimeMillis();
|
68
|
+
#
|
69
|
+
# Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
70
|
+
# .setNanos((int) ((millis % 1000) * 1000000)).build();
|
71
|
+
#
|
72
|
+
# Example 5: Compute Timestamp from Java `Instant.now()`.
|
73
|
+
#
|
74
|
+
# Instant now = Instant.now();
|
75
|
+
#
|
76
|
+
# Timestamp timestamp =
|
77
|
+
# Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
78
|
+
# .setNanos(now.getNano()).build();
|
79
|
+
#
|
80
|
+
# Example 6: Compute Timestamp from current time in Python.
|
81
|
+
#
|
82
|
+
# timestamp = Timestamp()
|
83
|
+
# timestamp.GetCurrentTime()
|
84
|
+
#
|
85
|
+
# # JSON Mapping
|
86
|
+
#
|
87
|
+
# In JSON format, the Timestamp type is encoded as a string in the
|
88
|
+
# [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
89
|
+
# format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
|
90
|
+
# where \\{year} is always expressed using four digits while \\{month}, \\{day},
|
91
|
+
# \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
|
92
|
+
# seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
93
|
+
# are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
94
|
+
# is required. A proto3 JSON serializer should always use UTC (as indicated by
|
95
|
+
# "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
96
|
+
# able to accept both UTC and other timezones (as indicated by an offset).
|
97
|
+
#
|
98
|
+
# For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
99
|
+
# 01:30 UTC on January 15, 2017.
|
100
|
+
#
|
101
|
+
# In JavaScript, one can convert a Date object to this format using the
|
102
|
+
# standard
|
103
|
+
# [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
104
|
+
# method. In Python, a standard `datetime.datetime` object can be converted
|
105
|
+
# to this format using
|
106
|
+
# [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
107
|
+
# the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
108
|
+
# the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
109
|
+
# http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
110
|
+
# ) to obtain a formatter capable of generating timestamps in this format.
|
111
|
+
# @!attribute [rw] seconds
|
112
|
+
# @return [::Integer]
|
113
|
+
# Represents seconds of UTC time since Unix epoch
|
114
|
+
# 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
115
|
+
# 9999-12-31T23:59:59Z inclusive.
|
116
|
+
# @!attribute [rw] nanos
|
117
|
+
# @return [::Integer]
|
118
|
+
# Non-negative fractions of a second at nanosecond resolution. Negative
|
119
|
+
# second values with fractions must still have non-negative nanos values
|
120
|
+
# that count forward in time. Must be from 0 to 999,999,999
|
121
|
+
# inclusive.
|
122
|
+
class Timestamp
|
123
|
+
include ::Google::Protobuf::MessageExts
|
124
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
@@ -0,0 +1,231 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 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 Shopping
|
22
|
+
module Merchant
|
23
|
+
module DataSources
|
24
|
+
module V1
|
25
|
+
# The [data source](/merchant/api/guides/data-sources/overview) for
|
26
|
+
# the Merchant Center account.
|
27
|
+
# @!attribute [rw] primary_product_data_source
|
28
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource]
|
29
|
+
# The [primary data
|
30
|
+
# source](https://support.google.com/merchants/answer/7439058) for local
|
31
|
+
# and online products.
|
32
|
+
#
|
33
|
+
# Note: The following fields are mutually exclusive: `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
34
|
+
# @!attribute [rw] supplemental_product_data_source
|
35
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::SupplementalProductDataSource]
|
36
|
+
# The [supplemental data
|
37
|
+
# source](https://support.google.com/merchants/answer/7439058) for local
|
38
|
+
# and online products.
|
39
|
+
#
|
40
|
+
# Note: The following fields are mutually exclusive: `supplemental_product_data_source`, `primary_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
41
|
+
# @!attribute [rw] local_inventory_data_source
|
42
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::LocalInventoryDataSource]
|
43
|
+
# The [local
|
44
|
+
# inventory](https://support.google.com/merchants/answer/7023001) data
|
45
|
+
# source.
|
46
|
+
#
|
47
|
+
# Note: The following fields are mutually exclusive: `local_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
48
|
+
# @!attribute [rw] regional_inventory_data_source
|
49
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::RegionalInventoryDataSource]
|
50
|
+
# The [regional
|
51
|
+
# inventory](https://support.google.com/merchants/answer/7439058) data
|
52
|
+
# source.
|
53
|
+
#
|
54
|
+
# Note: The following fields are mutually exclusive: `regional_inventory_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `promotion_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
55
|
+
# @!attribute [rw] promotion_data_source
|
56
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::PromotionDataSource]
|
57
|
+
# The [promotion](https://support.google.com/merchants/answer/2906014)
|
58
|
+
# data source.
|
59
|
+
#
|
60
|
+
# Note: The following fields are mutually exclusive: `promotion_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `product_review_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
61
|
+
# @!attribute [rw] product_review_data_source
|
62
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::ProductReviewDataSource]
|
63
|
+
# The [product
|
64
|
+
# review](https://support.google.com/merchants/answer/7045996)
|
65
|
+
# data source.
|
66
|
+
#
|
67
|
+
# Note: The following fields are mutually exclusive: `product_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `merchant_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
68
|
+
# @!attribute [rw] merchant_review_data_source
|
69
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::MerchantReviewDataSource]
|
70
|
+
# The [merchant
|
71
|
+
# review](https://support.google.com/merchants/answer/7045996)
|
72
|
+
# data source.
|
73
|
+
#
|
74
|
+
# Note: The following fields are mutually exclusive: `merchant_review_data_source`, `primary_product_data_source`, `supplemental_product_data_source`, `local_inventory_data_source`, `regional_inventory_data_source`, `promotion_data_source`, `product_review_data_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
75
|
+
# @!attribute [rw] name
|
76
|
+
# @return [::String]
|
77
|
+
# Required. Identifier. The name of the data source.
|
78
|
+
# Format:
|
79
|
+
# `accounts/{account}/dataSources/{datasource}`
|
80
|
+
# @!attribute [r] data_source_id
|
81
|
+
# @return [::Integer]
|
82
|
+
# Output only. The data source id.
|
83
|
+
# @!attribute [rw] display_name
|
84
|
+
# @return [::String]
|
85
|
+
# Required. The displayed data source name in the Merchant Center UI.
|
86
|
+
# @!attribute [r] input
|
87
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::DataSource::Input]
|
88
|
+
# Output only. Determines the type of input to the data source. Based on the
|
89
|
+
# input some settings might not work. Only generic data sources can be
|
90
|
+
# created through the API.
|
91
|
+
# @!attribute [rw] file_input
|
92
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::FileInput]
|
93
|
+
# Optional. The field is used only when data is managed through a file.
|
94
|
+
class DataSource
|
95
|
+
include ::Google::Protobuf::MessageExts
|
96
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
97
|
+
|
98
|
+
# Determines the type of input to the data source. Based on the input some
|
99
|
+
# settings might not be supported.
|
100
|
+
module Input
|
101
|
+
# Input unspecified.
|
102
|
+
INPUT_UNSPECIFIED = 0
|
103
|
+
|
104
|
+
# Represents data sources for which the data is primarily provided through
|
105
|
+
# the API.
|
106
|
+
API = 1
|
107
|
+
|
108
|
+
# Represents data sources for which the data is primarily provided through
|
109
|
+
# file input. Data can still be provided through the API.
|
110
|
+
FILE = 2
|
111
|
+
|
112
|
+
# The data source for products added directly in Merchant Center.
|
113
|
+
#
|
114
|
+
# This type of data source can not be created or updated through this API,
|
115
|
+
# only by Merchant Center UI.
|
116
|
+
#
|
117
|
+
# This type of data source is read only.
|
118
|
+
UI = 3
|
119
|
+
|
120
|
+
# This is also known as
|
121
|
+
# [Automated feeds](https://support.google.com/merchants/answer/12158480)
|
122
|
+
# used to automatically build your product data. This type of data source
|
123
|
+
# can be enabled or disabled through the Accounts sub-API.
|
124
|
+
AUTOFEED = 4
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
# Request message for the GetDataSource method.
|
129
|
+
# @!attribute [rw] name
|
130
|
+
# @return [::String]
|
131
|
+
# Required. The name of the data source to retrieve.
|
132
|
+
# Format: `accounts/{account}/dataSources/{datasource}`
|
133
|
+
class GetDataSourceRequest
|
134
|
+
include ::Google::Protobuf::MessageExts
|
135
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
136
|
+
end
|
137
|
+
|
138
|
+
# Request message for the ListDataSources method.
|
139
|
+
# @!attribute [rw] parent
|
140
|
+
# @return [::String]
|
141
|
+
# Required. The account to list data sources for.
|
142
|
+
# Format: `accounts/{account}`
|
143
|
+
# @!attribute [rw] page_size
|
144
|
+
# @return [::Integer]
|
145
|
+
# Optional. The maximum number of data sources to return. The service may
|
146
|
+
# return fewer than this value. The maximum value is 1000; values above 1000
|
147
|
+
# will be coerced to 1000. If unspecified, the maximum number of data sources
|
148
|
+
# will be returned.
|
149
|
+
# @!attribute [rw] page_token
|
150
|
+
# @return [::String]
|
151
|
+
# Optional. A page token, received from a previous `ListDataSources` call.
|
152
|
+
# Provide this to retrieve the subsequent page.
|
153
|
+
#
|
154
|
+
# When paginating, all other parameters provided to `ListDataSources`
|
155
|
+
# must match the call that provided the page token.
|
156
|
+
class ListDataSourcesRequest
|
157
|
+
include ::Google::Protobuf::MessageExts
|
158
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
159
|
+
end
|
160
|
+
|
161
|
+
# Response message for the ListDataSources method.
|
162
|
+
# @!attribute [rw] data_sources
|
163
|
+
# @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSource>]
|
164
|
+
# The data sources from the specified account.
|
165
|
+
# @!attribute [rw] next_page_token
|
166
|
+
# @return [::String]
|
167
|
+
# A token, which can be sent as `page_token` to retrieve the next page.
|
168
|
+
# If this field is omitted, there are no subsequent pages.
|
169
|
+
class ListDataSourcesResponse
|
170
|
+
include ::Google::Protobuf::MessageExts
|
171
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
172
|
+
end
|
173
|
+
|
174
|
+
# Request message for the CreateDataSource method.
|
175
|
+
# @!attribute [rw] parent
|
176
|
+
# @return [::String]
|
177
|
+
# Required. The account where this data source will be created.
|
178
|
+
# Format: `accounts/{account}`
|
179
|
+
# @!attribute [rw] data_source
|
180
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::DataSource]
|
181
|
+
# Required. The data source to create.
|
182
|
+
class CreateDataSourceRequest
|
183
|
+
include ::Google::Protobuf::MessageExts
|
184
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
185
|
+
end
|
186
|
+
|
187
|
+
# Request message for the UpdateDataSource method.
|
188
|
+
# @!attribute [rw] data_source
|
189
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::DataSource]
|
190
|
+
# Required. The data source resource to update.
|
191
|
+
# @!attribute [rw] update_mask
|
192
|
+
# @return [::Google::Protobuf::FieldMask]
|
193
|
+
# Required. The list of data source fields to be updated.
|
194
|
+
#
|
195
|
+
# Fields specified in the update mask without a value specified in the
|
196
|
+
# body will be deleted from the data source.
|
197
|
+
#
|
198
|
+
# Providing special "*" value for full data source replacement is not
|
199
|
+
# supported.
|
200
|
+
#
|
201
|
+
# For example, If you insert `updateMask=displayName` in the request, it will
|
202
|
+
# only update the `displayName` leaving all other fields untouched.
|
203
|
+
class UpdateDataSourceRequest
|
204
|
+
include ::Google::Protobuf::MessageExts
|
205
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
206
|
+
end
|
207
|
+
|
208
|
+
# Request message for the FetchDataSource method.
|
209
|
+
# @!attribute [rw] name
|
210
|
+
# @return [::String]
|
211
|
+
# Required. The name of the data source resource to fetch.
|
212
|
+
# Format: `accounts/{account}/dataSources/{datasource}`
|
213
|
+
class FetchDataSourceRequest
|
214
|
+
include ::Google::Protobuf::MessageExts
|
215
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
216
|
+
end
|
217
|
+
|
218
|
+
# Request message for the DeleteDataSource method.
|
219
|
+
# @!attribute [rw] name
|
220
|
+
# @return [::String]
|
221
|
+
# Required. The name of the data source to delete.
|
222
|
+
# Format: `accounts/{account}/dataSources/{datasource}`
|
223
|
+
class DeleteDataSourceRequest
|
224
|
+
include ::Google::Protobuf::MessageExts
|
225
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|
@@ -0,0 +1,298 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 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 Shopping
|
22
|
+
module Merchant
|
23
|
+
module DataSources
|
24
|
+
module V1
|
25
|
+
# The primary data source for local and online products.
|
26
|
+
# @!attribute [rw] legacy_local
|
27
|
+
# @return [::Boolean]
|
28
|
+
# Optional. Immutable. Determines whether the products of this data source
|
29
|
+
# are **only** targeting local destinations. Legacy local products are
|
30
|
+
# prefixed with `local~` in the product resource ID. For example,
|
31
|
+
# `accounts/123/products/local~en~US~sku123`.
|
32
|
+
# @!attribute [rw] feed_label
|
33
|
+
# @return [::String]
|
34
|
+
# Optional. Immutable. The feed label that is specified on the data source
|
35
|
+
# level.
|
36
|
+
#
|
37
|
+
# Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9),
|
38
|
+
# and dashes (-).
|
39
|
+
#
|
40
|
+
# See also [migration to feed
|
41
|
+
# labels](https://developers.google.com/shopping-content/guides/products/feed-labels).
|
42
|
+
#
|
43
|
+
# `feedLabel` and `contentLanguage` must be either both set or unset for data
|
44
|
+
# sources with product content type.
|
45
|
+
# They must be set for data sources with a file input.
|
46
|
+
#
|
47
|
+
# If set, the data source will only accept products matching this
|
48
|
+
# combination. If unset, the data source will accept products without that
|
49
|
+
# restriction.
|
50
|
+
# @!attribute [rw] content_language
|
51
|
+
# @return [::String]
|
52
|
+
# Optional. Immutable. The two-letter ISO 639-1 language of the items in the
|
53
|
+
# data source.
|
54
|
+
#
|
55
|
+
# `feedLabel` and `contentLanguage` must be either both set or unset.
|
56
|
+
# The fields can only be unset for data sources without file input.
|
57
|
+
#
|
58
|
+
# If set, the data source will only accept products matching this
|
59
|
+
# combination. If unset, the data source will accept products without that
|
60
|
+
# restriction.
|
61
|
+
# @!attribute [rw] countries
|
62
|
+
# @return [::Array<::String>]
|
63
|
+
# Optional. The countries where the items may be displayed. Represented as a
|
64
|
+
# [CLDR territory
|
65
|
+
# code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml).
|
66
|
+
# @!attribute [rw] default_rule
|
67
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::DefaultRule]
|
68
|
+
# Optional. Default rule management of the data source. If set, the linked
|
69
|
+
# data sources will be replaced.
|
70
|
+
# @!attribute [r] contains_custom_rules
|
71
|
+
# @return [::Boolean]
|
72
|
+
# Output only. The existing data source setup contains at least one custom
|
73
|
+
# (non-default) rule and therefore its management through the
|
74
|
+
# `default_rule_data_sources` field should be treated with caution.
|
75
|
+
# @!attribute [rw] destinations
|
76
|
+
# @return [::Array<::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::Destination>]
|
77
|
+
# Optional. A list of destinations describing where products of the data
|
78
|
+
# source can be shown.
|
79
|
+
#
|
80
|
+
# When retrieving the data source, the list contains all the destinations
|
81
|
+
# that can be used for the data source, including the ones that are disabled
|
82
|
+
# for the data source but enabled for the account.
|
83
|
+
#
|
84
|
+
# Only destinations that are enabled on the account, for example through
|
85
|
+
# program participation, can be enabled on the data source.
|
86
|
+
#
|
87
|
+
# If unset, during creation, the destinations will be inherited based on the
|
88
|
+
# account level program participation.
|
89
|
+
#
|
90
|
+
# If set, during creation or update, the data source will be set only for the
|
91
|
+
# specified destinations.
|
92
|
+
#
|
93
|
+
# Updating this field requires at least one destination.
|
94
|
+
class PrimaryProductDataSource
|
95
|
+
include ::Google::Protobuf::MessageExts
|
96
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
97
|
+
|
98
|
+
# Default rule management of the data source.
|
99
|
+
# @!attribute [rw] take_from_data_sources
|
100
|
+
# @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSourceReference>]
|
101
|
+
# Required. The list of data sources linked in the [default
|
102
|
+
# rule](https://support.google.com/merchants/answer/7450276).
|
103
|
+
# This list is ordered by the default rule priority of joining the data.
|
104
|
+
# It might include none or multiple references to `self` and supplemental
|
105
|
+
# data sources.
|
106
|
+
#
|
107
|
+
# The list must not be empty.
|
108
|
+
#
|
109
|
+
# To link the data source to the default rule, you need to add a
|
110
|
+
# new reference to this list (in sequential order).
|
111
|
+
#
|
112
|
+
# To unlink the data source from the default rule, you need to
|
113
|
+
# remove the given reference from this list.
|
114
|
+
#
|
115
|
+
# Changing the order of this list will result in changing the priority of
|
116
|
+
# data sources in the default rule.
|
117
|
+
#
|
118
|
+
# For example, providing the following list: [`1001`, `self`] will
|
119
|
+
# take attribute values from supplemental data source `1001`, and fallback
|
120
|
+
# to `self` if the attribute is not set in `1001`.
|
121
|
+
class DefaultRule
|
122
|
+
include ::Google::Protobuf::MessageExts
|
123
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
124
|
+
end
|
125
|
+
|
126
|
+
# Destinations also known as [Marketing
|
127
|
+
# methods](https://support.google.com/merchants/answer/15130232) selections.
|
128
|
+
# @!attribute [rw] destination
|
129
|
+
# @return [::Google::Shopping::Type::Destination::DestinationEnum]
|
130
|
+
# [Marketing methods](https://support.google.com/merchants/answer/15130232)
|
131
|
+
# (also known as destination) selections.
|
132
|
+
# @!attribute [rw] state
|
133
|
+
# @return [::Google::Shopping::Merchant::DataSources::V1::PrimaryProductDataSource::Destination::State]
|
134
|
+
# The state of the destination.
|
135
|
+
class Destination
|
136
|
+
include ::Google::Protobuf::MessageExts
|
137
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
138
|
+
|
139
|
+
# The state of the destination.
|
140
|
+
module State
|
141
|
+
# Not specified.
|
142
|
+
STATE_UNSPECIFIED = 0
|
143
|
+
|
144
|
+
# Indicates that the destination is enabled.
|
145
|
+
ENABLED = 1
|
146
|
+
|
147
|
+
# Indicates that the destination is disabled.
|
148
|
+
DISABLED = 2
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# The supplemental data source for local and online products. After creation,
|
154
|
+
# you should make sure to link the supplemental product data source into one or
|
155
|
+
# more primary product data sources.
|
156
|
+
# @!attribute [rw] feed_label
|
157
|
+
# @return [::String]
|
158
|
+
# Optional. Immutable. The feed label that is specified on the data source
|
159
|
+
# level.
|
160
|
+
#
|
161
|
+
# Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9),
|
162
|
+
# and dashes (-).
|
163
|
+
#
|
164
|
+
# See also [migration to feed
|
165
|
+
# labels](https://developers.google.com/shopping-content/guides/products/feed-labels).
|
166
|
+
#
|
167
|
+
# `feedLabel` and `contentLanguage` must be either both set or unset for data
|
168
|
+
# sources with product content type.
|
169
|
+
#
|
170
|
+
# They must be set for data sources with a [file
|
171
|
+
# input][google.shopping.merchant.datasources.v1.FileInput].
|
172
|
+
# The fields must be unset for data sources without [file
|
173
|
+
# input][google.shopping.merchant.datasources.v1.FileInput].
|
174
|
+
#
|
175
|
+
# If set, the data source will only accept products matching this
|
176
|
+
# combination. If unset, the data source will accept produts without that
|
177
|
+
# restriction.
|
178
|
+
# @!attribute [rw] content_language
|
179
|
+
# @return [::String]
|
180
|
+
# Optional. Immutable. The two-letter ISO 639-1 language of the items in the
|
181
|
+
# data source.
|
182
|
+
#
|
183
|
+
# `feedLabel` and `contentLanguage` must be either both set or unset.
|
184
|
+
# The fields can only be unset for data sources without file input.
|
185
|
+
#
|
186
|
+
# If set, the data source will only accept products matching this
|
187
|
+
# combination. If unset, the data source will accept produts without that
|
188
|
+
# restriction.
|
189
|
+
# @!attribute [r] referencing_primary_data_sources
|
190
|
+
# @return [::Array<::Google::Shopping::Merchant::DataSources::V1::DataSourceReference>]
|
191
|
+
# Output only. The (unordered and deduplicated) list of all primary data
|
192
|
+
# sources linked to this data source in either default or custom rules.
|
193
|
+
# Supplemental data source cannot be deleted before all links are removed.
|
194
|
+
class SupplementalProductDataSource
|
195
|
+
include ::Google::Protobuf::MessageExts
|
196
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
197
|
+
end
|
198
|
+
|
199
|
+
# The local inventory data source type is only available for file inputs and
|
200
|
+
# can't be used to create API local inventory data sources.
|
201
|
+
# @!attribute [rw] feed_label
|
202
|
+
# @return [::String]
|
203
|
+
# Required. Immutable. The feed label of the offers to which the local
|
204
|
+
# inventory is provided.
|
205
|
+
#
|
206
|
+
# Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9),
|
207
|
+
# and dashes (-).
|
208
|
+
#
|
209
|
+
# See also [migration to feed
|
210
|
+
# labels](https://developers.google.com/shopping-content/guides/products/feed-labels).
|
211
|
+
# @!attribute [rw] content_language
|
212
|
+
# @return [::String]
|
213
|
+
# Required. Immutable. The two-letter ISO 639-1 language of the items to
|
214
|
+
# which the local inventory is provided.
|
215
|
+
class LocalInventoryDataSource
|
216
|
+
include ::Google::Protobuf::MessageExts
|
217
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
218
|
+
end
|
219
|
+
|
220
|
+
# @!attribute [rw] feed_label
|
221
|
+
# @return [::String]
|
222
|
+
# Required. Immutable. The feed label of the offers to which the regional
|
223
|
+
# inventory is provided.
|
224
|
+
#
|
225
|
+
# Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9),
|
226
|
+
# and dashes (-).
|
227
|
+
#
|
228
|
+
# See also [migration to feed
|
229
|
+
# labels](https://developers.google.com/shopping-content/guides/products/feed-labels).
|
230
|
+
# @!attribute [rw] content_language
|
231
|
+
# @return [::String]
|
232
|
+
# Required. Immutable. The two-letter ISO 639-1 language of the items to
|
233
|
+
# which the regional inventory is provided.
|
234
|
+
class RegionalInventoryDataSource
|
235
|
+
include ::Google::Protobuf::MessageExts
|
236
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
237
|
+
end
|
238
|
+
|
239
|
+
# The promotion data source.
|
240
|
+
# @!attribute [rw] target_country
|
241
|
+
# @return [::String]
|
242
|
+
# Required. Immutable. The target country used as part of the unique
|
243
|
+
# identifier. Represented as a [CLDR territory
|
244
|
+
# code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml).
|
245
|
+
#
|
246
|
+
# Promotions are only available in selected
|
247
|
+
# [countries](https://support.google.com/merchants/answer/4588460).
|
248
|
+
# @!attribute [rw] content_language
|
249
|
+
# @return [::String]
|
250
|
+
# Required. Immutable. The two-letter ISO 639-1 language of the items in the
|
251
|
+
# data source.
|
252
|
+
class PromotionDataSource
|
253
|
+
include ::Google::Protobuf::MessageExts
|
254
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
255
|
+
end
|
256
|
+
|
257
|
+
# The product review data source.
|
258
|
+
class ProductReviewDataSource
|
259
|
+
include ::Google::Protobuf::MessageExts
|
260
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
261
|
+
end
|
262
|
+
|
263
|
+
# The merchant review data source.
|
264
|
+
class MerchantReviewDataSource
|
265
|
+
include ::Google::Protobuf::MessageExts
|
266
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
267
|
+
end
|
268
|
+
|
269
|
+
# Data source reference can be used to manage related data sources within the
|
270
|
+
# data source service.
|
271
|
+
# @!attribute [rw] self
|
272
|
+
# @return [::Boolean]
|
273
|
+
# Self should be used to reference the primary data source itself.
|
274
|
+
#
|
275
|
+
# Note: The following fields are mutually exclusive: `self`, `primary_data_source_name`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
276
|
+
# @!attribute [rw] primary_data_source_name
|
277
|
+
# @return [::String]
|
278
|
+
# Optional. The name of the primary data source.
|
279
|
+
# Format:
|
280
|
+
# `accounts/{account}/dataSources/{datasource}`
|
281
|
+
#
|
282
|
+
# Note: The following fields are mutually exclusive: `primary_data_source_name`, `self`, `supplemental_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
283
|
+
# @!attribute [rw] supplemental_data_source_name
|
284
|
+
# @return [::String]
|
285
|
+
# Optional. The name of the supplemental data source.
|
286
|
+
# Format:
|
287
|
+
# `accounts/{account}/dataSources/{datasource}`
|
288
|
+
#
|
289
|
+
# Note: The following fields are mutually exclusive: `supplemental_data_source_name`, `self`, `primary_data_source_name`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
290
|
+
class DataSourceReference
|
291
|
+
include ::Google::Protobuf::MessageExts
|
292
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
293
|
+
end
|
294
|
+
end
|
295
|
+
end
|
296
|
+
end
|
297
|
+
end
|
298
|
+
end
|