google-cloud-vision-v1 0.5.0 → 0.6.3

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.
@@ -54,13 +54,12 @@ module Google
54
54
  # See {::Google::Cloud::Vision::V1::ProductSearch::Client::Configuration}
55
55
  # for a description of the configuration fields.
56
56
  #
57
- # ## Example
57
+ # @example
58
58
  #
59
- # To modify the configuration for all ProductSearch clients:
60
- #
61
- # ::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config|
62
- # config.timeout = 10.0
63
- # end
59
+ # # Modify the configuration for all ProductSearch clients
60
+ # ::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config|
61
+ # config.timeout = 10.0
62
+ # end
64
63
  #
65
64
  # @yield [config] Configure the Client client.
66
65
  # @yieldparam config [Client::Configuration]
@@ -73,161 +72,104 @@ module Google
73
72
  parent_config = while namespace.any?
74
73
  parent_name = namespace.join "::"
75
74
  parent_const = const_get parent_name
76
- break parent_const.configure if parent_const&.respond_to? :configure
75
+ break parent_const.configure if parent_const.respond_to? :configure
77
76
  namespace.pop
78
77
  end
79
78
  default_config = Client::Configuration.new parent_config
80
79
 
81
80
  default_config.rpcs.create_product_set.timeout = 600.0
82
81
  default_config.rpcs.create_product_set.retry_policy = {
83
- initial_delay: 0.1,
84
- max_delay: 60.0,
85
- multiplier: 1.3,
86
- retry_codes: []
82
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
87
83
  }
88
84
 
89
85
  default_config.rpcs.list_product_sets.timeout = 600.0
90
86
  default_config.rpcs.list_product_sets.retry_policy = {
91
- initial_delay: 0.1,
92
- max_delay: 60.0,
93
- multiplier: 1.3,
94
- retry_codes: [4, 14]
87
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
95
88
  }
96
89
 
97
90
  default_config.rpcs.get_product_set.timeout = 600.0
98
91
  default_config.rpcs.get_product_set.retry_policy = {
99
- initial_delay: 0.1,
100
- max_delay: 60.0,
101
- multiplier: 1.3,
102
- retry_codes: [4, 14]
92
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
103
93
  }
104
94
 
105
95
  default_config.rpcs.update_product_set.timeout = 600.0
106
96
  default_config.rpcs.update_product_set.retry_policy = {
107
- initial_delay: 0.1,
108
- max_delay: 60.0,
109
- multiplier: 1.3,
110
- retry_codes: [4, 14]
97
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
111
98
  }
112
99
 
113
100
  default_config.rpcs.delete_product_set.timeout = 600.0
114
101
  default_config.rpcs.delete_product_set.retry_policy = {
115
- initial_delay: 0.1,
116
- max_delay: 60.0,
117
- multiplier: 1.3,
118
- retry_codes: [4, 14]
102
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
119
103
  }
120
104
 
121
105
  default_config.rpcs.create_product.timeout = 600.0
122
106
  default_config.rpcs.create_product.retry_policy = {
123
- initial_delay: 0.1,
124
- max_delay: 60.0,
125
- multiplier: 1.3,
126
- retry_codes: []
107
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
127
108
  }
128
109
 
129
110
  default_config.rpcs.list_products.timeout = 600.0
130
111
  default_config.rpcs.list_products.retry_policy = {
131
- initial_delay: 0.1,
132
- max_delay: 60.0,
133
- multiplier: 1.3,
134
- retry_codes: [4, 14]
112
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
135
113
  }
136
114
 
137
115
  default_config.rpcs.get_product.timeout = 600.0
138
116
  default_config.rpcs.get_product.retry_policy = {
139
- initial_delay: 0.1,
140
- max_delay: 60.0,
141
- multiplier: 1.3,
142
- retry_codes: [4, 14]
117
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
143
118
  }
144
119
 
145
120
  default_config.rpcs.update_product.timeout = 600.0
146
121
  default_config.rpcs.update_product.retry_policy = {
147
- initial_delay: 0.1,
148
- max_delay: 60.0,
149
- multiplier: 1.3,
150
- retry_codes: [4, 14]
122
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
151
123
  }
152
124
 
153
125
  default_config.rpcs.delete_product.timeout = 600.0
154
126
  default_config.rpcs.delete_product.retry_policy = {
155
- initial_delay: 0.1,
156
- max_delay: 60.0,
157
- multiplier: 1.3,
158
- retry_codes: [4, 14]
127
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
159
128
  }
160
129
 
161
130
  default_config.rpcs.create_reference_image.timeout = 600.0
162
131
  default_config.rpcs.create_reference_image.retry_policy = {
163
- initial_delay: 0.1,
164
- max_delay: 60.0,
165
- multiplier: 1.3,
166
- retry_codes: []
132
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
167
133
  }
168
134
 
169
135
  default_config.rpcs.delete_reference_image.timeout = 600.0
170
136
  default_config.rpcs.delete_reference_image.retry_policy = {
171
- initial_delay: 0.1,
172
- max_delay: 60.0,
173
- multiplier: 1.3,
174
- retry_codes: [4, 14]
137
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
175
138
  }
176
139
 
177
140
  default_config.rpcs.list_reference_images.timeout = 600.0
178
141
  default_config.rpcs.list_reference_images.retry_policy = {
179
- initial_delay: 0.1,
180
- max_delay: 60.0,
181
- multiplier: 1.3,
182
- retry_codes: [4, 14]
142
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
183
143
  }
184
144
 
185
145
  default_config.rpcs.get_reference_image.timeout = 600.0
186
146
  default_config.rpcs.get_reference_image.retry_policy = {
187
- initial_delay: 0.1,
188
- max_delay: 60.0,
189
- multiplier: 1.3,
190
- retry_codes: [4, 14]
147
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
191
148
  }
192
149
 
193
150
  default_config.rpcs.add_product_to_product_set.timeout = 600.0
194
151
  default_config.rpcs.add_product_to_product_set.retry_policy = {
195
- initial_delay: 0.1,
196
- max_delay: 60.0,
197
- multiplier: 1.3,
198
- retry_codes: [4, 14]
152
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
199
153
  }
200
154
 
201
155
  default_config.rpcs.remove_product_from_product_set.timeout = 600.0
202
156
  default_config.rpcs.remove_product_from_product_set.retry_policy = {
203
- initial_delay: 0.1,
204
- max_delay: 60.0,
205
- multiplier: 1.3,
206
- retry_codes: [4, 14]
157
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
207
158
  }
208
159
 
209
160
  default_config.rpcs.list_products_in_product_set.timeout = 600.0
210
161
  default_config.rpcs.list_products_in_product_set.retry_policy = {
211
- initial_delay: 0.1,
212
- max_delay: 60.0,
213
- multiplier: 1.3,
214
- retry_codes: [4, 14]
162
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
215
163
  }
216
164
 
217
165
  default_config.rpcs.import_product_sets.timeout = 600.0
218
166
  default_config.rpcs.import_product_sets.retry_policy = {
219
- initial_delay: 0.1,
220
- max_delay: 60.0,
221
- multiplier: 1.3,
222
- retry_codes: []
167
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
223
168
  }
224
169
 
225
170
  default_config.rpcs.purge_products.timeout = 600.0
226
171
  default_config.rpcs.purge_products.retry_policy = {
227
- initial_delay: 0.1,
228
- max_delay: 60.0,
229
- multiplier: 1.3,
230
- retry_codes: []
172
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: []
231
173
  }
232
174
 
233
175
  default_config
@@ -259,19 +201,15 @@ module Google
259
201
  ##
260
202
  # Create a new ProductSearch client object.
261
203
  #
262
- # ## Examples
263
- #
264
- # To create a new ProductSearch client with the default
265
- # configuration:
204
+ # @example
266
205
  #
267
- # client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new
206
+ # # Create a client using the default configuration
207
+ # client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new
268
208
  #
269
- # To create a new ProductSearch client with a custom
270
- # configuration:
271
- #
272
- # client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config|
273
- # config.timeout = 10.0
274
- # end
209
+ # # Create a client using a custom configuration
210
+ # client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config|
211
+ # config.timeout = 10.0
212
+ # end
275
213
  #
276
214
  # @yield [config] Configure the ProductSearch client.
277
215
  # @yieldparam config [Client::Configuration]
@@ -291,14 +229,13 @@ module Google
291
229
 
292
230
  # Create credentials
293
231
  credentials = @config.credentials
294
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
232
+ # Use self-signed JWT if the endpoint is unchanged from default,
295
233
  # but only if the default endpoint does not have a region prefix.
296
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
297
- @config.endpoint == Client.configure.endpoint &&
234
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
298
235
  !@config.endpoint.split(".").first.include?("-")
299
- credentials ||= Credentials.default scope: @config.scope,
236
+ credentials ||= Credentials.default scope: @config.scope,
300
237
  enable_self_signed_jwt: enable_self_signed_jwt
301
- if credentials.is_a?(String) || credentials.is_a?(Hash)
238
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
302
239
  credentials = Credentials.new credentials, scope: @config.scope
303
240
  end
304
241
  @quota_project_id = @config.quota_project
@@ -370,6 +307,21 @@ module Google
370
307
  #
371
308
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
372
309
  #
310
+ # @example Basic example
311
+ # require "google/cloud/vision/v1"
312
+ #
313
+ # # Create a client object. The client can be reused for multiple calls.
314
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
315
+ #
316
+ # # Create a request. To set request fields, pass in keyword arguments.
317
+ # request = Google::Cloud::Vision::V1::CreateProductSetRequest.new
318
+ #
319
+ # # Call the create_product_set method.
320
+ # result = client.create_product_set request
321
+ #
322
+ # # The returned object is of type Google::Cloud::Vision::V1::ProductSet.
323
+ # p result
324
+ #
373
325
  def create_product_set request, options = nil
374
326
  raise ::ArgumentError, "request must be provided" if request.nil?
375
327
 
@@ -396,7 +348,9 @@ module Google
396
348
  options.apply_defaults timeout: @config.rpcs.create_product_set.timeout,
397
349
  metadata: metadata,
398
350
  retry_policy: @config.rpcs.create_product_set.retry_policy
399
- options.apply_defaults metadata: @config.metadata,
351
+
352
+ options.apply_defaults timeout: @config.timeout,
353
+ metadata: @config.metadata,
400
354
  retry_policy: @config.retry_policy
401
355
 
402
356
  @product_search_stub.call_rpc :create_product_set, request, options: options do |response, operation|
@@ -447,6 +401,27 @@ module Google
447
401
  #
448
402
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
449
403
  #
404
+ # @example Basic example
405
+ # require "google/cloud/vision/v1"
406
+ #
407
+ # # Create a client object. The client can be reused for multiple calls.
408
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
409
+ #
410
+ # # Create a request. To set request fields, pass in keyword arguments.
411
+ # request = Google::Cloud::Vision::V1::ListProductSetsRequest.new
412
+ #
413
+ # # Call the list_product_sets method.
414
+ # result = client.list_product_sets request
415
+ #
416
+ # # The returned object is of type Gapic::PagedEnumerable. You can
417
+ # # iterate over all elements by calling #each, and the enumerable
418
+ # # will lazily make API calls to fetch subsequent pages. Other
419
+ # # methods are also available for managing paging directly.
420
+ # result.each do |response|
421
+ # # Each element is of type ::Google::Cloud::Vision::V1::ProductSet.
422
+ # p response
423
+ # end
424
+ #
450
425
  def list_product_sets request, options = nil
451
426
  raise ::ArgumentError, "request must be provided" if request.nil?
452
427
 
@@ -473,7 +448,9 @@ module Google
473
448
  options.apply_defaults timeout: @config.rpcs.list_product_sets.timeout,
474
449
  metadata: metadata,
475
450
  retry_policy: @config.rpcs.list_product_sets.retry_policy
476
- options.apply_defaults metadata: @config.metadata,
451
+
452
+ options.apply_defaults timeout: @config.timeout,
453
+ metadata: @config.metadata,
477
454
  retry_policy: @config.retry_policy
478
455
 
479
456
  @product_search_stub.call_rpc :list_product_sets, request, options: options do |response, operation|
@@ -521,6 +498,21 @@ module Google
521
498
  #
522
499
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
523
500
  #
501
+ # @example Basic example
502
+ # require "google/cloud/vision/v1"
503
+ #
504
+ # # Create a client object. The client can be reused for multiple calls.
505
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
506
+ #
507
+ # # Create a request. To set request fields, pass in keyword arguments.
508
+ # request = Google::Cloud::Vision::V1::GetProductSetRequest.new
509
+ #
510
+ # # Call the get_product_set method.
511
+ # result = client.get_product_set request
512
+ #
513
+ # # The returned object is of type Google::Cloud::Vision::V1::ProductSet.
514
+ # p result
515
+ #
524
516
  def get_product_set request, options = nil
525
517
  raise ::ArgumentError, "request must be provided" if request.nil?
526
518
 
@@ -547,7 +539,9 @@ module Google
547
539
  options.apply_defaults timeout: @config.rpcs.get_product_set.timeout,
548
540
  metadata: metadata,
549
541
  retry_policy: @config.rpcs.get_product_set.retry_policy
550
- options.apply_defaults metadata: @config.metadata,
542
+
543
+ options.apply_defaults timeout: @config.timeout,
544
+ metadata: @config.metadata,
551
545
  retry_policy: @config.retry_policy
552
546
 
553
547
  @product_search_stub.call_rpc :get_product_set, request, options: options do |response, operation|
@@ -599,6 +593,21 @@ module Google
599
593
  #
600
594
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
601
595
  #
596
+ # @example Basic example
597
+ # require "google/cloud/vision/v1"
598
+ #
599
+ # # Create a client object. The client can be reused for multiple calls.
600
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
601
+ #
602
+ # # Create a request. To set request fields, pass in keyword arguments.
603
+ # request = Google::Cloud::Vision::V1::UpdateProductSetRequest.new
604
+ #
605
+ # # Call the update_product_set method.
606
+ # result = client.update_product_set request
607
+ #
608
+ # # The returned object is of type Google::Cloud::Vision::V1::ProductSet.
609
+ # p result
610
+ #
602
611
  def update_product_set request, options = nil
603
612
  raise ::ArgumentError, "request must be provided" if request.nil?
604
613
 
@@ -625,7 +634,9 @@ module Google
625
634
  options.apply_defaults timeout: @config.rpcs.update_product_set.timeout,
626
635
  metadata: metadata,
627
636
  retry_policy: @config.rpcs.update_product_set.retry_policy
628
- options.apply_defaults metadata: @config.metadata,
637
+
638
+ options.apply_defaults timeout: @config.timeout,
639
+ metadata: @config.metadata,
629
640
  retry_policy: @config.retry_policy
630
641
 
631
642
  @product_search_stub.call_rpc :update_product_set, request, options: options do |response, operation|
@@ -671,6 +682,21 @@ module Google
671
682
  #
672
683
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
673
684
  #
685
+ # @example Basic example
686
+ # require "google/cloud/vision/v1"
687
+ #
688
+ # # Create a client object. The client can be reused for multiple calls.
689
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
690
+ #
691
+ # # Create a request. To set request fields, pass in keyword arguments.
692
+ # request = Google::Cloud::Vision::V1::DeleteProductSetRequest.new
693
+ #
694
+ # # Call the delete_product_set method.
695
+ # result = client.delete_product_set request
696
+ #
697
+ # # The returned object is of type Google::Protobuf::Empty.
698
+ # p result
699
+ #
674
700
  def delete_product_set request, options = nil
675
701
  raise ::ArgumentError, "request must be provided" if request.nil?
676
702
 
@@ -697,7 +723,9 @@ module Google
697
723
  options.apply_defaults timeout: @config.rpcs.delete_product_set.timeout,
698
724
  metadata: metadata,
699
725
  retry_policy: @config.rpcs.delete_product_set.retry_policy
700
- options.apply_defaults metadata: @config.metadata,
726
+
727
+ options.apply_defaults timeout: @config.timeout,
728
+ metadata: @config.metadata,
701
729
  retry_policy: @config.retry_policy
702
730
 
703
731
  @product_search_stub.call_rpc :delete_product_set, request, options: options do |response, operation|
@@ -754,6 +782,21 @@ module Google
754
782
  #
755
783
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
756
784
  #
785
+ # @example Basic example
786
+ # require "google/cloud/vision/v1"
787
+ #
788
+ # # Create a client object. The client can be reused for multiple calls.
789
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
790
+ #
791
+ # # Create a request. To set request fields, pass in keyword arguments.
792
+ # request = Google::Cloud::Vision::V1::CreateProductRequest.new
793
+ #
794
+ # # Call the create_product method.
795
+ # result = client.create_product request
796
+ #
797
+ # # The returned object is of type Google::Cloud::Vision::V1::Product.
798
+ # p result
799
+ #
757
800
  def create_product request, options = nil
758
801
  raise ::ArgumentError, "request must be provided" if request.nil?
759
802
 
@@ -780,7 +823,9 @@ module Google
780
823
  options.apply_defaults timeout: @config.rpcs.create_product.timeout,
781
824
  metadata: metadata,
782
825
  retry_policy: @config.rpcs.create_product.retry_policy
783
- options.apply_defaults metadata: @config.metadata,
826
+
827
+ options.apply_defaults timeout: @config.timeout,
828
+ metadata: @config.metadata,
784
829
  retry_policy: @config.retry_policy
785
830
 
786
831
  @product_search_stub.call_rpc :create_product, request, options: options do |response, operation|
@@ -831,6 +876,27 @@ module Google
831
876
  #
832
877
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
833
878
  #
879
+ # @example Basic example
880
+ # require "google/cloud/vision/v1"
881
+ #
882
+ # # Create a client object. The client can be reused for multiple calls.
883
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
884
+ #
885
+ # # Create a request. To set request fields, pass in keyword arguments.
886
+ # request = Google::Cloud::Vision::V1::ListProductsRequest.new
887
+ #
888
+ # # Call the list_products method.
889
+ # result = client.list_products request
890
+ #
891
+ # # The returned object is of type Gapic::PagedEnumerable. You can
892
+ # # iterate over all elements by calling #each, and the enumerable
893
+ # # will lazily make API calls to fetch subsequent pages. Other
894
+ # # methods are also available for managing paging directly.
895
+ # result.each do |response|
896
+ # # Each element is of type ::Google::Cloud::Vision::V1::Product.
897
+ # p response
898
+ # end
899
+ #
834
900
  def list_products request, options = nil
835
901
  raise ::ArgumentError, "request must be provided" if request.nil?
836
902
 
@@ -857,7 +923,9 @@ module Google
857
923
  options.apply_defaults timeout: @config.rpcs.list_products.timeout,
858
924
  metadata: metadata,
859
925
  retry_policy: @config.rpcs.list_products.retry_policy
860
- options.apply_defaults metadata: @config.metadata,
926
+
927
+ options.apply_defaults timeout: @config.timeout,
928
+ metadata: @config.metadata,
861
929
  retry_policy: @config.retry_policy
862
930
 
863
931
  @product_search_stub.call_rpc :list_products, request, options: options do |response, operation|
@@ -905,6 +973,21 @@ module Google
905
973
  #
906
974
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
907
975
  #
976
+ # @example Basic example
977
+ # require "google/cloud/vision/v1"
978
+ #
979
+ # # Create a client object. The client can be reused for multiple calls.
980
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
981
+ #
982
+ # # Create a request. To set request fields, pass in keyword arguments.
983
+ # request = Google::Cloud::Vision::V1::GetProductRequest.new
984
+ #
985
+ # # Call the get_product method.
986
+ # result = client.get_product request
987
+ #
988
+ # # The returned object is of type Google::Cloud::Vision::V1::Product.
989
+ # p result
990
+ #
908
991
  def get_product request, options = nil
909
992
  raise ::ArgumentError, "request must be provided" if request.nil?
910
993
 
@@ -931,7 +1014,9 @@ module Google
931
1014
  options.apply_defaults timeout: @config.rpcs.get_product.timeout,
932
1015
  metadata: metadata,
933
1016
  retry_policy: @config.rpcs.get_product.retry_policy
934
- options.apply_defaults metadata: @config.metadata,
1017
+
1018
+ options.apply_defaults timeout: @config.timeout,
1019
+ metadata: @config.metadata,
935
1020
  retry_policy: @config.retry_policy
936
1021
 
937
1022
  @product_search_stub.call_rpc :get_product, request, options: options do |response, operation|
@@ -992,6 +1077,21 @@ module Google
992
1077
  #
993
1078
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
994
1079
  #
1080
+ # @example Basic example
1081
+ # require "google/cloud/vision/v1"
1082
+ #
1083
+ # # Create a client object. The client can be reused for multiple calls.
1084
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
1085
+ #
1086
+ # # Create a request. To set request fields, pass in keyword arguments.
1087
+ # request = Google::Cloud::Vision::V1::UpdateProductRequest.new
1088
+ #
1089
+ # # Call the update_product method.
1090
+ # result = client.update_product request
1091
+ #
1092
+ # # The returned object is of type Google::Cloud::Vision::V1::Product.
1093
+ # p result
1094
+ #
995
1095
  def update_product request, options = nil
996
1096
  raise ::ArgumentError, "request must be provided" if request.nil?
997
1097
 
@@ -1018,7 +1118,9 @@ module Google
1018
1118
  options.apply_defaults timeout: @config.rpcs.update_product.timeout,
1019
1119
  metadata: metadata,
1020
1120
  retry_policy: @config.rpcs.update_product.retry_policy
1021
- options.apply_defaults metadata: @config.metadata,
1121
+
1122
+ options.apply_defaults timeout: @config.timeout,
1123
+ metadata: @config.metadata,
1022
1124
  retry_policy: @config.retry_policy
1023
1125
 
1024
1126
  @product_search_stub.call_rpc :update_product, request, options: options do |response, operation|
@@ -1065,6 +1167,21 @@ module Google
1065
1167
  #
1066
1168
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1067
1169
  #
1170
+ # @example Basic example
1171
+ # require "google/cloud/vision/v1"
1172
+ #
1173
+ # # Create a client object. The client can be reused for multiple calls.
1174
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
1175
+ #
1176
+ # # Create a request. To set request fields, pass in keyword arguments.
1177
+ # request = Google::Cloud::Vision::V1::DeleteProductRequest.new
1178
+ #
1179
+ # # Call the delete_product method.
1180
+ # result = client.delete_product request
1181
+ #
1182
+ # # The returned object is of type Google::Protobuf::Empty.
1183
+ # p result
1184
+ #
1068
1185
  def delete_product request, options = nil
1069
1186
  raise ::ArgumentError, "request must be provided" if request.nil?
1070
1187
 
@@ -1091,7 +1208,9 @@ module Google
1091
1208
  options.apply_defaults timeout: @config.rpcs.delete_product.timeout,
1092
1209
  metadata: metadata,
1093
1210
  retry_policy: @config.rpcs.delete_product.retry_policy
1094
- options.apply_defaults metadata: @config.metadata,
1211
+
1212
+ options.apply_defaults timeout: @config.timeout,
1213
+ metadata: @config.metadata,
1095
1214
  retry_policy: @config.retry_policy
1096
1215
 
1097
1216
  @product_search_stub.call_rpc :delete_product, request, options: options do |response, operation|
@@ -1160,6 +1279,21 @@ module Google
1160
1279
  #
1161
1280
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1162
1281
  #
1282
+ # @example Basic example
1283
+ # require "google/cloud/vision/v1"
1284
+ #
1285
+ # # Create a client object. The client can be reused for multiple calls.
1286
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
1287
+ #
1288
+ # # Create a request. To set request fields, pass in keyword arguments.
1289
+ # request = Google::Cloud::Vision::V1::CreateReferenceImageRequest.new
1290
+ #
1291
+ # # Call the create_reference_image method.
1292
+ # result = client.create_reference_image request
1293
+ #
1294
+ # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage.
1295
+ # p result
1296
+ #
1163
1297
  def create_reference_image request, options = nil
1164
1298
  raise ::ArgumentError, "request must be provided" if request.nil?
1165
1299
 
@@ -1186,7 +1320,9 @@ module Google
1186
1320
  options.apply_defaults timeout: @config.rpcs.create_reference_image.timeout,
1187
1321
  metadata: metadata,
1188
1322
  retry_policy: @config.rpcs.create_reference_image.retry_policy
1189
- options.apply_defaults metadata: @config.metadata,
1323
+
1324
+ options.apply_defaults timeout: @config.timeout,
1325
+ metadata: @config.metadata,
1190
1326
  retry_policy: @config.retry_policy
1191
1327
 
1192
1328
  @product_search_stub.call_rpc :create_reference_image, request, options: options do |response, operation|
@@ -1235,6 +1371,21 @@ module Google
1235
1371
  #
1236
1372
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1237
1373
  #
1374
+ # @example Basic example
1375
+ # require "google/cloud/vision/v1"
1376
+ #
1377
+ # # Create a client object. The client can be reused for multiple calls.
1378
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
1379
+ #
1380
+ # # Create a request. To set request fields, pass in keyword arguments.
1381
+ # request = Google::Cloud::Vision::V1::DeleteReferenceImageRequest.new
1382
+ #
1383
+ # # Call the delete_reference_image method.
1384
+ # result = client.delete_reference_image request
1385
+ #
1386
+ # # The returned object is of type Google::Protobuf::Empty.
1387
+ # p result
1388
+ #
1238
1389
  def delete_reference_image request, options = nil
1239
1390
  raise ::ArgumentError, "request must be provided" if request.nil?
1240
1391
 
@@ -1261,7 +1412,9 @@ module Google
1261
1412
  options.apply_defaults timeout: @config.rpcs.delete_reference_image.timeout,
1262
1413
  metadata: metadata,
1263
1414
  retry_policy: @config.rpcs.delete_reference_image.retry_policy
1264
- options.apply_defaults metadata: @config.metadata,
1415
+
1416
+ options.apply_defaults timeout: @config.timeout,
1417
+ metadata: @config.metadata,
1265
1418
  retry_policy: @config.retry_policy
1266
1419
 
1267
1420
  @product_search_stub.call_rpc :delete_reference_image, request, options: options do |response, operation|
@@ -1317,6 +1470,27 @@ module Google
1317
1470
  #
1318
1471
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1319
1472
  #
1473
+ # @example Basic example
1474
+ # require "google/cloud/vision/v1"
1475
+ #
1476
+ # # Create a client object. The client can be reused for multiple calls.
1477
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
1478
+ #
1479
+ # # Create a request. To set request fields, pass in keyword arguments.
1480
+ # request = Google::Cloud::Vision::V1::ListReferenceImagesRequest.new
1481
+ #
1482
+ # # Call the list_reference_images method.
1483
+ # result = client.list_reference_images request
1484
+ #
1485
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1486
+ # # iterate over all elements by calling #each, and the enumerable
1487
+ # # will lazily make API calls to fetch subsequent pages. Other
1488
+ # # methods are also available for managing paging directly.
1489
+ # result.each do |response|
1490
+ # # Each element is of type ::Google::Cloud::Vision::V1::ReferenceImage.
1491
+ # p response
1492
+ # end
1493
+ #
1320
1494
  def list_reference_images request, options = nil
1321
1495
  raise ::ArgumentError, "request must be provided" if request.nil?
1322
1496
 
@@ -1343,7 +1517,9 @@ module Google
1343
1517
  options.apply_defaults timeout: @config.rpcs.list_reference_images.timeout,
1344
1518
  metadata: metadata,
1345
1519
  retry_policy: @config.rpcs.list_reference_images.retry_policy
1346
- options.apply_defaults metadata: @config.metadata,
1520
+
1521
+ options.apply_defaults timeout: @config.timeout,
1522
+ metadata: @config.metadata,
1347
1523
  retry_policy: @config.retry_policy
1348
1524
 
1349
1525
  @product_search_stub.call_rpc :list_reference_images, request, options: options do |response, operation|
@@ -1391,6 +1567,21 @@ module Google
1391
1567
  #
1392
1568
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1393
1569
  #
1570
+ # @example Basic example
1571
+ # require "google/cloud/vision/v1"
1572
+ #
1573
+ # # Create a client object. The client can be reused for multiple calls.
1574
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
1575
+ #
1576
+ # # Create a request. To set request fields, pass in keyword arguments.
1577
+ # request = Google::Cloud::Vision::V1::GetReferenceImageRequest.new
1578
+ #
1579
+ # # Call the get_reference_image method.
1580
+ # result = client.get_reference_image request
1581
+ #
1582
+ # # The returned object is of type Google::Cloud::Vision::V1::ReferenceImage.
1583
+ # p result
1584
+ #
1394
1585
  def get_reference_image request, options = nil
1395
1586
  raise ::ArgumentError, "request must be provided" if request.nil?
1396
1587
 
@@ -1417,7 +1608,9 @@ module Google
1417
1608
  options.apply_defaults timeout: @config.rpcs.get_reference_image.timeout,
1418
1609
  metadata: metadata,
1419
1610
  retry_policy: @config.rpcs.get_reference_image.retry_policy
1420
- options.apply_defaults metadata: @config.metadata,
1611
+
1612
+ options.apply_defaults timeout: @config.timeout,
1613
+ metadata: @config.metadata,
1421
1614
  retry_policy: @config.retry_policy
1422
1615
 
1423
1616
  @product_search_stub.call_rpc :get_reference_image, request, options: options do |response, operation|
@@ -1472,6 +1665,21 @@ module Google
1472
1665
  #
1473
1666
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1474
1667
  #
1668
+ # @example Basic example
1669
+ # require "google/cloud/vision/v1"
1670
+ #
1671
+ # # Create a client object. The client can be reused for multiple calls.
1672
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
1673
+ #
1674
+ # # Create a request. To set request fields, pass in keyword arguments.
1675
+ # request = Google::Cloud::Vision::V1::AddProductToProductSetRequest.new
1676
+ #
1677
+ # # Call the add_product_to_product_set method.
1678
+ # result = client.add_product_to_product_set request
1679
+ #
1680
+ # # The returned object is of type Google::Protobuf::Empty.
1681
+ # p result
1682
+ #
1475
1683
  def add_product_to_product_set request, options = nil
1476
1684
  raise ::ArgumentError, "request must be provided" if request.nil?
1477
1685
 
@@ -1498,7 +1706,9 @@ module Google
1498
1706
  options.apply_defaults timeout: @config.rpcs.add_product_to_product_set.timeout,
1499
1707
  metadata: metadata,
1500
1708
  retry_policy: @config.rpcs.add_product_to_product_set.retry_policy
1501
- options.apply_defaults metadata: @config.metadata,
1709
+
1710
+ options.apply_defaults timeout: @config.timeout,
1711
+ metadata: @config.metadata,
1502
1712
  retry_policy: @config.retry_policy
1503
1713
 
1504
1714
  @product_search_stub.call_rpc :add_product_to_product_set, request, options: options do |response, operation|
@@ -1546,6 +1756,21 @@ module Google
1546
1756
  #
1547
1757
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1548
1758
  #
1759
+ # @example Basic example
1760
+ # require "google/cloud/vision/v1"
1761
+ #
1762
+ # # Create a client object. The client can be reused for multiple calls.
1763
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
1764
+ #
1765
+ # # Create a request. To set request fields, pass in keyword arguments.
1766
+ # request = Google::Cloud::Vision::V1::RemoveProductFromProductSetRequest.new
1767
+ #
1768
+ # # Call the remove_product_from_product_set method.
1769
+ # result = client.remove_product_from_product_set request
1770
+ #
1771
+ # # The returned object is of type Google::Protobuf::Empty.
1772
+ # p result
1773
+ #
1549
1774
  def remove_product_from_product_set request, options = nil
1550
1775
  raise ::ArgumentError, "request must be provided" if request.nil?
1551
1776
 
@@ -1572,7 +1797,9 @@ module Google
1572
1797
  options.apply_defaults timeout: @config.rpcs.remove_product_from_product_set.timeout,
1573
1798
  metadata: metadata,
1574
1799
  retry_policy: @config.rpcs.remove_product_from_product_set.retry_policy
1575
- options.apply_defaults metadata: @config.metadata,
1800
+
1801
+ options.apply_defaults timeout: @config.timeout,
1802
+ metadata: @config.metadata,
1576
1803
  retry_policy: @config.retry_policy
1577
1804
 
1578
1805
  @product_search_stub.call_rpc :remove_product_from_product_set, request, options: options do |response, operation|
@@ -1625,6 +1852,27 @@ module Google
1625
1852
  #
1626
1853
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1627
1854
  #
1855
+ # @example Basic example
1856
+ # require "google/cloud/vision/v1"
1857
+ #
1858
+ # # Create a client object. The client can be reused for multiple calls.
1859
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
1860
+ #
1861
+ # # Create a request. To set request fields, pass in keyword arguments.
1862
+ # request = Google::Cloud::Vision::V1::ListProductsInProductSetRequest.new
1863
+ #
1864
+ # # Call the list_products_in_product_set method.
1865
+ # result = client.list_products_in_product_set request
1866
+ #
1867
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1868
+ # # iterate over all elements by calling #each, and the enumerable
1869
+ # # will lazily make API calls to fetch subsequent pages. Other
1870
+ # # methods are also available for managing paging directly.
1871
+ # result.each do |response|
1872
+ # # Each element is of type ::Google::Cloud::Vision::V1::Product.
1873
+ # p response
1874
+ # end
1875
+ #
1628
1876
  def list_products_in_product_set request, options = nil
1629
1877
  raise ::ArgumentError, "request must be provided" if request.nil?
1630
1878
 
@@ -1651,7 +1899,9 @@ module Google
1651
1899
  options.apply_defaults timeout: @config.rpcs.list_products_in_product_set.timeout,
1652
1900
  metadata: metadata,
1653
1901
  retry_policy: @config.rpcs.list_products_in_product_set.retry_policy
1654
- options.apply_defaults metadata: @config.metadata,
1902
+
1903
+ options.apply_defaults timeout: @config.timeout,
1904
+ metadata: @config.metadata,
1655
1905
  retry_policy: @config.retry_policy
1656
1906
 
1657
1907
  @product_search_stub.call_rpc :list_products_in_product_set, request, options: options do |response, operation|
@@ -1706,6 +1956,28 @@ module Google
1706
1956
  #
1707
1957
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1708
1958
  #
1959
+ # @example Basic example
1960
+ # require "google/cloud/vision/v1"
1961
+ #
1962
+ # # Create a client object. The client can be reused for multiple calls.
1963
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
1964
+ #
1965
+ # # Create a request. To set request fields, pass in keyword arguments.
1966
+ # request = Google::Cloud::Vision::V1::ImportProductSetsRequest.new
1967
+ #
1968
+ # # Call the import_product_sets method.
1969
+ # result = client.import_product_sets request
1970
+ #
1971
+ # # The returned object is of type Gapic::Operation. You can use this
1972
+ # # object to check the status of an operation, cancel it, or wait
1973
+ # # for results. Here is how to block until completion:
1974
+ # result.wait_until_done! timeout: 60
1975
+ # if result.response?
1976
+ # p result.response
1977
+ # else
1978
+ # puts "Error!"
1979
+ # end
1980
+ #
1709
1981
  def import_product_sets request, options = nil
1710
1982
  raise ::ArgumentError, "request must be provided" if request.nil?
1711
1983
 
@@ -1732,7 +2004,9 @@ module Google
1732
2004
  options.apply_defaults timeout: @config.rpcs.import_product_sets.timeout,
1733
2005
  metadata: metadata,
1734
2006
  retry_policy: @config.rpcs.import_product_sets.retry_policy
1735
- options.apply_defaults metadata: @config.metadata,
2007
+
2008
+ options.apply_defaults timeout: @config.timeout,
2009
+ metadata: @config.metadata,
1736
2010
  retry_policy: @config.retry_policy
1737
2011
 
1738
2012
  @product_search_stub.call_rpc :import_product_sets, request, options: options do |response, operation|
@@ -1806,6 +2080,28 @@ module Google
1806
2080
  #
1807
2081
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1808
2082
  #
2083
+ # @example Basic example
2084
+ # require "google/cloud/vision/v1"
2085
+ #
2086
+ # # Create a client object. The client can be reused for multiple calls.
2087
+ # client = Google::Cloud::Vision::V1::ProductSearch::Client.new
2088
+ #
2089
+ # # Create a request. To set request fields, pass in keyword arguments.
2090
+ # request = Google::Cloud::Vision::V1::PurgeProductsRequest.new
2091
+ #
2092
+ # # Call the purge_products method.
2093
+ # result = client.purge_products request
2094
+ #
2095
+ # # The returned object is of type Gapic::Operation. You can use this
2096
+ # # object to check the status of an operation, cancel it, or wait
2097
+ # # for results. Here is how to block until completion:
2098
+ # result.wait_until_done! timeout: 60
2099
+ # if result.response?
2100
+ # p result.response
2101
+ # else
2102
+ # puts "Error!"
2103
+ # end
2104
+ #
1809
2105
  def purge_products request, options = nil
1810
2106
  raise ::ArgumentError, "request must be provided" if request.nil?
1811
2107
 
@@ -1832,7 +2128,9 @@ module Google
1832
2128
  options.apply_defaults timeout: @config.rpcs.purge_products.timeout,
1833
2129
  metadata: metadata,
1834
2130
  retry_policy: @config.rpcs.purge_products.retry_policy
1835
- options.apply_defaults metadata: @config.metadata,
2131
+
2132
+ options.apply_defaults timeout: @config.timeout,
2133
+ metadata: @config.metadata,
1836
2134
  retry_policy: @config.retry_policy
1837
2135
 
1838
2136
  @product_search_stub.call_rpc :purge_products, request, options: options do |response, operation|
@@ -1857,22 +2155,21 @@ module Google
1857
2155
  # Configuration can be applied globally to all clients, or to a single client
1858
2156
  # on construction.
1859
2157
  #
1860
- # # Examples
1861
- #
1862
- # To modify the global config, setting the timeout for create_product_set
1863
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1864
- #
1865
- # ::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config|
1866
- # config.timeout = 10.0
1867
- # config.rpcs.create_product_set.timeout = 20.0
1868
- # end
2158
+ # @example
1869
2159
  #
1870
- # To apply the above configuration only to a new client:
2160
+ # # Modify the global config, setting the timeout for
2161
+ # # create_product_set to 20 seconds,
2162
+ # # and all remaining timeouts to 10 seconds.
2163
+ # ::Google::Cloud::Vision::V1::ProductSearch::Client.configure do |config|
2164
+ # config.timeout = 10.0
2165
+ # config.rpcs.create_product_set.timeout = 20.0
2166
+ # end
1871
2167
  #
1872
- # client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config|
1873
- # config.timeout = 10.0
1874
- # config.rpcs.create_product_set.timeout = 20.0
1875
- # end
2168
+ # # Apply the above configuration only to a new client.
2169
+ # client = ::Google::Cloud::Vision::V1::ProductSearch::Client.new do |config|
2170
+ # config.timeout = 10.0
2171
+ # config.rpcs.create_product_set.timeout = 20.0
2172
+ # end
1876
2173
  #
1877
2174
  # @!attribute [rw] endpoint
1878
2175
  # The hostname or hostname:port of the service endpoint.
@@ -1936,7 +2233,7 @@ module Google
1936
2233
  config_attr :scope, nil, ::String, ::Array, nil
1937
2234
  config_attr :lib_name, nil, ::String, nil
1938
2235
  config_attr :lib_version, nil, ::String, nil
1939
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
2236
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1940
2237
  config_attr :interceptors, nil, ::Array, nil
1941
2238
  config_attr :timeout, nil, ::Numeric, nil
1942
2239
  config_attr :metadata, nil, ::Hash, nil
@@ -1957,7 +2254,7 @@ module Google
1957
2254
  def rpcs
1958
2255
  @rpcs ||= begin
1959
2256
  parent_rpcs = nil
1960
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
2257
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1961
2258
  Rpcs.new parent_rpcs
1962
2259
  end
1963
2260
  end
@@ -2078,43 +2375,43 @@ module Google
2078
2375
 
2079
2376
  # @private
2080
2377
  def initialize parent_rpcs = nil
2081
- create_product_set_config = parent_rpcs&.create_product_set if parent_rpcs&.respond_to? :create_product_set
2378
+ create_product_set_config = parent_rpcs.create_product_set if parent_rpcs.respond_to? :create_product_set
2082
2379
  @create_product_set = ::Gapic::Config::Method.new create_product_set_config
2083
- list_product_sets_config = parent_rpcs&.list_product_sets if parent_rpcs&.respond_to? :list_product_sets
2380
+ list_product_sets_config = parent_rpcs.list_product_sets if parent_rpcs.respond_to? :list_product_sets
2084
2381
  @list_product_sets = ::Gapic::Config::Method.new list_product_sets_config
2085
- get_product_set_config = parent_rpcs&.get_product_set if parent_rpcs&.respond_to? :get_product_set
2382
+ get_product_set_config = parent_rpcs.get_product_set if parent_rpcs.respond_to? :get_product_set
2086
2383
  @get_product_set = ::Gapic::Config::Method.new get_product_set_config
2087
- update_product_set_config = parent_rpcs&.update_product_set if parent_rpcs&.respond_to? :update_product_set
2384
+ update_product_set_config = parent_rpcs.update_product_set if parent_rpcs.respond_to? :update_product_set
2088
2385
  @update_product_set = ::Gapic::Config::Method.new update_product_set_config
2089
- delete_product_set_config = parent_rpcs&.delete_product_set if parent_rpcs&.respond_to? :delete_product_set
2386
+ delete_product_set_config = parent_rpcs.delete_product_set if parent_rpcs.respond_to? :delete_product_set
2090
2387
  @delete_product_set = ::Gapic::Config::Method.new delete_product_set_config
2091
- create_product_config = parent_rpcs&.create_product if parent_rpcs&.respond_to? :create_product
2388
+ create_product_config = parent_rpcs.create_product if parent_rpcs.respond_to? :create_product
2092
2389
  @create_product = ::Gapic::Config::Method.new create_product_config
2093
- list_products_config = parent_rpcs&.list_products if parent_rpcs&.respond_to? :list_products
2390
+ list_products_config = parent_rpcs.list_products if parent_rpcs.respond_to? :list_products
2094
2391
  @list_products = ::Gapic::Config::Method.new list_products_config
2095
- get_product_config = parent_rpcs&.get_product if parent_rpcs&.respond_to? :get_product
2392
+ get_product_config = parent_rpcs.get_product if parent_rpcs.respond_to? :get_product
2096
2393
  @get_product = ::Gapic::Config::Method.new get_product_config
2097
- update_product_config = parent_rpcs&.update_product if parent_rpcs&.respond_to? :update_product
2394
+ update_product_config = parent_rpcs.update_product if parent_rpcs.respond_to? :update_product
2098
2395
  @update_product = ::Gapic::Config::Method.new update_product_config
2099
- delete_product_config = parent_rpcs&.delete_product if parent_rpcs&.respond_to? :delete_product
2396
+ delete_product_config = parent_rpcs.delete_product if parent_rpcs.respond_to? :delete_product
2100
2397
  @delete_product = ::Gapic::Config::Method.new delete_product_config
2101
- create_reference_image_config = parent_rpcs&.create_reference_image if parent_rpcs&.respond_to? :create_reference_image
2398
+ create_reference_image_config = parent_rpcs.create_reference_image if parent_rpcs.respond_to? :create_reference_image
2102
2399
  @create_reference_image = ::Gapic::Config::Method.new create_reference_image_config
2103
- delete_reference_image_config = parent_rpcs&.delete_reference_image if parent_rpcs&.respond_to? :delete_reference_image
2400
+ delete_reference_image_config = parent_rpcs.delete_reference_image if parent_rpcs.respond_to? :delete_reference_image
2104
2401
  @delete_reference_image = ::Gapic::Config::Method.new delete_reference_image_config
2105
- list_reference_images_config = parent_rpcs&.list_reference_images if parent_rpcs&.respond_to? :list_reference_images
2402
+ list_reference_images_config = parent_rpcs.list_reference_images if parent_rpcs.respond_to? :list_reference_images
2106
2403
  @list_reference_images = ::Gapic::Config::Method.new list_reference_images_config
2107
- get_reference_image_config = parent_rpcs&.get_reference_image if parent_rpcs&.respond_to? :get_reference_image
2404
+ get_reference_image_config = parent_rpcs.get_reference_image if parent_rpcs.respond_to? :get_reference_image
2108
2405
  @get_reference_image = ::Gapic::Config::Method.new get_reference_image_config
2109
- add_product_to_product_set_config = parent_rpcs&.add_product_to_product_set if parent_rpcs&.respond_to? :add_product_to_product_set
2406
+ add_product_to_product_set_config = parent_rpcs.add_product_to_product_set if parent_rpcs.respond_to? :add_product_to_product_set
2110
2407
  @add_product_to_product_set = ::Gapic::Config::Method.new add_product_to_product_set_config
2111
- remove_product_from_product_set_config = parent_rpcs&.remove_product_from_product_set if parent_rpcs&.respond_to? :remove_product_from_product_set
2408
+ remove_product_from_product_set_config = parent_rpcs.remove_product_from_product_set if parent_rpcs.respond_to? :remove_product_from_product_set
2112
2409
  @remove_product_from_product_set = ::Gapic::Config::Method.new remove_product_from_product_set_config
2113
- list_products_in_product_set_config = parent_rpcs&.list_products_in_product_set if parent_rpcs&.respond_to? :list_products_in_product_set
2410
+ list_products_in_product_set_config = parent_rpcs.list_products_in_product_set if parent_rpcs.respond_to? :list_products_in_product_set
2114
2411
  @list_products_in_product_set = ::Gapic::Config::Method.new list_products_in_product_set_config
2115
- import_product_sets_config = parent_rpcs&.import_product_sets if parent_rpcs&.respond_to? :import_product_sets
2412
+ import_product_sets_config = parent_rpcs.import_product_sets if parent_rpcs.respond_to? :import_product_sets
2116
2413
  @import_product_sets = ::Gapic::Config::Method.new import_product_sets_config
2117
- purge_products_config = parent_rpcs&.purge_products if parent_rpcs&.respond_to? :purge_products
2414
+ purge_products_config = parent_rpcs.purge_products if parent_rpcs.respond_to? :purge_products
2118
2415
  @purge_products = ::Gapic::Config::Method.new purge_products_config
2119
2416
 
2120
2417
  yield self if block_given?