google-shopping-merchant-reviews-v1beta 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +154 -0
  6. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb +762 -0
  7. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb +49 -0
  8. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb +66 -0
  9. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb +708 -0
  10. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb +328 -0
  11. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb +54 -0
  12. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb +57 -0
  13. data/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb +54 -0
  14. data/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb +59 -0
  15. data/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb +54 -0
  16. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb +757 -0
  17. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb +49 -0
  18. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb +66 -0
  19. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb +703 -0
  20. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb +328 -0
  21. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb +54 -0
  22. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb +57 -0
  23. data/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb +56 -0
  24. data/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb +59 -0
  25. data/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb +53 -0
  26. data/lib/google/shopping/merchant/reviews/v1beta/rest.rb +40 -0
  27. data/lib/google/shopping/merchant/reviews/v1beta/version.rb +30 -0
  28. data/lib/google/shopping/merchant/reviews/v1beta.rb +48 -0
  29. data/lib/google-shopping-merchant-reviews-v1beta.rb +21 -0
  30. data/proto_docs/README.md +4 -0
  31. data/proto_docs/google/api/client.rb +459 -0
  32. data/proto_docs/google/api/field_behavior.rb +85 -0
  33. data/proto_docs/google/api/launch_stage.rb +71 -0
  34. data/proto_docs/google/api/resource.rb +227 -0
  35. data/proto_docs/google/protobuf/duration.rb +98 -0
  36. data/proto_docs/google/protobuf/empty.rb +34 -0
  37. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  38. data/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb +142 -0
  39. data/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb +187 -0
  40. data/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb +129 -0
  41. data/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb +266 -0
  42. data/proto_docs/google/shopping/type/types.rb +210 -0
  43. metadata +152 -0
@@ -0,0 +1,328 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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 "google/shopping/merchant/reviews/v1beta/merchantreviews_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Reviews
25
+ module V1beta
26
+ module MerchantReviewsService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the MerchantReviewsService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ # @private
35
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
36
+ # These require statements are intentionally placed here to initialize
37
+ # the REST modules only when it's required.
38
+ require "gapic/rest"
39
+
40
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
41
+ endpoint_template: endpoint_template,
42
+ universe_domain: universe_domain,
43
+ credentials: credentials,
44
+ numeric_enums: true,
45
+ service_name: self.class,
46
+ raise_faraday_errors: false,
47
+ logger: logger
48
+ end
49
+
50
+ ##
51
+ # The effective universe domain
52
+ #
53
+ # @return [String]
54
+ #
55
+ def universe_domain
56
+ @client_stub.universe_domain
57
+ end
58
+
59
+ ##
60
+ # The effective endpoint
61
+ #
62
+ # @return [String]
63
+ #
64
+ def endpoint
65
+ @client_stub.endpoint
66
+ end
67
+
68
+ ##
69
+ # The logger used for request/response debug logging.
70
+ #
71
+ # @return [Logger]
72
+ #
73
+ def logger stub: false
74
+ stub ? @client_stub.stub_logger : @client_stub.logger
75
+ end
76
+
77
+ ##
78
+ # Baseline implementation for the get_merchant_review REST call
79
+ #
80
+ # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest]
81
+ # A request object representing the call parameters. Required.
82
+ # @param options [::Gapic::CallOptions]
83
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
84
+ #
85
+ # @yield [result, operation] Access the result along with the TransportOperation object
86
+ # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview]
87
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
88
+ #
89
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview]
90
+ # A result object deserialized from the server's reply
91
+ def get_merchant_review request_pb, options = nil
92
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
93
+
94
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_merchant_review_request request_pb
95
+ query_string_params = if query_string_params.any?
96
+ query_string_params.to_h { |p| p.split "=", 2 }
97
+ else
98
+ {}
99
+ end
100
+
101
+ response = @client_stub.make_http_request(
102
+ verb,
103
+ uri: uri,
104
+ body: body || "",
105
+ params: query_string_params,
106
+ method_name: "get_merchant_review",
107
+ options: options
108
+ )
109
+ operation = ::Gapic::Rest::TransportOperation.new response
110
+ result = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.decode_json response.body, ignore_unknown_fields: true
111
+ catch :response do
112
+ yield result, operation if block_given?
113
+ result
114
+ end
115
+ end
116
+
117
+ ##
118
+ # Baseline implementation for the list_merchant_reviews REST call
119
+ #
120
+ # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest]
121
+ # A request object representing the call parameters. Required.
122
+ # @param options [::Gapic::CallOptions]
123
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
124
+ #
125
+ # @yield [result, operation] Access the result along with the TransportOperation object
126
+ # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse]
127
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
128
+ #
129
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse]
130
+ # A result object deserialized from the server's reply
131
+ def list_merchant_reviews request_pb, options = nil
132
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
133
+
134
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_merchant_reviews_request request_pb
135
+ query_string_params = if query_string_params.any?
136
+ query_string_params.to_h { |p| p.split "=", 2 }
137
+ else
138
+ {}
139
+ end
140
+
141
+ response = @client_stub.make_http_request(
142
+ verb,
143
+ uri: uri,
144
+ body: body || "",
145
+ params: query_string_params,
146
+ method_name: "list_merchant_reviews",
147
+ options: options
148
+ )
149
+ operation = ::Gapic::Rest::TransportOperation.new response
150
+ result = ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse.decode_json response.body, ignore_unknown_fields: true
151
+ catch :response do
152
+ yield result, operation if block_given?
153
+ result
154
+ end
155
+ end
156
+
157
+ ##
158
+ # Baseline implementation for the insert_merchant_review REST call
159
+ #
160
+ # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest]
161
+ # A request object representing the call parameters. Required.
162
+ # @param options [::Gapic::CallOptions]
163
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
164
+ #
165
+ # @yield [result, operation] Access the result along with the TransportOperation object
166
+ # @yieldparam result [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview]
167
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
168
+ #
169
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview]
170
+ # A result object deserialized from the server's reply
171
+ def insert_merchant_review request_pb, options = nil
172
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
173
+
174
+ verb, uri, query_string_params, body = ServiceStub.transcode_insert_merchant_review_request request_pb
175
+ query_string_params = if query_string_params.any?
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
+ else
178
+ {}
179
+ end
180
+
181
+ response = @client_stub.make_http_request(
182
+ verb,
183
+ uri: uri,
184
+ body: body || "",
185
+ params: query_string_params,
186
+ method_name: "insert_merchant_review",
187
+ options: options
188
+ )
189
+ operation = ::Gapic::Rest::TransportOperation.new response
190
+ result = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview.decode_json response.body, ignore_unknown_fields: true
191
+ catch :response do
192
+ yield result, operation if block_given?
193
+ result
194
+ end
195
+ end
196
+
197
+ ##
198
+ # Baseline implementation for the delete_merchant_review REST call
199
+ #
200
+ # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest]
201
+ # A request object representing the call parameters. Required.
202
+ # @param options [::Gapic::CallOptions]
203
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
204
+ #
205
+ # @yield [result, operation] Access the result along with the TransportOperation object
206
+ # @yieldparam result [::Google::Protobuf::Empty]
207
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
208
+ #
209
+ # @return [::Google::Protobuf::Empty]
210
+ # A result object deserialized from the server's reply
211
+ def delete_merchant_review request_pb, options = nil
212
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
213
+
214
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_merchant_review_request request_pb
215
+ query_string_params = if query_string_params.any?
216
+ query_string_params.to_h { |p| p.split "=", 2 }
217
+ else
218
+ {}
219
+ end
220
+
221
+ response = @client_stub.make_http_request(
222
+ verb,
223
+ uri: uri,
224
+ body: body || "",
225
+ params: query_string_params,
226
+ method_name: "delete_merchant_review",
227
+ options: options
228
+ )
229
+ operation = ::Gapic::Rest::TransportOperation.new response
230
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
231
+ catch :response do
232
+ yield result, operation if block_given?
233
+ result
234
+ end
235
+ end
236
+
237
+ ##
238
+ # @private
239
+ #
240
+ # GRPC transcoding helper method for the get_merchant_review REST call
241
+ #
242
+ # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest]
243
+ # A request object representing the call parameters. Required.
244
+ # @return [Array(String, [String, nil], Hash{String => String})]
245
+ # Uri, Body, Query string parameters
246
+ def self.transcode_get_merchant_review_request request_pb
247
+ transcoder = Gapic::Rest::GrpcTranscoder.new
248
+ .with_bindings(
249
+ uri_method: :get,
250
+ uri_template: "/reviews/v1beta/{name}",
251
+ matches: [
252
+ ["name", %r{^accounts/[^/]+/merchantReviews/[^/]+/?$}, false]
253
+ ]
254
+ )
255
+ transcoder.transcode request_pb
256
+ end
257
+
258
+ ##
259
+ # @private
260
+ #
261
+ # GRPC transcoding helper method for the list_merchant_reviews REST call
262
+ #
263
+ # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest]
264
+ # A request object representing the call parameters. Required.
265
+ # @return [Array(String, [String, nil], Hash{String => String})]
266
+ # Uri, Body, Query string parameters
267
+ def self.transcode_list_merchant_reviews_request request_pb
268
+ transcoder = Gapic::Rest::GrpcTranscoder.new
269
+ .with_bindings(
270
+ uri_method: :get,
271
+ uri_template: "/reviews/v1beta/{parent}/merchantReviews",
272
+ matches: [
273
+ ["parent", %r{^accounts/[^/]+/?$}, false]
274
+ ]
275
+ )
276
+ transcoder.transcode request_pb
277
+ end
278
+
279
+ ##
280
+ # @private
281
+ #
282
+ # GRPC transcoding helper method for the insert_merchant_review REST call
283
+ #
284
+ # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest]
285
+ # A request object representing the call parameters. Required.
286
+ # @return [Array(String, [String, nil], Hash{String => String})]
287
+ # Uri, Body, Query string parameters
288
+ def self.transcode_insert_merchant_review_request request_pb
289
+ transcoder = Gapic::Rest::GrpcTranscoder.new
290
+ .with_bindings(
291
+ uri_method: :post,
292
+ uri_template: "/reviews/v1beta/{parent}/merchantReviews:insert",
293
+ body: "merchant_review",
294
+ matches: [
295
+ ["parent", %r{^accounts/[^/]+/?$}, false]
296
+ ]
297
+ )
298
+ transcoder.transcode request_pb
299
+ end
300
+
301
+ ##
302
+ # @private
303
+ #
304
+ # GRPC transcoding helper method for the delete_merchant_review REST call
305
+ #
306
+ # @param request_pb [::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest]
307
+ # A request object representing the call parameters. Required.
308
+ # @return [Array(String, [String, nil], Hash{String => String})]
309
+ # Uri, Body, Query string parameters
310
+ def self.transcode_delete_merchant_review_request request_pb
311
+ transcoder = Gapic::Rest::GrpcTranscoder.new
312
+ .with_bindings(
313
+ uri_method: :delete,
314
+ uri_template: "/reviews/v1beta/{name}",
315
+ matches: [
316
+ ["name", %r{^accounts/[^/]+/merchantReviews/[^/]+/?$}, false]
317
+ ]
318
+ )
319
+ transcoder.transcode request_pb
320
+ end
321
+ end
322
+ end
323
+ end
324
+ end
325
+ end
326
+ end
327
+ end
328
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/shopping/merchant/reviews/v1beta/version"
24
+
25
+ require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials"
26
+ require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths"
27
+ require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module Reviews
33
+ module V1beta
34
+ ##
35
+ # Service to manage merchant reviews.
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest"
40
+ # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new
41
+ #
42
+ module MerchantReviewsService
43
+ # Client for the REST transport
44
+ module Rest
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+
53
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
54
+ require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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/shopping/merchant/reviews/v1beta/version"
24
+
25
+ require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials"
26
+ require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths"
27
+ require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client"
28
+ require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module Reviews
34
+ module V1beta
35
+ ##
36
+ # Service to manage merchant reviews.
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service"
41
+ # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Client.new
42
+ #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest"
46
+ # client = ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewsService::Rest::Client.new
47
+ #
48
+ module MerchantReviewsService
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "merchant_reviews_service", "helpers.rb"
57
+ require "google/shopping/merchant/reviews/v1beta/merchant_reviews_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/shopping/merchant/reviews/v1beta/merchantreviews_common.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/field_behavior_pb'
8
+ require 'google/protobuf/timestamp_pb'
9
+ require 'google/shopping/type/types_pb'
10
+
11
+
12
+ descriptor_data = "\nDgoogle/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a google/shopping/type/types.proto\"\xa5\x08\n\x18MerchantReviewAttributes\x12\x1d\n\x0bmerchant_id\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\'\n\x15merchant_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x1f\n\rmerchant_link\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12&\n\x14merchant_rating_link\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12\x1c\n\nmin_rating\x18\x05 \x01(\x03\x42\x03\xe0\x41\x01H\x04\x88\x01\x01\x12\x1c\n\nmax_rating\x18\x06 \x01(\x03\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12\x18\n\x06rating\x18\x07 \x01(\x01\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x17\n\x05title\x18\x08 \x01(\tB\x03\xe0\x41\x01H\x07\x88\x01\x01\x12\x19\n\x07\x63ontent\x18\t \x01(\tB\x03\xe0\x41\x02H\x08\x88\x01\x01\x12\x1d\n\x0breviewer_id\x18\n \x01(\tB\x03\xe0\x41\x01H\t\x88\x01\x01\x12#\n\x11reviewer_username\x18\x0b \x01(\tB\x03\xe0\x41\x01H\n\x88\x01\x01\x12\x1e\n\x0cis_anonymous\x18\x0c \x01(\x08\x42\x03\xe0\x41\x01H\x0b\x88\x01\x01\x12w\n\x11\x63ollection_method\x18\r \x01(\x0e\x32R.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes.CollectionMethodB\x03\xe0\x41\x01H\x0c\x88\x01\x01\x12\x39\n\x0breview_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02H\r\x88\x01\x01\x12!\n\x0freview_language\x18\x0f \x01(\tB\x03\xe0\x41\x02H\x0e\x88\x01\x01\x12 \n\x0ereview_country\x18\x10 \x01(\tB\x03\xe0\x41\x01H\x0f\x88\x01\x01\"y\n\x10\x43ollectionMethod\x12!\n\x1d\x43OLLECTION_METHOD_UNSPECIFIED\x10\x00\x12\x18\n\x14MERCHANT_UNSOLICITED\x10\x01\x12\x11\n\rPOINT_OF_SALE\x10\x02\x12\x15\n\x11\x41\x46TER_FULFILLMENT\x10\x03\x42\x0e\n\x0c_merchant_idB\x18\n\x16_merchant_display_nameB\x10\n\x0e_merchant_linkB\x17\n\x15_merchant_rating_linkB\r\n\x0b_min_ratingB\r\n\x0b_max_ratingB\t\n\x07_ratingB\x08\n\x06_titleB\n\n\x08_contentB\x0e\n\x0c_reviewer_idB\x14\n\x12_reviewer_usernameB\x0f\n\r_is_anonymousB\x14\n\x12_collection_methodB\x0e\n\x0c_review_timeB\x12\n\x10_review_languageB\x11\n\x0f_review_country\"\xd8\x07\n\x14MerchantReviewStatus\x12\x80\x01\n\x14\x64\x65stination_statuses\x18\x03 \x03(\x0b\x32].google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewDestinationStatusB\x03\xe0\x41\x03\x12z\n\x11item_level_issues\x18\x04 \x03(\x0b\x32Z.google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssueB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x39\n\x10last_update_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a~\n\x1fMerchantReviewDestinationStatus\x12[\n\x11reporting_context\x18\x01 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x1a\xcf\x03\n\x1cMerchantReviewItemLevelIssue\x12\x11\n\x04\x63ode\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12z\n\x08severity\x18\x02 \x01(\x0e\x32\x63.google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue.SeverityB\x03\xe0\x41\x03\x12\x17\n\nresolution\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tattribute\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12[\n\x11reporting_context\x18\x05 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x08 \x01(\tB\x03\xe0\x41\x03\"G\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x10\n\x0cNOT_IMPACTED\x10\x01\x12\x0f\n\x0b\x44ISAPPROVED\x10\x02\x42\x9a\x02\n+com.google.shopping.merchant.reviews.v1betaB\x1aMerchantReviewsCommonProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1betab\x06proto3"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
28
+ ]
29
+ imports.each do |type_name, expected_filename|
30
+ import_file = pool.lookup(type_name).file_descriptor
31
+ if import_file.name != expected_filename
32
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
33
+ end
34
+ end
35
+ warn "Each proto file must use a consistent fully-qualified name."
36
+ warn "This will become an error in the next major version."
37
+ end
38
+
39
+ module Google
40
+ module Shopping
41
+ module Merchant
42
+ module Reviews
43
+ module V1beta
44
+ MerchantReviewAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes").msgclass
45
+ MerchantReviewAttributes::CollectionMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes.CollectionMethod").enummodule
46
+ MerchantReviewStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus").msgclass
47
+ MerchantReviewStatus::MerchantReviewDestinationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewDestinationStatus").msgclass
48
+ MerchantReviewStatus::MerchantReviewItemLevelIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue").msgclass
49
+ MerchantReviewStatus::MerchantReviewItemLevelIssue::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReviewStatus.MerchantReviewItemLevelIssue.Severity").enummodule
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/shopping/merchant/reviews/v1beta/merchantreviews.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/annotations_pb'
8
+ require 'google/api/client_pb'
9
+ require 'google/api/field_behavior_pb'
10
+ require 'google/api/resource_pb'
11
+ require 'google/protobuf/empty_pb'
12
+ require 'google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb'
13
+ require 'google/shopping/type/types_pb'
14
+
15
+
16
+ descriptor_data = "\n=google/shopping/merchant/reviews/v1beta/merchantreviews.proto\x12\'google.shopping.merchant.reviews.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x44google/shopping/merchant/reviews/v1beta/merchantreviews_common.proto\x1a google/shopping/type/types.proto\"[\n\x18GetMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"^\n\x1b\x44\x65leteMerchantReviewRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)merchantapi.googleapis.com/MerchantReview\"\x90\x01\n\x1aListMerchantReviewsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)merchantapi.googleapis.com/MerchantReview\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xa3\x01\n\x1bInsertMerchantReviewRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0fmerchant_review\x18\x02 \x01(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReviewB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x89\x01\n\x1bListMerchantReviewsResponse\x12Q\n\x10merchant_reviews\x18\x01 \x03(\x0b\x32\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe1\x03\n\x0eMerchantReview\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1f\n\x12merchant_review_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Z\n\nattributes\x18\x03 \x01(\x0b\x32\x41.google.shopping.merchant.reviews.v1beta.MerchantReviewAttributesB\x03\xe0\x41\x01\x12\x45\n\x11\x63ustom_attributes\x18\x04 \x03(\x0b\x32%.google.shopping.type.CustomAttributeB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61ta_source\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x62\n\x16merchant_review_status\x18\x06 \x01(\x0b\x32=.google.shopping.merchant.reviews.v1beta.MerchantReviewStatusB\x03\xe0\x41\x03:z\xea\x41w\n)merchantapi.googleapis.com/MerchantReview\x12)accounts/{account}/merchantReviews/{name}*\x0fmerchantReviews2\x0emerchantReview2\xc8\x07\n\x16MerchantReviewsService\x12\xd3\x01\n\x11GetMerchantReview\x12\x41.google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x12\xe6\x01\n\x13ListMerchantReviews\x12\x43.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest\x1a\x44.google.shopping.merchant.reviews.v1beta.ListMerchantReviewsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/reviews/v1beta/{parent=accounts/*}/merchantReviews\x12\xea\x01\n\x14InsertMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest\x1a\x37.google.shopping.merchant.reviews.v1beta.MerchantReview\"S\x82\xd3\xe4\x93\x02M\":/reviews/v1beta/{parent=accounts/*}/merchantReviews:insert:\x0fmerchant_review\x12\xb8\x01\n\x14\x44\x65leteMerchantReview\x12\x44.google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/reviews/v1beta/{name=accounts/*/merchantReviews/*}\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xcf\x02\n+com.google.shopping.merchant.reviews.v1betaB\x14MerchantReviewsProtoP\x01ZKcloud.google.com/go/shopping/merchant/reviews/apiv1beta/reviewspb;reviewspb\xaa\x02\'Google.Shopping.Merchant.Reviews.V1Beta\xca\x02\'Google\\Shopping\\Merchant\\Reviews\\V1beta\xea\x02+Google::Shopping::Merchant::Reviews::V1beta\xea\x41\x38\n\"merchantapi.googleapis.com/Account\x12\x12\x61\x63\x63ounts/{account}b\x06proto3"
17
+
18
+ pool = Google::Protobuf::DescriptorPool.generated_pool
19
+
20
+ begin
21
+ pool.add_serialized_file(descriptor_data)
22
+ rescue TypeError
23
+ # Compatibility code: will be removed in the next major version.
24
+ require 'google/protobuf/descriptor_pb'
25
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
26
+ parsed.clear_dependency
27
+ serialized = parsed.class.encode(parsed)
28
+ file = pool.add_serialized_file(serialized)
29
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
30
+ imports = [
31
+ ["google.shopping.merchant.reviews.v1beta.MerchantReviewAttributes", "google/shopping/merchant/reviews/v1beta/merchantreviews_common.proto"],
32
+ ["google.shopping.type.CustomAttribute", "google/shopping/type/types.proto"],
33
+ ]
34
+ imports.each do |type_name, expected_filename|
35
+ import_file = pool.lookup(type_name).file_descriptor
36
+ if import_file.name != expected_filename
37
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
38
+ end
39
+ end
40
+ warn "Each proto file must use a consistent fully-qualified name."
41
+ warn "This will become an error in the next major version."
42
+ end
43
+
44
+ module Google
45
+ module Shopping
46
+ module Merchant
47
+ module Reviews
48
+ module V1beta
49
+ GetMerchantReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.GetMerchantReviewRequest").msgclass
50
+ DeleteMerchantReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.DeleteMerchantReviewRequest").msgclass
51
+ ListMerchantReviewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ListMerchantReviewsRequest").msgclass
52
+ InsertMerchantReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.InsertMerchantReviewRequest").msgclass
53
+ ListMerchantReviewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.ListMerchantReviewsResponse").msgclass
54
+ MerchantReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.reviews.v1beta.MerchantReview").msgclass
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,54 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/shopping/merchant/reviews/v1beta/merchantreviews.proto for package 'Google.Shopping.Merchant.Reviews.V1beta'
3
+ # Original file comments:
4
+ # Copyright 2024 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/shopping/merchant/reviews/v1beta/merchantreviews_pb'
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Reviews
26
+ module V1beta
27
+ module MerchantReviewsService
28
+ # Service to manage merchant reviews.
29
+ class Service
30
+
31
+ include ::GRPC::GenericService
32
+
33
+ self.marshal_class_method = :encode
34
+ self.unmarshal_class_method = :decode
35
+ self.service_name = 'google.shopping.merchant.reviews.v1beta.MerchantReviewsService'
36
+
37
+ # Gets a merchant review.
38
+ rpc :GetMerchantReview, ::Google::Shopping::Merchant::Reviews::V1beta::GetMerchantReviewRequest, ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview
39
+ # Lists merchant reviews.
40
+ rpc :ListMerchantReviews, ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsRequest, ::Google::Shopping::Merchant::Reviews::V1beta::ListMerchantReviewsResponse
41
+ # Inserts a review for your Merchant Center account. If the review
42
+ # already exists, then the review is replaced with the new instance.
43
+ rpc :InsertMerchantReview, ::Google::Shopping::Merchant::Reviews::V1beta::InsertMerchantReviewRequest, ::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview
44
+ # Deletes merchant review.
45
+ rpc :DeleteMerchantReview, ::Google::Shopping::Merchant::Reviews::V1beta::DeleteMerchantReviewRequest, ::Google::Protobuf::Empty
46
+ end
47
+
48
+ Stub = Service.rpc_stub_class
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end