google-cloud-discovery_engine-v1beta 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +24 -1
  4. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +30 -0
  5. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +45 -2
  6. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +135 -1
  7. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +24 -1
  8. data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +10 -1
  9. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +144 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +75 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +24 -1
  12. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +30 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +24 -1
  14. data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +10 -1
  15. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +119 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +75 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +54 -2
  18. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +64 -1
  19. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +24 -1
  20. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +10 -1
  21. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +69 -0
  22. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +75 -0
  23. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  24. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +2 -1
  25. data/lib/google/cloud/discoveryengine/v1beta/conversation_pb.rb +3 -1
  26. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +2 -2
  27. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +5 -1
  28. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  29. data/proto_docs/google/api/field_behavior.rb +14 -0
  30. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +9 -0
  31. data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +4 -0
  32. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +34 -0
  33. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +136 -3
  34. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +4 -0
  35. metadata +25 -5
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/discoveryengine/v1beta/document_service_pb"
21
21
  require "google/cloud/discovery_engine/v1beta/document_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -148,6 +149,12 @@ module Google
148
149
  config.endpoint = @config.endpoint
149
150
  end
150
151
 
152
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
153
+ config.credentials = credentials
154
+ config.quota_project = @quota_project_id
155
+ config.endpoint = @config.endpoint
156
+ end
157
+
151
158
  @document_service_stub = ::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
152
159
  end
153
160
 
@@ -158,6 +165,13 @@ module Google
158
165
  #
159
166
  attr_reader :operations_client
160
167
 
168
+ ##
169
+ # Get the associated client for mix-in of the Locations.
170
+ #
171
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
172
+ #
173
+ attr_reader :location_client
174
+
161
175
  # Service calls
162
176
 
163
177
  ##
@@ -196,6 +210,22 @@ module Google
196
210
  # @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
197
211
  #
198
212
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
213
+ #
214
+ # @example Basic example
215
+ # require "google/cloud/discovery_engine/v1beta"
216
+ #
217
+ # # Create a client object. The client can be reused for multiple calls.
218
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Rest::Client.new
219
+ #
220
+ # # Create a request. To set request fields, pass in keyword arguments.
221
+ # request = Google::Cloud::DiscoveryEngine::V1beta::GetDocumentRequest.new
222
+ #
223
+ # # Call the get_document method.
224
+ # result = client.get_document request
225
+ #
226
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Document.
227
+ # p result
228
+ #
199
229
  def get_document request, options = nil
200
230
  raise ::ArgumentError, "request must be provided" if request.nil?
201
231
 
@@ -283,6 +313,26 @@ module Google
283
313
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Document>]
284
314
  #
285
315
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
316
+ #
317
+ # @example Basic example
318
+ # require "google/cloud/discovery_engine/v1beta"
319
+ #
320
+ # # Create a client object. The client can be reused for multiple calls.
321
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Rest::Client.new
322
+ #
323
+ # # Create a request. To set request fields, pass in keyword arguments.
324
+ # request = Google::Cloud::DiscoveryEngine::V1beta::ListDocumentsRequest.new
325
+ #
326
+ # # Call the list_documents method.
327
+ # result = client.list_documents request
328
+ #
329
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
330
+ # # over elements, and API calls will be issued to fetch pages as needed.
331
+ # result.each do |item|
332
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1beta::Document.
333
+ # p item
334
+ # end
335
+ #
286
336
  def list_documents request, options = nil
287
337
  raise ::ArgumentError, "request must be provided" if request.nil?
288
338
 
@@ -368,6 +418,22 @@ module Google
368
418
  # @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
369
419
  #
370
420
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
421
+ #
422
+ # @example Basic example
423
+ # require "google/cloud/discovery_engine/v1beta"
424
+ #
425
+ # # Create a client object. The client can be reused for multiple calls.
426
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Rest::Client.new
427
+ #
428
+ # # Create a request. To set request fields, pass in keyword arguments.
429
+ # request = Google::Cloud::DiscoveryEngine::V1beta::CreateDocumentRequest.new
430
+ #
431
+ # # Call the create_document method.
432
+ # result = client.create_document request
433
+ #
434
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Document.
435
+ # p result
436
+ #
371
437
  def create_document request, options = nil
372
438
  raise ::ArgumentError, "request must be provided" if request.nil?
373
439
 
@@ -444,6 +510,22 @@ module Google
444
510
  # @return [::Google::Cloud::DiscoveryEngine::V1beta::Document]
445
511
  #
446
512
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
513
+ #
514
+ # @example Basic example
515
+ # require "google/cloud/discovery_engine/v1beta"
516
+ #
517
+ # # Create a client object. The client can be reused for multiple calls.
518
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Rest::Client.new
519
+ #
520
+ # # Create a request. To set request fields, pass in keyword arguments.
521
+ # request = Google::Cloud::DiscoveryEngine::V1beta::UpdateDocumentRequest.new
522
+ #
523
+ # # Call the update_document method.
524
+ # result = client.update_document request
525
+ #
526
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Document.
527
+ # p result
528
+ #
447
529
  def update_document request, options = nil
448
530
  raise ::ArgumentError, "request must be provided" if request.nil?
449
531
 
@@ -515,6 +597,22 @@ module Google
515
597
  # @return [::Google::Protobuf::Empty]
516
598
  #
517
599
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
600
+ #
601
+ # @example Basic example
602
+ # require "google/cloud/discovery_engine/v1beta"
603
+ #
604
+ # # Create a client object. The client can be reused for multiple calls.
605
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Rest::Client.new
606
+ #
607
+ # # Create a request. To set request fields, pass in keyword arguments.
608
+ # request = Google::Cloud::DiscoveryEngine::V1beta::DeleteDocumentRequest.new
609
+ #
610
+ # # Call the delete_document method.
611
+ # result = client.delete_document request
612
+ #
613
+ # # The returned object is of type Google::Protobuf::Empty.
614
+ # p result
615
+ #
518
616
  def delete_document request, options = nil
519
617
  raise ::ArgumentError, "request must be provided" if request.nil?
520
618
 
@@ -649,6 +747,29 @@ module Google
649
747
  # @return [::Gapic::Operation]
650
748
  #
651
749
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
750
+ #
751
+ # @example Basic example
752
+ # require "google/cloud/discovery_engine/v1beta"
753
+ #
754
+ # # Create a client object. The client can be reused for multiple calls.
755
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Rest::Client.new
756
+ #
757
+ # # Create a request. To set request fields, pass in keyword arguments.
758
+ # request = Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest.new
759
+ #
760
+ # # Call the import_documents method.
761
+ # result = client.import_documents request
762
+ #
763
+ # # The returned object is of type Gapic::Operation. You can use it to
764
+ # # check the status of an operation, cancel it, or wait for results.
765
+ # # Here is how to wait for a response.
766
+ # result.wait_until_done! timeout: 60
767
+ # if result.response?
768
+ # p result.response
769
+ # else
770
+ # puts "No response received."
771
+ # end
772
+ #
652
773
  def import_documents request, options = nil
653
774
  raise ::ArgumentError, "request must be provided" if request.nil?
654
775
 
@@ -736,6 +857,29 @@ module Google
736
857
  # @return [::Gapic::Operation]
737
858
  #
738
859
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
860
+ #
861
+ # @example Basic example
862
+ # require "google/cloud/discovery_engine/v1beta"
863
+ #
864
+ # # Create a client object. The client can be reused for multiple calls.
865
+ # client = Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Rest::Client.new
866
+ #
867
+ # # Create a request. To set request fields, pass in keyword arguments.
868
+ # request = Google::Cloud::DiscoveryEngine::V1beta::PurgeDocumentsRequest.new
869
+ #
870
+ # # Call the purge_documents method.
871
+ # result = client.purge_documents request
872
+ #
873
+ # # The returned object is of type Gapic::Operation. You can use it to
874
+ # # check the status of an operation, cancel it, or wait for results.
875
+ # # Here is how to wait for a response.
876
+ # result.wait_until_done! timeout: 60
877
+ # if result.response?
878
+ # p result.response
879
+ # else
880
+ # puts "No response received."
881
+ # end
882
+ #
739
883
  def purge_documents request, options = nil
740
884
  raise ::ArgumentError, "request must be provided" if request.nil?
741
885
 
@@ -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
 
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/discoveryengine/v1beta/recommendation_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -138,15 +139,29 @@ module Google
138
139
  @quota_project_id = @config.quota_project
139
140
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
140
141
 
142
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
143
+ config.credentials = credentials
144
+ config.quota_project = @quota_project_id
145
+ config.endpoint = @config.endpoint
146
+ end
147
+
141
148
  @recommendation_service_stub = ::Gapic::ServiceStub.new(
142
149
  ::Google::Cloud::DiscoveryEngine::V1beta::RecommendationService::Stub,
143
150
  credentials: credentials,
144
151
  endpoint: @config.endpoint,
145
152
  channel_args: @config.channel_args,
146
- interceptors: @config.interceptors
153
+ interceptors: @config.interceptors,
154
+ channel_pool_config: @config.channel_pool
147
155
  )
148
156
  end
149
157
 
158
+ ##
159
+ # Get the associated client for mix-in of the Locations.
160
+ #
161
+ # @return [Google::Cloud::Location::Locations::Client]
162
+ #
163
+ attr_reader :location_client
164
+
150
165
  # Service calls
151
166
 
152
167
  ##
@@ -447,6 +462,14 @@ module Google
447
462
  end
448
463
  end
449
464
 
465
+ ##
466
+ # Configuration for the channel pool
467
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
468
+ #
469
+ def channel_pool
470
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
471
+ end
472
+
450
473
  ##
451
474
  # Configuration RPC class for the RecommendationService API.
452
475
  #
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/discoveryengine/v1beta/recommendation_service_pb"
21
21
  require "google/cloud/discovery_engine/v1beta/recommendation_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -135,9 +136,22 @@ module Google
135
136
  @quota_project_id = @config.quota_project
136
137
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
137
138
 
139
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
140
+ config.credentials = credentials
141
+ config.quota_project = @quota_project_id
142
+ config.endpoint = @config.endpoint
143
+ end
144
+
138
145
  @recommendation_service_stub = ::Google::Cloud::DiscoveryEngine::V1beta::RecommendationService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
139
146
  end
140
147
 
148
+ ##
149
+ # Get the associated client for mix-in of the Locations.
150
+ #
151
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
152
+ #
153
+ attr_reader :location_client
154
+
141
155
  # Service calls
142
156
 
143
157
  ##
@@ -261,6 +275,22 @@ module Google
261
275
  # @return [::Google::Cloud::DiscoveryEngine::V1beta::RecommendResponse]
262
276
  #
263
277
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
278
+ #
279
+ # @example Basic example
280
+ # require "google/cloud/discovery_engine/v1beta"
281
+ #
282
+ # # Create a client object. The client can be reused for multiple calls.
283
+ # client = Google::Cloud::DiscoveryEngine::V1beta::RecommendationService::Rest::Client.new
284
+ #
285
+ # # Create a request. To set request fields, pass in keyword arguments.
286
+ # request = Google::Cloud::DiscoveryEngine::V1beta::RecommendRequest.new
287
+ #
288
+ # # Call the recommend method.
289
+ # result = client.recommend request
290
+ #
291
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::RecommendResponse.
292
+ # p result
293
+ #
264
294
  def recommend request, options = nil
265
295
  raise ::ArgumentError, "request must be provided" if request.nil?
266
296
 
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/discoveryengine/v1beta/schema_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -144,12 +145,19 @@ module Google
144
145
  config.endpoint = @config.endpoint
145
146
  end
146
147
 
148
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
149
+ config.credentials = credentials
150
+ config.quota_project = @quota_project_id
151
+ config.endpoint = @config.endpoint
152
+ end
153
+
147
154
  @schema_service_stub = ::Gapic::ServiceStub.new(
148
155
  ::Google::Cloud::DiscoveryEngine::V1beta::SchemaService::Stub,
149
156
  credentials: credentials,
150
157
  endpoint: @config.endpoint,
151
158
  channel_args: @config.channel_args,
152
- interceptors: @config.interceptors
159
+ interceptors: @config.interceptors,
160
+ channel_pool_config: @config.channel_pool
153
161
  )
154
162
  end
155
163
 
@@ -160,6 +168,13 @@ module Google
160
168
  #
161
169
  attr_reader :operations_client
162
170
 
171
+ ##
172
+ # Get the associated client for mix-in of the Locations.
173
+ #
174
+ # @return [Google::Cloud::Location::Locations::Client]
175
+ #
176
+ attr_reader :location_client
177
+
163
178
  # Service calls
164
179
 
165
180
  ##
@@ -773,6 +788,14 @@ module Google
773
788
  end
774
789
  end
775
790
 
791
+ ##
792
+ # Configuration for the channel pool
793
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
794
+ #
795
+ def channel_pool
796
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
797
+ end
798
+
776
799
  ##
777
800
  # Configuration RPC class for the SchemaService API.
778
801
  #
@@ -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
@@ -701,6 +702,14 @@ module Google
701
702
  end
702
703
  end
703
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
+
704
713
  ##
705
714
  # Configuration RPC class for the Operations API.
706
715
  #
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/discoveryengine/v1beta/schema_service_pb"
21
21
  require "google/cloud/discovery_engine/v1beta/schema_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -141,6 +142,12 @@ module Google
141
142
  config.endpoint = @config.endpoint
142
143
  end
143
144
 
145
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
146
+ config.credentials = credentials
147
+ config.quota_project = @quota_project_id
148
+ config.endpoint = @config.endpoint
149
+ end
150
+
144
151
  @schema_service_stub = ::Google::Cloud::DiscoveryEngine::V1beta::SchemaService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
145
152
  end
146
153
 
@@ -151,6 +158,13 @@ module Google
151
158
  #
152
159
  attr_reader :operations_client
153
160
 
161
+ ##
162
+ # Get the associated client for mix-in of the Locations.
163
+ #
164
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
165
+ #
166
+ attr_reader :location_client
167
+
154
168
  # Service calls
155
169
 
156
170
  ##
@@ -181,6 +195,22 @@ module Google
181
195
  # @return [::Google::Cloud::DiscoveryEngine::V1beta::Schema]
182
196
  #
183
197
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
198
+ #
199
+ # @example Basic example
200
+ # require "google/cloud/discovery_engine/v1beta"
201
+ #
202
+ # # Create a client object. The client can be reused for multiple calls.
203
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SchemaService::Rest::Client.new
204
+ #
205
+ # # Create a request. To set request fields, pass in keyword arguments.
206
+ # request = Google::Cloud::DiscoveryEngine::V1beta::GetSchemaRequest.new
207
+ #
208
+ # # Call the get_schema method.
209
+ # result = client.get_schema request
210
+ #
211
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Schema.
212
+ # p result
213
+ #
184
214
  def get_schema request, options = nil
185
215
  raise ::ArgumentError, "request must be provided" if request.nil?
186
216
 
@@ -260,6 +290,26 @@ module Google
260
290
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Schema>]
261
291
  #
262
292
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
293
+ #
294
+ # @example Basic example
295
+ # require "google/cloud/discovery_engine/v1beta"
296
+ #
297
+ # # Create a client object. The client can be reused for multiple calls.
298
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SchemaService::Rest::Client.new
299
+ #
300
+ # # Create a request. To set request fields, pass in keyword arguments.
301
+ # request = Google::Cloud::DiscoveryEngine::V1beta::ListSchemasRequest.new
302
+ #
303
+ # # Call the list_schemas method.
304
+ # result = client.list_schemas request
305
+ #
306
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
307
+ # # over elements, and API calls will be issued to fetch pages as needed.
308
+ # result.each do |item|
309
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1beta::Schema.
310
+ # p item
311
+ # end
312
+ #
263
313
  def list_schemas request, options = nil
264
314
  raise ::ArgumentError, "request must be provided" if request.nil?
265
315
 
@@ -336,6 +386,29 @@ module Google
336
386
  # @return [::Gapic::Operation]
337
387
  #
338
388
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
389
+ #
390
+ # @example Basic example
391
+ # require "google/cloud/discovery_engine/v1beta"
392
+ #
393
+ # # Create a client object. The client can be reused for multiple calls.
394
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SchemaService::Rest::Client.new
395
+ #
396
+ # # Create a request. To set request fields, pass in keyword arguments.
397
+ # request = Google::Cloud::DiscoveryEngine::V1beta::CreateSchemaRequest.new
398
+ #
399
+ # # Call the create_schema method.
400
+ # result = client.create_schema request
401
+ #
402
+ # # The returned object is of type Gapic::Operation. You can use it to
403
+ # # check the status of an operation, cancel it, or wait for results.
404
+ # # Here is how to wait for a response.
405
+ # result.wait_until_done! timeout: 60
406
+ # if result.response?
407
+ # p result.response
408
+ # else
409
+ # puts "No response received."
410
+ # end
411
+ #
339
412
  def create_schema request, options = nil
340
413
  raise ::ArgumentError, "request must be provided" if request.nil?
341
414
 
@@ -405,6 +478,29 @@ module Google
405
478
  # @return [::Gapic::Operation]
406
479
  #
407
480
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
481
+ #
482
+ # @example Basic example
483
+ # require "google/cloud/discovery_engine/v1beta"
484
+ #
485
+ # # Create a client object. The client can be reused for multiple calls.
486
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SchemaService::Rest::Client.new
487
+ #
488
+ # # Create a request. To set request fields, pass in keyword arguments.
489
+ # request = Google::Cloud::DiscoveryEngine::V1beta::UpdateSchemaRequest.new
490
+ #
491
+ # # Call the update_schema method.
492
+ # result = client.update_schema request
493
+ #
494
+ # # The returned object is of type Gapic::Operation. You can use it to
495
+ # # check the status of an operation, cancel it, or wait for results.
496
+ # # Here is how to wait for a response.
497
+ # result.wait_until_done! timeout: 60
498
+ # if result.response?
499
+ # p result.response
500
+ # else
501
+ # puts "No response received."
502
+ # end
503
+ #
408
504
  def update_schema request, options = nil
409
505
  raise ::ArgumentError, "request must be provided" if request.nil?
410
506
 
@@ -469,6 +565,29 @@ module Google
469
565
  # @return [::Gapic::Operation]
470
566
  #
471
567
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
568
+ #
569
+ # @example Basic example
570
+ # require "google/cloud/discovery_engine/v1beta"
571
+ #
572
+ # # Create a client object. The client can be reused for multiple calls.
573
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SchemaService::Rest::Client.new
574
+ #
575
+ # # Create a request. To set request fields, pass in keyword arguments.
576
+ # request = Google::Cloud::DiscoveryEngine::V1beta::DeleteSchemaRequest.new
577
+ #
578
+ # # Call the delete_schema method.
579
+ # result = client.delete_schema request
580
+ #
581
+ # # The returned object is of type Gapic::Operation. You can use it to
582
+ # # check the status of an operation, cancel it, or wait for results.
583
+ # # Here is how to wait for a response.
584
+ # result.wait_until_done! timeout: 60
585
+ # if result.response?
586
+ # p result.response
587
+ # else
588
+ # puts "No response received."
589
+ # end
590
+ #
472
591
  def delete_schema request, options = nil
473
592
  raise ::ArgumentError, "request must be provided" if request.nil?
474
593