google-cloud-recommendation_engine-v1beta1 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (20) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/client.rb +14 -3
  3. data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/operations.rb +13 -2
  4. data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/rest/client.rb +111 -2
  5. data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/rest/operations.rb +82 -5
  6. data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/rest/service_stub.rb +6 -6
  7. data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/client.rb +14 -3
  8. data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/rest/client.rb +56 -2
  9. data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/rest/service_stub.rb +3 -3
  10. data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/client.rb +14 -3
  11. data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/rest/client.rb +24 -2
  12. data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/rest/service_stub.rb +1 -1
  13. data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/client.rb +14 -3
  14. data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/operations.rb +13 -2
  15. data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/rest/client.rb +102 -2
  16. data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/rest/operations.rb +82 -5
  17. data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/rest/service_stub.rb +5 -5
  18. data/lib/google/cloud/recommendation_engine/v1beta1/version.rb +1 -1
  19. data/proto_docs/google/api/field_behavior.rb +14 -0
  20. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd4a711e48d28a9e3fdd593d42fc7c5093066fa0d381e449fe3a177f00f2d8f2
4
- data.tar.gz: cf8fe6e914556568699b6ed869bf2476394901343548b29fac64361c395cd5e6
3
+ metadata.gz: 4ee84bc4283f46788c7e4adbd46b9c3a33ab617ae90d276944cd0e8c52829b4e
4
+ data.tar.gz: 18c1b72c372044544915c5a145d56dc2a820908d119598b423f8263bc921dd46
5
5
  SHA512:
6
- metadata.gz: a0f2d5e019b523bb5d77d41bbe8e498572412f4cfcedeb4bed4e41327e4319790b7d875a447c37cb1309ed4a6aba8c706f76448ada521c3563478bf0a62407ed
7
- data.tar.gz: 95ac82d4fa6640e8f49bb42b819d83b863e61b626d3b5ee54bc137f624e82bddd6238616195b67e0a81df3ca8ee59006140fe29c7767157e0c41393d5c3cd593
6
+ metadata.gz: dea534dee0f0722f3ee1a83106da56333df5b3c48ff835feb09a3895297176c84e392093d7492771b1dbfcd631062432d3d852f6861d1ea9ea33819745b6404e
7
+ data.tar.gz: b008ac4d5789ee4aef6846209ca7d4569fc7668de82a4001c9653a7fecbc9aac2654179b6fd23150e8199921cc1045e84d6b9490fcac3cc4601970546d69b23e
@@ -153,7 +153,7 @@ module Google
153
153
  credentials = @config.credentials
154
154
  # Use self-signed JWT if the endpoint is unchanged from default,
155
155
  # but only if the default endpoint does not have a region prefix.
156
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
156
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
157
157
  !@config.endpoint.split(".").first.include?("-")
158
158
  credentials ||= Credentials.default scope: @config.scope,
159
159
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -174,7 +174,8 @@ module Google
174
174
  credentials: credentials,
175
175
  endpoint: @config.endpoint,
176
176
  channel_args: @config.channel_args,
177
- interceptors: @config.interceptors
177
+ interceptors: @config.interceptors,
178
+ channel_pool_config: @config.channel_pool
178
179
  )
179
180
  end
180
181
 
@@ -827,7 +828,9 @@ module Google
827
828
  class Configuration
828
829
  extend ::Gapic::Config
829
830
 
830
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
831
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
832
+
833
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
831
834
  config_attr :credentials, nil do |value|
832
835
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
833
836
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -862,6 +865,14 @@ module Google
862
865
  end
863
866
  end
864
867
 
868
+ ##
869
+ # Configuration for the channel pool
870
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
871
+ #
872
+ def channel_pool
873
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
874
+ end
875
+
865
876
  ##
866
877
  # Configuration RPC class for the CatalogService API.
867
878
  #
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -664,7 +665,9 @@ module Google
664
665
  class Configuration
665
666
  extend ::Gapic::Config
666
667
 
667
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
668
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
669
+
670
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
668
671
  config_attr :credentials, nil do |value|
669
672
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
670
673
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -699,6 +702,14 @@ module Google
699
702
  end
700
703
  end
701
704
 
705
+ ##
706
+ # Configuration for the channel pool
707
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
708
+ #
709
+ def channel_pool
710
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
711
+ end
712
+
702
713
  ##
703
714
  # Configuration RPC class for the Operations API.
704
715
  #
@@ -149,7 +149,7 @@ module Google
149
149
  credentials = @config.credentials
150
150
  # Use self-signed JWT if the endpoint is unchanged from default,
151
151
  # but only if the default endpoint does not have a region prefix.
152
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
152
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
153
153
  !@config.endpoint.split(".").first.include?("-")
154
154
  credentials ||= Credentials.default scope: @config.scope,
155
155
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -208,6 +208,22 @@ module Google
208
208
  # @return [::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem]
209
209
  #
210
210
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
211
+ #
212
+ # @example Basic example
213
+ # require "google/cloud/recommendation_engine/v1beta1"
214
+ #
215
+ # # Create a client object. The client can be reused for multiple calls.
216
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Rest::Client.new
217
+ #
218
+ # # Create a request. To set request fields, pass in keyword arguments.
219
+ # request = Google::Cloud::RecommendationEngine::V1beta1::CreateCatalogItemRequest.new
220
+ #
221
+ # # Call the create_catalog_item method.
222
+ # result = client.create_catalog_item request
223
+ #
224
+ # # The returned object is of type Google::Cloud::RecommendationEngine::V1beta1::CatalogItem.
225
+ # p result
226
+ #
211
227
  def create_catalog_item request, options = nil
212
228
  raise ::ArgumentError, "request must be provided" if request.nil?
213
229
 
@@ -271,6 +287,22 @@ module Google
271
287
  # @return [::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem]
272
288
  #
273
289
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
290
+ #
291
+ # @example Basic example
292
+ # require "google/cloud/recommendation_engine/v1beta1"
293
+ #
294
+ # # Create a client object. The client can be reused for multiple calls.
295
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Rest::Client.new
296
+ #
297
+ # # Create a request. To set request fields, pass in keyword arguments.
298
+ # request = Google::Cloud::RecommendationEngine::V1beta1::GetCatalogItemRequest.new
299
+ #
300
+ # # Call the get_catalog_item method.
301
+ # result = client.get_catalog_item request
302
+ #
303
+ # # The returned object is of type Google::Cloud::RecommendationEngine::V1beta1::CatalogItem.
304
+ # p result
305
+ #
274
306
  def get_catalog_item request, options = nil
275
307
  raise ::ArgumentError, "request must be provided" if request.nil?
276
308
 
@@ -341,6 +373,26 @@ module Google
341
373
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem>]
342
374
  #
343
375
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
376
+ #
377
+ # @example Basic example
378
+ # require "google/cloud/recommendation_engine/v1beta1"
379
+ #
380
+ # # Create a client object. The client can be reused for multiple calls.
381
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Rest::Client.new
382
+ #
383
+ # # Create a request. To set request fields, pass in keyword arguments.
384
+ # request = Google::Cloud::RecommendationEngine::V1beta1::ListCatalogItemsRequest.new
385
+ #
386
+ # # Call the list_catalog_items method.
387
+ # result = client.list_catalog_items request
388
+ #
389
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
390
+ # # over elements, and API calls will be issued to fetch pages as needed.
391
+ # result.each do |item|
392
+ # # Each element is of type ::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem.
393
+ # p item
394
+ # end
395
+ #
344
396
  def list_catalog_items request, options = nil
345
397
  raise ::ArgumentError, "request must be provided" if request.nil?
346
398
 
@@ -412,6 +464,22 @@ module Google
412
464
  # @return [::Google::Cloud::RecommendationEngine::V1beta1::CatalogItem]
413
465
  #
414
466
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
467
+ #
468
+ # @example Basic example
469
+ # require "google/cloud/recommendation_engine/v1beta1"
470
+ #
471
+ # # Create a client object. The client can be reused for multiple calls.
472
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Rest::Client.new
473
+ #
474
+ # # Create a request. To set request fields, pass in keyword arguments.
475
+ # request = Google::Cloud::RecommendationEngine::V1beta1::UpdateCatalogItemRequest.new
476
+ #
477
+ # # Call the update_catalog_item method.
478
+ # result = client.update_catalog_item request
479
+ #
480
+ # # The returned object is of type Google::Cloud::RecommendationEngine::V1beta1::CatalogItem.
481
+ # p result
482
+ #
415
483
  def update_catalog_item request, options = nil
416
484
  raise ::ArgumentError, "request must be provided" if request.nil?
417
485
 
@@ -475,6 +543,22 @@ module Google
475
543
  # @return [::Google::Protobuf::Empty]
476
544
  #
477
545
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
546
+ #
547
+ # @example Basic example
548
+ # require "google/cloud/recommendation_engine/v1beta1"
549
+ #
550
+ # # Create a client object. The client can be reused for multiple calls.
551
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Rest::Client.new
552
+ #
553
+ # # Create a request. To set request fields, pass in keyword arguments.
554
+ # request = Google::Cloud::RecommendationEngine::V1beta1::DeleteCatalogItemRequest.new
555
+ #
556
+ # # Call the delete_catalog_item method.
557
+ # result = client.delete_catalog_item request
558
+ #
559
+ # # The returned object is of type Google::Protobuf::Empty.
560
+ # p result
561
+ #
478
562
  def delete_catalog_item request, options = nil
479
563
  raise ::ArgumentError, "request must be provided" if request.nil?
480
564
 
@@ -551,6 +635,29 @@ module Google
551
635
  # @return [::Gapic::Operation]
552
636
  #
553
637
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
638
+ #
639
+ # @example Basic example
640
+ # require "google/cloud/recommendation_engine/v1beta1"
641
+ #
642
+ # # Create a client object. The client can be reused for multiple calls.
643
+ # client = Google::Cloud::RecommendationEngine::V1beta1::CatalogService::Rest::Client.new
644
+ #
645
+ # # Create a request. To set request fields, pass in keyword arguments.
646
+ # request = Google::Cloud::RecommendationEngine::V1beta1::ImportCatalogItemsRequest.new
647
+ #
648
+ # # Call the import_catalog_items method.
649
+ # result = client.import_catalog_items request
650
+ #
651
+ # # The returned object is of type Gapic::Operation. You can use it to
652
+ # # check the status of an operation, cancel it, or wait for results.
653
+ # # Here is how to wait for a response.
654
+ # result.wait_until_done! timeout: 60
655
+ # if result.response?
656
+ # p result.response
657
+ # else
658
+ # puts "No response received."
659
+ # end
660
+ #
554
661
  def import_catalog_items request, options = nil
555
662
  raise ::ArgumentError, "request must be provided" if request.nil?
556
663
 
@@ -660,7 +767,9 @@ module Google
660
767
  class Configuration
661
768
  extend ::Gapic::Config
662
769
 
663
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
770
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
771
+
772
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
664
773
  config_attr :credentials, nil do |value|
665
774
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
666
775
  allowed.any? { |klass| klass === value }
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -446,7 +521,9 @@ module Google
446
521
  class Configuration
447
522
  extend ::Gapic::Config
448
523
 
449
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
524
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
525
+
526
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
450
527
  config_attr :credentials, nil do |value|
451
528
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
452
529
  allowed.any? { |klass| klass === value }
@@ -567,7 +644,7 @@ module Google
567
644
 
568
645
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
569
646
  query_string_params = if query_string_params.any?
570
- query_string_params.to_h { |p| p.split("=", 2) }
647
+ query_string_params.to_h { |p| p.split "=", 2 }
571
648
  else
572
649
  {}
573
650
  end
@@ -605,7 +682,7 @@ module Google
605
682
 
606
683
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
607
684
  query_string_params = if query_string_params.any?
608
- query_string_params.to_h { |p| p.split("=", 2) }
685
+ query_string_params.to_h { |p| p.split "=", 2 }
609
686
  else
610
687
  {}
611
688
  end
@@ -643,7 +720,7 @@ module Google
643
720
 
644
721
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
645
722
  query_string_params = if query_string_params.any?
646
- query_string_params.to_h { |p| p.split("=", 2) }
723
+ query_string_params.to_h { |p| p.split "=", 2 }
647
724
  else
648
725
  {}
649
726
  end
@@ -681,7 +758,7 @@ module Google
681
758
 
682
759
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
683
760
  query_string_params = if query_string_params.any?
684
- query_string_params.to_h { |p| p.split("=", 2) }
761
+ query_string_params.to_h { |p| p.split "=", 2 }
685
762
  else
686
763
  {}
687
764
  end
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_create_catalog_item_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_get_catalog_item_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_list_catalog_items_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_update_catalog_item_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_catalog_item_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -249,7 +249,7 @@ module Google
249
249
 
250
250
  verb, uri, query_string_params, body = ServiceStub.transcode_import_catalog_items_request request_pb
251
251
  query_string_params = if query_string_params.any?
252
- query_string_params.to_h { |p| p.split("=", 2) }
252
+ query_string_params.to_h { |p| p.split "=", 2 }
253
253
  else
254
254
  {}
255
255
  end
@@ -142,7 +142,7 @@ module Google
142
142
  credentials = @config.credentials
143
143
  # Use self-signed JWT if the endpoint is unchanged from default,
144
144
  # but only if the default endpoint does not have a region prefix.
145
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
145
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
146
146
  !@config.endpoint.split(".").first.include?("-")
147
147
  credentials ||= Credentials.default scope: @config.scope,
148
148
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -157,7 +157,8 @@ module Google
157
157
  credentials: credentials,
158
158
  endpoint: @config.endpoint,
159
159
  channel_args: @config.channel_args,
160
- interceptors: @config.interceptors
160
+ interceptors: @config.interceptors,
161
+ channel_pool_config: @config.channel_pool
161
162
  )
162
163
  end
163
164
 
@@ -515,7 +516,9 @@ module Google
515
516
  class Configuration
516
517
  extend ::Gapic::Config
517
518
 
518
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
519
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
520
+
521
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
519
522
  config_attr :credentials, nil do |value|
520
523
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
521
524
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -550,6 +553,14 @@ module Google
550
553
  end
551
554
  end
552
555
 
556
+ ##
557
+ # Configuration for the channel pool
558
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
559
+ #
560
+ def channel_pool
561
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
562
+ end
563
+
553
564
  ##
554
565
  # Configuration RPC class for the PredictionApiKeyRegistry API.
555
566
  #
@@ -138,7 +138,7 @@ module Google
138
138
  credentials = @config.credentials
139
139
  # Use self-signed JWT if the endpoint is unchanged from default,
140
140
  # but only if the default endpoint does not have a region prefix.
141
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
141
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
142
142
  !@config.endpoint.split(".").first.include?("-")
143
143
  credentials ||= Credentials.default scope: @config.scope,
144
144
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -184,6 +184,22 @@ module Google
184
184
  # @return [::Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistration]
185
185
  #
186
186
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
187
+ #
188
+ # @example Basic example
189
+ # require "google/cloud/recommendation_engine/v1beta1"
190
+ #
191
+ # # Create a client object. The client can be reused for multiple calls.
192
+ # client = Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Rest::Client.new
193
+ #
194
+ # # Create a request. To set request fields, pass in keyword arguments.
195
+ # request = Google::Cloud::RecommendationEngine::V1beta1::CreatePredictionApiKeyRegistrationRequest.new
196
+ #
197
+ # # Call the create_prediction_api_key_registration method.
198
+ # result = client.create_prediction_api_key_registration request
199
+ #
200
+ # # The returned object is of type Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistration.
201
+ # p result
202
+ #
187
203
  def create_prediction_api_key_registration request, options = nil
188
204
  raise ::ArgumentError, "request must be provided" if request.nil?
189
205
 
@@ -252,6 +268,26 @@ module Google
252
268
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistration>]
253
269
  #
254
270
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
271
+ #
272
+ # @example Basic example
273
+ # require "google/cloud/recommendation_engine/v1beta1"
274
+ #
275
+ # # Create a client object. The client can be reused for multiple calls.
276
+ # client = Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Rest::Client.new
277
+ #
278
+ # # Create a request. To set request fields, pass in keyword arguments.
279
+ # request = Google::Cloud::RecommendationEngine::V1beta1::ListPredictionApiKeyRegistrationsRequest.new
280
+ #
281
+ # # Call the list_prediction_api_key_registrations method.
282
+ # result = client.list_prediction_api_key_registrations request
283
+ #
284
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
285
+ # # over elements, and API calls will be issued to fetch pages as needed.
286
+ # result.each do |item|
287
+ # # Each element is of type ::Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistration.
288
+ # p item
289
+ # end
290
+ #
255
291
  def list_prediction_api_key_registrations request, options = nil
256
292
  raise ::ArgumentError, "request must be provided" if request.nil?
257
293
 
@@ -316,6 +352,22 @@ module Google
316
352
  # @return [::Google::Protobuf::Empty]
317
353
  #
318
354
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
355
+ #
356
+ # @example Basic example
357
+ # require "google/cloud/recommendation_engine/v1beta1"
358
+ #
359
+ # # Create a client object. The client can be reused for multiple calls.
360
+ # client = Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Rest::Client.new
361
+ #
362
+ # # Create a request. To set request fields, pass in keyword arguments.
363
+ # request = Google::Cloud::RecommendationEngine::V1beta1::DeletePredictionApiKeyRegistrationRequest.new
364
+ #
365
+ # # Call the delete_prediction_api_key_registration method.
366
+ # result = client.delete_prediction_api_key_registration request
367
+ #
368
+ # # The returned object is of type Google::Protobuf::Empty.
369
+ # p result
370
+ #
319
371
  def delete_prediction_api_key_registration request, options = nil
320
372
  raise ::ArgumentError, "request must be provided" if request.nil?
321
373
 
@@ -424,7 +476,9 @@ module Google
424
476
  class Configuration
425
477
  extend ::Gapic::Config
426
478
 
427
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
479
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
480
+
481
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
428
482
  config_attr :credentials, nil do |value|
429
483
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
430
484
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_create_prediction_api_key_registration_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_list_prediction_api_key_registrations_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_prediction_api_key_registration_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -128,7 +128,7 @@ module Google
128
128
  credentials = @config.credentials
129
129
  # Use self-signed JWT if the endpoint is unchanged from default,
130
130
  # but only if the default endpoint does not have a region prefix.
131
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
132
132
  !@config.endpoint.split(".").first.include?("-")
133
133
  credentials ||= Credentials.default scope: @config.scope,
134
134
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -143,7 +143,8 @@ module Google
143
143
  credentials: credentials,
144
144
  endpoint: @config.endpoint,
145
145
  channel_args: @config.channel_args,
146
- interceptors: @config.interceptors
146
+ interceptors: @config.interceptors,
147
+ channel_pool_config: @config.channel_pool
147
148
  )
148
149
  end
149
150
 
@@ -411,7 +412,9 @@ module Google
411
412
  class Configuration
412
413
  extend ::Gapic::Config
413
414
 
414
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
415
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
416
+
417
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
415
418
  config_attr :credentials, nil do |value|
416
419
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
417
420
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -446,6 +449,14 @@ module Google
446
449
  end
447
450
  end
448
451
 
452
+ ##
453
+ # Configuration for the channel pool
454
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
455
+ #
456
+ def channel_pool
457
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
458
+ end
459
+
449
460
  ##
450
461
  # Configuration RPC class for the PredictionService API.
451
462
  #
@@ -124,7 +124,7 @@ module Google
124
124
  credentials = @config.credentials
125
125
  # Use self-signed JWT if the endpoint is unchanged from default,
126
126
  # but only if the default endpoint does not have a region prefix.
127
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
127
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
128
128
  !@config.endpoint.split(".").first.include?("-")
129
129
  credentials ||= Credentials.default scope: @config.scope,
130
130
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -257,6 +257,26 @@ module Google
257
257
  # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Protobuf::Value>]
258
258
  #
259
259
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
260
+ #
261
+ # @example Basic example
262
+ # require "google/cloud/recommendation_engine/v1beta1"
263
+ #
264
+ # # Create a client object. The client can be reused for multiple calls.
265
+ # client = Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Rest::Client.new
266
+ #
267
+ # # Create a request. To set request fields, pass in keyword arguments.
268
+ # request = Google::Cloud::RecommendationEngine::V1beta1::PredictRequest.new
269
+ #
270
+ # # Call the predict method.
271
+ # result = client.predict request
272
+ #
273
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
274
+ # # over elements, and API calls will be issued to fetch pages as needed.
275
+ # result.each do |item|
276
+ # # Each element is of type ::Google::Cloud::RecommendationEngine::V1beta1::PredictResponse::PredictionResult.
277
+ # p item
278
+ # end
279
+ #
260
280
  def predict request, options = nil
261
281
  raise ::ArgumentError, "request must be provided" if request.nil?
262
282
 
@@ -366,7 +386,9 @@ module Google
366
386
  class Configuration
367
387
  extend ::Gapic::Config
368
388
 
369
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
389
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
390
+
391
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
370
392
  config_attr :credentials, nil do |value|
371
393
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
372
394
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_predict_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -148,7 +148,7 @@ module Google
148
148
  credentials = @config.credentials
149
149
  # Use self-signed JWT if the endpoint is unchanged from default,
150
150
  # but only if the default endpoint does not have a region prefix.
151
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
151
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
152
152
  !@config.endpoint.split(".").first.include?("-")
153
153
  credentials ||= Credentials.default scope: @config.scope,
154
154
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -169,7 +169,8 @@ module Google
169
169
  credentials: credentials,
170
170
  endpoint: @config.endpoint,
171
171
  channel_args: @config.channel_args,
172
- interceptors: @config.interceptors
172
+ interceptors: @config.interceptors,
173
+ channel_pool_config: @config.channel_pool
173
174
  )
174
175
  end
175
176
 
@@ -814,7 +815,9 @@ module Google
814
815
  class Configuration
815
816
  extend ::Gapic::Config
816
817
 
817
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
818
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
819
+
820
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
818
821
  config_attr :credentials, nil do |value|
819
822
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
820
823
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -849,6 +852,14 @@ module Google
849
852
  end
850
853
  end
851
854
 
855
+ ##
856
+ # Configuration for the channel pool
857
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
858
+ #
859
+ def channel_pool
860
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
861
+ end
862
+
852
863
  ##
853
864
  # Configuration RPC class for the UserEventService API.
854
865
  #
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -664,7 +665,9 @@ module Google
664
665
  class Configuration
665
666
  extend ::Gapic::Config
666
667
 
667
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
668
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
669
+
670
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
668
671
  config_attr :credentials, nil do |value|
669
672
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
670
673
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -699,6 +702,14 @@ module Google
699
702
  end
700
703
  end
701
704
 
705
+ ##
706
+ # Configuration for the channel pool
707
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
708
+ #
709
+ def channel_pool
710
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
711
+ end
712
+
702
713
  ##
703
714
  # Configuration RPC class for the Operations API.
704
715
  #
@@ -144,7 +144,7 @@ module Google
144
144
  credentials = @config.credentials
145
145
  # Use self-signed JWT if the endpoint is unchanged from default,
146
146
  # but only if the default endpoint does not have a region prefix.
147
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
147
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
148
148
  !@config.endpoint.split(".").first.include?("-")
149
149
  credentials ||= Credentials.default scope: @config.scope,
150
150
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -203,6 +203,22 @@ module Google
203
203
  # @return [::Google::Cloud::RecommendationEngine::V1beta1::UserEvent]
204
204
  #
205
205
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
206
+ #
207
+ # @example Basic example
208
+ # require "google/cloud/recommendation_engine/v1beta1"
209
+ #
210
+ # # Create a client object. The client can be reused for multiple calls.
211
+ # client = Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Rest::Client.new
212
+ #
213
+ # # Create a request. To set request fields, pass in keyword arguments.
214
+ # request = Google::Cloud::RecommendationEngine::V1beta1::WriteUserEventRequest.new
215
+ #
216
+ # # Call the write_user_event method.
217
+ # result = client.write_user_event request
218
+ #
219
+ # # The returned object is of type Google::Cloud::RecommendationEngine::V1beta1::UserEvent.
220
+ # p result
221
+ #
206
222
  def write_user_event request, options = nil
207
223
  raise ::ArgumentError, "request must be provided" if request.nil?
208
224
 
@@ -281,6 +297,22 @@ module Google
281
297
  # @return [::Google::Api::HttpBody]
282
298
  #
283
299
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
300
+ #
301
+ # @example Basic example
302
+ # require "google/cloud/recommendation_engine/v1beta1"
303
+ #
304
+ # # Create a client object. The client can be reused for multiple calls.
305
+ # client = Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Rest::Client.new
306
+ #
307
+ # # Create a request. To set request fields, pass in keyword arguments.
308
+ # request = Google::Cloud::RecommendationEngine::V1beta1::CollectUserEventRequest.new
309
+ #
310
+ # # Call the collect_user_event method.
311
+ # result = client.collect_user_event request
312
+ #
313
+ # # The returned object is of type Google::Api::HttpBody.
314
+ # p result
315
+ #
284
316
  def collect_user_event request, options = nil
285
317
  raise ::ArgumentError, "request must be provided" if request.nil?
286
318
 
@@ -382,6 +414,26 @@ module Google
382
414
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::RecommendationEngine::V1beta1::UserEvent>]
383
415
  #
384
416
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
417
+ #
418
+ # @example Basic example
419
+ # require "google/cloud/recommendation_engine/v1beta1"
420
+ #
421
+ # # Create a client object. The client can be reused for multiple calls.
422
+ # client = Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Rest::Client.new
423
+ #
424
+ # # Create a request. To set request fields, pass in keyword arguments.
425
+ # request = Google::Cloud::RecommendationEngine::V1beta1::ListUserEventsRequest.new
426
+ #
427
+ # # Call the list_user_events method.
428
+ # result = client.list_user_events request
429
+ #
430
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
431
+ # # over elements, and API calls will be issued to fetch pages as needed.
432
+ # result.each do |item|
433
+ # # Each element is of type ::Google::Cloud::RecommendationEngine::V1beta1::UserEvent.
434
+ # p item
435
+ # end
436
+ #
385
437
  def list_user_events request, options = nil
386
438
  raise ::ArgumentError, "request must be provided" if request.nil?
387
439
 
@@ -473,6 +525,29 @@ module Google
473
525
  # @return [::Gapic::Operation]
474
526
  #
475
527
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
528
+ #
529
+ # @example Basic example
530
+ # require "google/cloud/recommendation_engine/v1beta1"
531
+ #
532
+ # # Create a client object. The client can be reused for multiple calls.
533
+ # client = Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Rest::Client.new
534
+ #
535
+ # # Create a request. To set request fields, pass in keyword arguments.
536
+ # request = Google::Cloud::RecommendationEngine::V1beta1::PurgeUserEventsRequest.new
537
+ #
538
+ # # Call the purge_user_events method.
539
+ # result = client.purge_user_events request
540
+ #
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
544
+ # result.wait_until_done! timeout: 60
545
+ # if result.response?
546
+ # p result.response
547
+ # else
548
+ # puts "No response received."
549
+ # end
550
+ #
476
551
  def purge_user_events request, options = nil
477
552
  raise ::ArgumentError, "request must be provided" if request.nil?
478
553
 
@@ -554,6 +629,29 @@ module Google
554
629
  # @return [::Gapic::Operation]
555
630
  #
556
631
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
632
+ #
633
+ # @example Basic example
634
+ # require "google/cloud/recommendation_engine/v1beta1"
635
+ #
636
+ # # Create a client object. The client can be reused for multiple calls.
637
+ # client = Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Rest::Client.new
638
+ #
639
+ # # Create a request. To set request fields, pass in keyword arguments.
640
+ # request = Google::Cloud::RecommendationEngine::V1beta1::ImportUserEventsRequest.new
641
+ #
642
+ # # Call the import_user_events method.
643
+ # result = client.import_user_events request
644
+ #
645
+ # # The returned object is of type Gapic::Operation. You can use it to
646
+ # # check the status of an operation, cancel it, or wait for results.
647
+ # # Here is how to wait for a response.
648
+ # result.wait_until_done! timeout: 60
649
+ # if result.response?
650
+ # p result.response
651
+ # else
652
+ # puts "No response received."
653
+ # end
654
+ #
557
655
  def import_user_events request, options = nil
558
656
  raise ::ArgumentError, "request must be provided" if request.nil?
559
657
 
@@ -663,7 +761,9 @@ module Google
663
761
  class Configuration
664
762
  extend ::Gapic::Config
665
763
 
666
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
764
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
765
+
766
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
667
767
  config_attr :credentials, nil do |value|
668
768
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
669
769
  allowed.any? { |klass| klass === value }
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -446,7 +521,9 @@ module Google
446
521
  class Configuration
447
522
  extend ::Gapic::Config
448
523
 
449
- config_attr :endpoint, "recommendationengine.googleapis.com", ::String
524
+ DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
525
+
526
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
450
527
  config_attr :credentials, nil do |value|
451
528
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
452
529
  allowed.any? { |klass| klass === value }
@@ -567,7 +644,7 @@ module Google
567
644
 
568
645
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
569
646
  query_string_params = if query_string_params.any?
570
- query_string_params.to_h { |p| p.split("=", 2) }
647
+ query_string_params.to_h { |p| p.split "=", 2 }
571
648
  else
572
649
  {}
573
650
  end
@@ -605,7 +682,7 @@ module Google
605
682
 
606
683
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
607
684
  query_string_params = if query_string_params.any?
608
- query_string_params.to_h { |p| p.split("=", 2) }
685
+ query_string_params.to_h { |p| p.split "=", 2 }
609
686
  else
610
687
  {}
611
688
  end
@@ -643,7 +720,7 @@ module Google
643
720
 
644
721
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
645
722
  query_string_params = if query_string_params.any?
646
- query_string_params.to_h { |p| p.split("=", 2) }
723
+ query_string_params.to_h { |p| p.split "=", 2 }
647
724
  else
648
725
  {}
649
726
  end
@@ -681,7 +758,7 @@ module Google
681
758
 
682
759
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
683
760
  query_string_params = if query_string_params.any?
684
- query_string_params.to_h { |p| p.split("=", 2) }
761
+ query_string_params.to_h { |p| p.split "=", 2 }
685
762
  else
686
763
  {}
687
764
  end
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_write_user_event_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
62
+ query_string_params.to_h { |p| p.split "=", 2 }
63
63
  else
64
64
  {}
65
65
  end
@@ -97,7 +97,7 @@ module Google
97
97
 
98
98
  verb, uri, query_string_params, body = ServiceStub.transcode_collect_user_event_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
101
  else
102
102
  {}
103
103
  end
@@ -135,7 +135,7 @@ module Google
135
135
 
136
136
  verb, uri, query_string_params, body = ServiceStub.transcode_list_user_events_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
138
+ query_string_params.to_h { |p| p.split "=", 2 }
139
139
  else
140
140
  {}
141
141
  end
@@ -173,7 +173,7 @@ module Google
173
173
 
174
174
  verb, uri, query_string_params, body = ServiceStub.transcode_purge_user_events_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
176
+ query_string_params.to_h { |p| p.split "=", 2 }
177
177
  else
178
178
  {}
179
179
  end
@@ -211,7 +211,7 @@ module Google
211
211
 
212
212
  verb, uri, query_string_params, body = ServiceStub.transcode_import_user_events_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
214
+ query_string_params.to_h { |p| p.split "=", 2 }
215
215
  else
216
216
  {}
217
217
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module RecommendationEngine
23
23
  module V1beta1
24
- VERSION = "0.6.0"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-recommendation_engine-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-01 00:00:00.000000000 Z
11
+ date: 2023-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.19.0
19
+ version: 0.20.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.19.0
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
261
  - !ruby/object:Gem::Version
262
262
  version: '0'
263
263
  requirements: []
264
- rubygems_version: 3.4.2
264
+ rubygems_version: 3.4.19
265
265
  signing_key:
266
266
  specification_version: 4
267
267
  summary: Recommendations AI service enables customers to build end-to-end personalized