google-shopping-merchant-notifications-v1beta 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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/client.rb +826 -0
  6. data/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials.rb +49 -0
  7. data/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/paths.rb +66 -0
  8. data/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client.rb +765 -0
  9. data/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/service_stub.rb +368 -0
  10. data/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service/rest.rb +54 -0
  11. data/lib/google/shopping/merchant/notifications/v1beta/notifications_api_service.rb +57 -0
  12. data/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_pb.rb +64 -0
  13. data/lib/google/shopping/merchant/notifications/v1beta/notificationsapi_services_pb.rb +66 -0
  14. data/lib/google/shopping/merchant/notifications/v1beta/rest.rb +39 -0
  15. data/lib/google/shopping/merchant/notifications/v1beta/version.rb +7 -2
  16. data/lib/google/shopping/merchant/notifications/v1beta.rb +47 -0
  17. data/lib/google-shopping-merchant-notifications-v1beta.rb +21 -0
  18. data/proto_docs/README.md +4 -0
  19. data/proto_docs/google/api/client.rb +399 -0
  20. data/proto_docs/google/api/field_behavior.rb +85 -0
  21. data/proto_docs/google/api/launch_stage.rb +71 -0
  22. data/proto_docs/google/api/resource.rb +222 -0
  23. data/proto_docs/google/protobuf/duration.rb +98 -0
  24. data/proto_docs/google/protobuf/empty.rb +34 -0
  25. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  26. data/proto_docs/google/shopping/merchant/notifications/v1beta/notificationsapi.rb +215 -0
  27. data/proto_docs/google/shopping/type/types.rb +183 -0
  28. metadata +87 -10
@@ -0,0 +1,368 @@
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/notifications/v1beta/notificationsapi_pb"
20
+
21
+ module Google
22
+ module Shopping
23
+ module Merchant
24
+ module Notifications
25
+ module V1beta
26
+ module NotificationsApiService
27
+ module Rest
28
+ ##
29
+ # REST service stub for the NotificationsApiService service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
43
+ numeric_enums: true,
44
+ raise_faraday_errors: false
45
+ end
46
+
47
+ ##
48
+ # The effective universe domain
49
+ #
50
+ # @return [String]
51
+ #
52
+ def universe_domain
53
+ @client_stub.universe_domain
54
+ end
55
+
56
+ ##
57
+ # The effective endpoint
58
+ #
59
+ # @return [String]
60
+ #
61
+ def endpoint
62
+ @client_stub.endpoint
63
+ end
64
+
65
+ ##
66
+ # Baseline implementation for the get_notification_subscription REST call
67
+ #
68
+ # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest]
69
+ # A request object representing the call parameters. Required.
70
+ # @param options [::Gapic::CallOptions]
71
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
72
+ #
73
+ # @yield [result, operation] Access the result along with the TransportOperation object
74
+ # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription]
75
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
76
+ #
77
+ # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription]
78
+ # A result object deserialized from the server's reply
79
+ def get_notification_subscription request_pb, options = nil
80
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
81
+
82
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_notification_subscription_request request_pb
83
+ query_string_params = if query_string_params.any?
84
+ query_string_params.to_h { |p| p.split "=", 2 }
85
+ else
86
+ {}
87
+ end
88
+
89
+ response = @client_stub.make_http_request(
90
+ verb,
91
+ uri: uri,
92
+ body: body || "",
93
+ params: query_string_params,
94
+ options: options
95
+ )
96
+ operation = ::Gapic::Rest::TransportOperation.new response
97
+ result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true
98
+
99
+ yield result, operation if block_given?
100
+ result
101
+ end
102
+
103
+ ##
104
+ # Baseline implementation for the create_notification_subscription REST call
105
+ #
106
+ # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest]
107
+ # A request object representing the call parameters. Required.
108
+ # @param options [::Gapic::CallOptions]
109
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
110
+ #
111
+ # @yield [result, operation] Access the result along with the TransportOperation object
112
+ # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription]
113
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
114
+ #
115
+ # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription]
116
+ # A result object deserialized from the server's reply
117
+ def create_notification_subscription request_pb, options = nil
118
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
119
+
120
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_notification_subscription_request request_pb
121
+ query_string_params = if query_string_params.any?
122
+ query_string_params.to_h { |p| p.split "=", 2 }
123
+ else
124
+ {}
125
+ end
126
+
127
+ response = @client_stub.make_http_request(
128
+ verb,
129
+ uri: uri,
130
+ body: body || "",
131
+ params: query_string_params,
132
+ options: options
133
+ )
134
+ operation = ::Gapic::Rest::TransportOperation.new response
135
+ result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true
136
+
137
+ yield result, operation if block_given?
138
+ result
139
+ end
140
+
141
+ ##
142
+ # Baseline implementation for the update_notification_subscription REST call
143
+ #
144
+ # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest]
145
+ # A request object representing the call parameters. Required.
146
+ # @param options [::Gapic::CallOptions]
147
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
148
+ #
149
+ # @yield [result, operation] Access the result along with the TransportOperation object
150
+ # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription]
151
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
152
+ #
153
+ # @return [::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription]
154
+ # A result object deserialized from the server's reply
155
+ def update_notification_subscription request_pb, options = nil
156
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
157
+
158
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_notification_subscription_request request_pb
159
+ query_string_params = if query_string_params.any?
160
+ query_string_params.to_h { |p| p.split "=", 2 }
161
+ else
162
+ {}
163
+ end
164
+
165
+ response = @client_stub.make_http_request(
166
+ verb,
167
+ uri: uri,
168
+ body: body || "",
169
+ params: query_string_params,
170
+ options: options
171
+ )
172
+ operation = ::Gapic::Rest::TransportOperation.new response
173
+ result = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription.decode_json response.body, ignore_unknown_fields: true
174
+
175
+ yield result, operation if block_given?
176
+ result
177
+ end
178
+
179
+ ##
180
+ # Baseline implementation for the delete_notification_subscription REST call
181
+ #
182
+ # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest]
183
+ # A request object representing the call parameters. Required.
184
+ # @param options [::Gapic::CallOptions]
185
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
186
+ #
187
+ # @yield [result, operation] Access the result along with the TransportOperation object
188
+ # @yieldparam result [::Google::Protobuf::Empty]
189
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
190
+ #
191
+ # @return [::Google::Protobuf::Empty]
192
+ # A result object deserialized from the server's reply
193
+ def delete_notification_subscription request_pb, options = nil
194
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
195
+
196
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_notification_subscription_request request_pb
197
+ query_string_params = if query_string_params.any?
198
+ query_string_params.to_h { |p| p.split "=", 2 }
199
+ else
200
+ {}
201
+ end
202
+
203
+ response = @client_stub.make_http_request(
204
+ verb,
205
+ uri: uri,
206
+ body: body || "",
207
+ params: query_string_params,
208
+ options: options
209
+ )
210
+ operation = ::Gapic::Rest::TransportOperation.new response
211
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
212
+
213
+ yield result, operation if block_given?
214
+ result
215
+ end
216
+
217
+ ##
218
+ # Baseline implementation for the list_notification_subscriptions REST call
219
+ #
220
+ # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest]
221
+ # A request object representing the call parameters. Required.
222
+ # @param options [::Gapic::CallOptions]
223
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
224
+ #
225
+ # @yield [result, operation] Access the result along with the TransportOperation object
226
+ # @yieldparam result [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse]
227
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
228
+ #
229
+ # @return [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse]
230
+ # A result object deserialized from the server's reply
231
+ def list_notification_subscriptions request_pb, options = nil
232
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
233
+
234
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_notification_subscriptions_request request_pb
235
+ query_string_params = if query_string_params.any?
236
+ query_string_params.to_h { |p| p.split "=", 2 }
237
+ else
238
+ {}
239
+ end
240
+
241
+ response = @client_stub.make_http_request(
242
+ verb,
243
+ uri: uri,
244
+ body: body || "",
245
+ params: query_string_params,
246
+ options: options
247
+ )
248
+ operation = ::Gapic::Rest::TransportOperation.new response
249
+ result = ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse.decode_json response.body, ignore_unknown_fields: true
250
+
251
+ yield result, operation if block_given?
252
+ result
253
+ end
254
+
255
+ ##
256
+ # @private
257
+ #
258
+ # GRPC transcoding helper method for the get_notification_subscription REST call
259
+ #
260
+ # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest]
261
+ # A request object representing the call parameters. Required.
262
+ # @return [Array(String, [String, nil], Hash{String => String})]
263
+ # Uri, Body, Query string parameters
264
+ def self.transcode_get_notification_subscription_request request_pb
265
+ transcoder = Gapic::Rest::GrpcTranscoder.new
266
+ .with_bindings(
267
+ uri_method: :get,
268
+ uri_template: "/notifications/v1beta/{name}",
269
+ matches: [
270
+ ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false]
271
+ ]
272
+ )
273
+ transcoder.transcode request_pb
274
+ end
275
+
276
+ ##
277
+ # @private
278
+ #
279
+ # GRPC transcoding helper method for the create_notification_subscription REST call
280
+ #
281
+ # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest]
282
+ # A request object representing the call parameters. Required.
283
+ # @return [Array(String, [String, nil], Hash{String => String})]
284
+ # Uri, Body, Query string parameters
285
+ def self.transcode_create_notification_subscription_request request_pb
286
+ transcoder = Gapic::Rest::GrpcTranscoder.new
287
+ .with_bindings(
288
+ uri_method: :post,
289
+ uri_template: "/notifications/v1beta/{parent}/notificationsubscriptions",
290
+ body: "notification_subscription",
291
+ matches: [
292
+ ["parent", %r{^accounts/[^/]+/?$}, false]
293
+ ]
294
+ )
295
+ transcoder.transcode request_pb
296
+ end
297
+
298
+ ##
299
+ # @private
300
+ #
301
+ # GRPC transcoding helper method for the update_notification_subscription REST call
302
+ #
303
+ # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest]
304
+ # A request object representing the call parameters. Required.
305
+ # @return [Array(String, [String, nil], Hash{String => String})]
306
+ # Uri, Body, Query string parameters
307
+ def self.transcode_update_notification_subscription_request request_pb
308
+ transcoder = Gapic::Rest::GrpcTranscoder.new
309
+ .with_bindings(
310
+ uri_method: :patch,
311
+ uri_template: "/notifications/v1beta/{notification_subscription.name}",
312
+ body: "notification_subscription",
313
+ matches: [
314
+ ["notification_subscription.name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false]
315
+ ]
316
+ )
317
+ transcoder.transcode request_pb
318
+ end
319
+
320
+ ##
321
+ # @private
322
+ #
323
+ # GRPC transcoding helper method for the delete_notification_subscription REST call
324
+ #
325
+ # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest]
326
+ # A request object representing the call parameters. Required.
327
+ # @return [Array(String, [String, nil], Hash{String => String})]
328
+ # Uri, Body, Query string parameters
329
+ def self.transcode_delete_notification_subscription_request request_pb
330
+ transcoder = Gapic::Rest::GrpcTranscoder.new
331
+ .with_bindings(
332
+ uri_method: :delete,
333
+ uri_template: "/notifications/v1beta/{name}",
334
+ matches: [
335
+ ["name", %r{^accounts/[^/]+/notificationsubscriptions/[^/]+/?$}, false]
336
+ ]
337
+ )
338
+ transcoder.transcode request_pb
339
+ end
340
+
341
+ ##
342
+ # @private
343
+ #
344
+ # GRPC transcoding helper method for the list_notification_subscriptions REST call
345
+ #
346
+ # @param request_pb [::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest]
347
+ # A request object representing the call parameters. Required.
348
+ # @return [Array(String, [String, nil], Hash{String => String})]
349
+ # Uri, Body, Query string parameters
350
+ def self.transcode_list_notification_subscriptions_request request_pb
351
+ transcoder = Gapic::Rest::GrpcTranscoder.new
352
+ .with_bindings(
353
+ uri_method: :get,
354
+ uri_template: "/notifications/v1beta/{parent}/notificationsubscriptions",
355
+ matches: [
356
+ ["parent", %r{^accounts/[^/]+/?$}, false]
357
+ ]
358
+ )
359
+ transcoder.transcode request_pb
360
+ end
361
+ end
362
+ end
363
+ end
364
+ end
365
+ end
366
+ end
367
+ end
368
+ 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/notifications/v1beta/version"
24
+
25
+ require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials"
26
+ require "google/shopping/merchant/notifications/v1beta/notifications_api_service/paths"
27
+ require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest/client"
28
+
29
+ module Google
30
+ module Shopping
31
+ module Merchant
32
+ module Notifications
33
+ module V1beta
34
+ ##
35
+ # Service to manage notification subscriptions for merchants
36
+ #
37
+ # To load this service and instantiate a REST client:
38
+ #
39
+ # require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest"
40
+ # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new
41
+ #
42
+ module NotificationsApiService
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/notifications/v1beta/notifications_api_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/notifications/v1beta/version"
24
+
25
+ require "google/shopping/merchant/notifications/v1beta/notifications_api_service/credentials"
26
+ require "google/shopping/merchant/notifications/v1beta/notifications_api_service/paths"
27
+ require "google/shopping/merchant/notifications/v1beta/notifications_api_service/client"
28
+ require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest"
29
+
30
+ module Google
31
+ module Shopping
32
+ module Merchant
33
+ module Notifications
34
+ module V1beta
35
+ ##
36
+ # Service to manage notification subscriptions for merchants
37
+ #
38
+ # @example Load this service and instantiate a gRPC client
39
+ #
40
+ # require "google/shopping/merchant/notifications/v1beta/notifications_api_service"
41
+ # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Client.new
42
+ #
43
+ # @example Load this service and instantiate a REST client
44
+ #
45
+ # require "google/shopping/merchant/notifications/v1beta/notifications_api_service/rest"
46
+ # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new
47
+ #
48
+ module NotificationsApiService
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "notifications_api_service", "helpers.rb"
57
+ require "google/shopping/merchant/notifications/v1beta/notifications_api_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/shopping/merchant/notifications/v1beta/notificationsapi.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/protobuf/field_mask_pb'
13
+ require 'google/shopping/type/types_pb'
14
+
15
+
16
+ descriptor_data = "\nDgoogle/shopping/merchant/notifications/v1beta/notificationsapi.proto\x12-google.shopping.merchant.notifications.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 google/protobuf/field_mask.proto\x1a google/shopping/type/types.proto\"o\n\"GetNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\xe5\x01\n%CreateNotificationSubscriptionRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12o\n\x19notification_subscription\x18\x02 \x01(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscriptionB\x03\xe0\x41\x02\"\xc9\x01\n%UpdateNotificationSubscriptionRequest\x12o\n\x19notification_subscription\x18\x01 \x01(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscriptionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"r\n%DeleteNotificationSubscriptionRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3merchantapi.googleapis.com/NotificationSubscription\"\x9a\x01\n$ListNotificationSubscriptionsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33merchantapi.googleapis.com/NotificationSubscription\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\xad\x01\n%ListNotificationSubscriptionsResponse\x12k\n\x1anotification_subscriptions\x18\x01 \x03(\x0b\x32G.google.shopping.merchant.notifications.v1beta.NotificationSubscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xea\x03\n\x18NotificationSubscription\x12\x1e\n\x14\x61ll_managed_accounts\x18\x03 \x01(\x08H\x00\x12\x18\n\x0etarget_account\x18\x04 \x01(\tH\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12w\n\x10registered_event\x18\x02 \x01(\x0e\x32].google.shopping.merchant.notifications.v1beta.NotificationSubscription.NotificationEventType\x12\x15\n\rcall_back_uri\x18\x05 \x01(\t\"[\n\x15NotificationEventType\x12\'\n#NOTIFICATION_EVENT_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15PRODUCT_STATUS_CHANGE\x10\x01:\x82\x01\xea\x41\x7f\n3merchantapi.googleapis.com/NotificationSubscription\x12Haccounts/{account}/notificationsubscriptions/{notification_subscription}B\x0f\n\rinterested_in\"\xf8\x01\n\rProductChange\x12\x16\n\told_value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnew_value\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0bregion_code\x18\x03 \x01(\tH\x02\x88\x01\x01\x12[\n\x11reporting_context\x18\x04 \x01(\x0e\x32;.google.shopping.type.ReportingContext.ReportingContextEnumH\x03\x88\x01\x01\x42\x0c\n\n_old_valueB\x0c\n\n_new_valueB\x0e\n\x0c_region_codeB\x14\n\x12_reporting_context\"\xd6\x03\n\x1aProductStatusChangeMessage\x12\x14\n\x07\x61\x63\x63ount\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10managing_account\x18\x02 \x01(\tH\x01\x88\x01\x01\x12S\n\rresource_type\x18\x03 \x01(\x0e\x32\x37.google.shopping.merchant.notifications.v1beta.ResourceH\x02\x88\x01\x01\x12P\n\tattribute\x18\x04 \x01(\x0e\x32\x38.google.shopping.merchant.notifications.v1beta.AttributeH\x03\x88\x01\x01\x12M\n\x07\x63hanges\x18\x05 \x03(\x0b\x32<.google.shopping.merchant.notifications.v1beta.ProductChange\x12\x18\n\x0bresource_id\x18\x06 \x01(\tH\x04\x88\x01\x01\x12\x15\n\x08resource\x18\x07 \x01(\tH\x05\x88\x01\x01\x42\n\n\x08_accountB\x13\n\x11_managing_accountB\x10\n\x0e_resource_typeB\x0c\n\n_attributeB\x0e\n\x0c_resource_idB\x0b\n\t_resource*1\n\x08Resource\x12\x18\n\x14RESOURCE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRODUCT\x10\x01*2\n\tAttribute\x12\x19\n\x15\x41TTRIBUTE_UNSPECIFIED\x10\x00\x12\n\n\x06STATUS\x10\x01\x32\xb5\x0c\n\x17NotificationsApiService\x12\x8d\x02\n\x1bGetNotificationSubscription\x12Q.google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/notifications/v1beta/{name=accounts/*/notificationsubscriptions/*}\x12\xcb\x02\n\x1e\x43reateNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"\x89\x01\xda\x41 parent,notification_subscription\x82\xd3\xe4\x93\x02`\"C/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions:\x19notification_subscription\x12\xea\x02\n\x1eUpdateNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest\x1aG.google.shopping.merchant.notifications.v1beta.NotificationSubscription\"\xa8\x01\xda\x41%notification_subscription,update_mask\x82\xd3\xe4\x93\x02z2]/notifications/v1beta/{notification_subscription.name=accounts/*/notificationsubscriptions/*}:\x19notification_subscription\x12\xe2\x01\n\x1e\x44\x65leteNotificationSubscription\x12T.google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest\x1a\x16.google.protobuf.Empty\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45*C/notifications/v1beta/{name=accounts/*/notificationsubscriptions/*}\x12\xa0\x02\n\x1dListNotificationSubscriptions\x12S.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest\x1aT.google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/notifications/v1beta/{parent=accounts/*}/notificationsubscriptions\x1aG\xca\x41\x1amerchantapi.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/contentB\xe6\x01\n1com.google.shopping.merchant.notifications.v1betaB\x15NotificationsApiProtoP\x01Z]cloud.google.com/go/shopping/merchant/notifications/apiv1beta/notificationspb;notificationspb\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.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
32
+ ]
33
+ imports.each do |type_name, expected_filename|
34
+ import_file = pool.lookup(type_name).file_descriptor
35
+ if import_file.name != expected_filename
36
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
37
+ end
38
+ end
39
+ warn "Each proto file must use a consistent fully-qualified name."
40
+ warn "This will become an error in the next major version."
41
+ end
42
+
43
+ module Google
44
+ module Shopping
45
+ module Merchant
46
+ module Notifications
47
+ module V1beta
48
+ GetNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.GetNotificationSubscriptionRequest").msgclass
49
+ CreateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.CreateNotificationSubscriptionRequest").msgclass
50
+ UpdateNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.UpdateNotificationSubscriptionRequest").msgclass
51
+ DeleteNotificationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.DeleteNotificationSubscriptionRequest").msgclass
52
+ ListNotificationSubscriptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsRequest").msgclass
53
+ ListNotificationSubscriptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ListNotificationSubscriptionsResponse").msgclass
54
+ NotificationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.NotificationSubscription").msgclass
55
+ NotificationSubscription::NotificationEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.NotificationSubscription.NotificationEventType").enummodule
56
+ ProductChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ProductChange").msgclass
57
+ ProductStatusChangeMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.ProductStatusChangeMessage").msgclass
58
+ Resource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.Resource").enummodule
59
+ Attribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.shopping.merchant.notifications.v1beta.Attribute").enummodule
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,66 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/shopping/merchant/notifications/v1beta/notificationsapi.proto for package 'google.shopping.merchant.notifications.v1beta'
3
+ # Original file comments:
4
+ # Copyright 2023 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/notifications/v1beta/notificationsapi_pb'
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Notifications
26
+ module V1beta
27
+ module NotificationsApiService
28
+ # Service to manage notification subscriptions for merchants
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.notifications.v1beta.NotificationsApiService'
36
+
37
+ # Gets notification subscriptions for an account.
38
+ rpc :GetNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::GetNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription
39
+ # Creates a notification subscription for a merchant. We will allow the
40
+ # following types of notification subscriptions to exist together (per
41
+ # merchant as a subscriber per event type):
42
+ # 1. Subscription for all managed accounts + subscription for self
43
+ # 2. Multiple "partial" subscriptions for managed accounts + subscription
44
+ # for self
45
+ #
46
+ # we will not allow (per merchant as a subscriber per event type):
47
+ # 1. multiple self subscriptions.
48
+ # 2. multiple "all managed accounts" subscriptions.
49
+ # 3. all and partial subscriptions at the same time.
50
+ # 4. multiple partial subscriptions for the same target account
51
+ rpc :CreateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::CreateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription
52
+ # Updates an existing notification subscription for a merchant.
53
+ rpc :UpdateNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::UpdateNotificationSubscriptionRequest, ::Google::Shopping::Merchant::Notifications::V1beta::NotificationSubscription
54
+ # Deletes a notification subscription for a merchant.
55
+ rpc :DeleteNotificationSubscription, ::Google::Shopping::Merchant::Notifications::V1beta::DeleteNotificationSubscriptionRequest, ::Google::Protobuf::Empty
56
+ # Gets all the notification subscriptions for a merchant.
57
+ rpc :ListNotificationSubscriptions, ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsRequest, ::Google::Shopping::Merchant::Notifications::V1beta::ListNotificationSubscriptionsResponse
58
+ end
59
+
60
+ Stub = Service.rpc_stub_class
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,39 @@
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/notifications/v1beta/notifications_api_service/rest"
20
+ require "google/shopping/merchant/notifications/v1beta/version"
21
+
22
+ module Google
23
+ module Shopping
24
+ module Merchant
25
+ module Notifications
26
+ ##
27
+ # To load just the REST part of this package, including all its services, and instantiate a REST client:
28
+ #
29
+ # @example
30
+ #
31
+ # require "google/shopping/merchant/notifications/v1beta/rest"
32
+ # client = ::Google::Shopping::Merchant::Notifications::V1beta::NotificationsApiService::Rest::Client.new
33
+ #
34
+ module V1beta
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end