google-cloud-automl-v1 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +6 -6
  3. data/README.md +1 -1
  4. data/lib/google/cloud/automl/v1/automl/client.rb +373 -373
  5. data/lib/google/cloud/automl/v1/automl/credentials.rb +1 -1
  6. data/lib/google/cloud/automl/v1/automl/operations.rb +100 -100
  7. data/lib/google/cloud/automl/v1/automl/paths.rb +16 -16
  8. data/lib/google/cloud/automl/v1/automl.rb +1 -1
  9. data/lib/google/cloud/automl/v1/prediction_service/client.rb +116 -120
  10. data/lib/google/cloud/automl/v1/prediction_service/credentials.rb +1 -1
  11. data/lib/google/cloud/automl/v1/prediction_service/operations.rb +100 -100
  12. data/lib/google/cloud/automl/v1/prediction_service/paths.rb +3 -3
  13. data/lib/google/cloud/automl/v1/prediction_service.rb +1 -1
  14. data/lib/google/cloud/automl/v1/prediction_service_services_pb.rb +30 -34
  15. data/lib/google/cloud/automl/v1/version.rb +1 -1
  16. data/lib/google/cloud/automl/v1.rb +1 -1
  17. data/proto_docs/google/api/resource.rb +12 -12
  18. data/proto_docs/google/cloud/automl/v1/annotation_payload.rb +10 -10
  19. data/proto_docs/google/cloud/automl/v1/annotation_spec.rb +5 -5
  20. data/proto_docs/google/cloud/automl/v1/classification.rb +37 -37
  21. data/proto_docs/google/cloud/automl/v1/data_items.rb +38 -38
  22. data/proto_docs/google/cloud/automl/v1/dataset.rb +19 -19
  23. data/proto_docs/google/cloud/automl/v1/detection.rb +20 -20
  24. data/proto_docs/google/cloud/automl/v1/geometry.rb +7 -7
  25. data/proto_docs/google/cloud/automl/v1/image.rb +38 -38
  26. data/proto_docs/google/cloud/automl/v1/io.rb +46 -46
  27. data/proto_docs/google/cloud/automl/v1/model.rb +20 -20
  28. data/proto_docs/google/cloud/automl/v1/model_evaluation.rb +15 -15
  29. data/proto_docs/google/cloud/automl/v1/operations.rb +49 -49
  30. data/proto_docs/google/cloud/automl/v1/prediction_service.rb +53 -53
  31. data/proto_docs/google/cloud/automl/v1/service.rb +115 -115
  32. data/proto_docs/google/cloud/automl/v1/text.rb +15 -15
  33. data/proto_docs/google/cloud/automl/v1/text_extraction.rb +14 -14
  34. data/proto_docs/google/cloud/automl/v1/text_segment.rb +5 -5
  35. data/proto_docs/google/cloud/automl/v1/text_sentiment.rb +14 -14
  36. data/proto_docs/google/cloud/automl/v1/translation.rb +16 -16
  37. data/proto_docs/google/longrunning/operations.rb +30 -30
  38. data/proto_docs/google/protobuf/any.rb +4 -4
  39. data/proto_docs/google/protobuf/duration.rb +4 -4
  40. data/proto_docs/google/protobuf/empty.rb +2 -2
  41. data/proto_docs/google/protobuf/field_mask.rb +3 -3
  42. data/proto_docs/google/protobuf/struct.rb +18 -18
  43. data/proto_docs/google/protobuf/timestamp.rb +4 -4
  44. data/proto_docs/google/rpc/status.rb +6 -6
  45. metadata +2 -2
@@ -41,15 +41,15 @@ module Google
41
41
  ##
42
42
  # Configure the PredictionService Client class.
43
43
  #
44
- # See {Google::Cloud::AutoML::V1::PredictionService::Client::Configuration}
44
+ # See {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration}
45
45
  # for a description of the configuration fields.
46
46
  #
47
47
  # ## Example
48
48
  #
49
49
  # To modify the configuration for all PredictionService clients:
50
50
  #
51
- # Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config|
52
- # config.timeout = 10_000
51
+ # ::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config|
52
+ # config.timeout = 10.0
53
53
  # end
54
54
  #
55
55
  # @yield [config] Configure the Client client.
@@ -85,7 +85,7 @@ module Google
85
85
  # but structural changes (adding new fields, etc.) are not allowed. Structural changes
86
86
  # should be made on {Client.configure}.
87
87
  #
88
- # See {Google::Cloud::AutoML::V1::PredictionService::Client::Configuration}
88
+ # See {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration}
89
89
  # for a description of the configuration fields.
90
90
  #
91
91
  # @yield [config] Configure the Client client.
@@ -106,13 +106,13 @@ module Google
106
106
  # To create a new PredictionService client with the default
107
107
  # configuration:
108
108
  #
109
- # client = Google::Cloud::AutoML::V1::PredictionService::Client.new
109
+ # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new
110
110
  #
111
111
  # To create a new PredictionService client with a custom
112
112
  # configuration:
113
113
  #
114
- # client = Google::Cloud::AutoML::V1::PredictionService::Client.new do |config|
115
- # config.timeout = 10_000
114
+ # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config|
115
+ # config.timeout = 10.0
116
116
  # end
117
117
  #
118
118
  # @yield [config] Configure the PredictionService client.
@@ -144,8 +144,8 @@ module Google
144
144
  config.endpoint = @config.endpoint
145
145
  end
146
146
 
147
- @prediction_service_stub = Gapic::ServiceStub.new(
148
- Google::Cloud::AutoML::V1::PredictionService::Stub,
147
+ @prediction_service_stub = ::Gapic::ServiceStub.new(
148
+ ::Google::Cloud::AutoML::V1::PredictionService::Stub,
149
149
  credentials: credentials,
150
150
  endpoint: @config.endpoint,
151
151
  channel_args: @config.channel_args,
@@ -156,7 +156,7 @@ module Google
156
156
  ##
157
157
  # Get the associated client for long-running operations.
158
158
  #
159
- # @return [Google::Cloud::AutoML::V1::PredictionService::Operations]
159
+ # @return [::Google::Cloud::AutoML::V1::PredictionService::Operations]
160
160
  #
161
161
  attr_reader :operations_client
162
162
 
@@ -167,51 +167,47 @@ module Google
167
167
  # returned in the response.
168
168
  # Available for following ML scenarios, and their expected request payloads:
169
169
  #
170
- # <table>
171
- # <tr>
172
- # <td>AutoML Vision Classification</td>
173
- # <td>An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.</td>
174
- # </tr>
175
- # <tr>
176
- # <td>AutoML Vision Object Detection</td>
177
- # <td>An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.</td>
178
- # </tr>
179
- # <tr>
180
- # <td>AutoML Natural Language Classification</td>
181
- # <td>A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in
182
- # .PDF, .TIF or .TIFF format with size upto 2MB.</td>
183
- # </tr>
184
- # <tr>
185
- # <td>AutoML Natural Language Entity Extraction</td>
186
- # <td>A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document
187
- # in .PDF, .TIF or .TIFF format with size upto 20MB.</td>
188
- # </tr>
189
- # <tr>
190
- # <td>AutoML Natural Language Sentiment Analysis</td>
191
- # <td>A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in
192
- # .PDF, .TIF or .TIFF format with size upto 2MB.</td>
193
- # </tr>
194
- # <tr>
195
- # <td>AutoML Translation</td>
196
- # <td>A TextSnippet up to 25,000 characters, UTF-8 encoded.</td>
197
- # </tr>
198
- # <tr>
199
- # <td>AutoML Tables</td>
200
- # <td>A row with column values matching
170
+ # AutoML Vision Classification
171
+ #
172
+ # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.
173
+ #
174
+ # AutoML Vision Object Detection
175
+ #
176
+ # * An image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB.
177
+ #
178
+ # AutoML Natural Language Classification
179
+ #
180
+ # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in
181
+ # .PDF, .TIF or .TIFF format with size upto 2MB.
182
+ #
183
+ # AutoML Natural Language Entity Extraction
184
+ #
185
+ # * A TextSnippet up to 10,000 characters, UTF-8 NFC encoded or a document
186
+ # in .PDF, .TIF or .TIFF format with size upto 20MB.
187
+ #
188
+ # AutoML Natural Language Sentiment Analysis
189
+ #
190
+ # * A TextSnippet up to 60,000 characters, UTF-8 encoded or a document in
191
+ # .PDF, .TIF or .TIFF format with size upto 2MB.
192
+ #
193
+ # AutoML Translation
194
+ #
195
+ # * A TextSnippet up to 25,000 characters, UTF-8 encoded.
196
+ #
197
+ # AutoML Tables
198
+ #
199
+ # * A row with column values matching
201
200
  # the columns of the model, up to 5MB. Not available for FORECASTING
202
201
  # `prediction_type`.
203
- # </td>
204
- # </tr>
205
- # </table>
206
202
  #
207
203
  # @overload predict(request, options = nil)
208
204
  # Pass arguments to `predict` via a request object, either of type
209
- # {Google::Cloud::AutoML::V1::PredictRequest} or an equivalent Hash.
205
+ # {::Google::Cloud::AutoML::V1::PredictRequest} or an equivalent Hash.
210
206
  #
211
- # @param request [Google::Cloud::AutoML::V1::PredictRequest, Hash]
207
+ # @param request [::Google::Cloud::AutoML::V1::PredictRequest, ::Hash]
212
208
  # A request object representing the call parameters. Required. To specify no
213
209
  # parameters, or to keep all the default parameter values, pass an empty Hash.
214
- # @param options [Gapic::CallOptions, Hash]
210
+ # @param options [::Gapic::CallOptions, ::Hash]
215
211
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
216
212
  #
217
213
  # @overload predict(name: nil, payload: nil, params: nil)
@@ -219,23 +215,23 @@ module Google
219
215
  # least one keyword argument is required. To specify no parameters, or to keep all
220
216
  # the default parameter values, pass an empty Hash as a request object (see above).
221
217
  #
222
- # @param name [String]
218
+ # @param name [::String]
223
219
  # Required. Name of the model requested to serve the prediction.
224
- # @param payload [Google::Cloud::AutoML::V1::ExamplePayload, Hash]
220
+ # @param payload [::Google::Cloud::AutoML::V1::ExamplePayload, ::Hash]
225
221
  # Required. Payload to perform a prediction on. The payload must match the
226
222
  # problem type that the model was trained to solve.
227
- # @param params [Hash{String => String}]
223
+ # @param params [::Hash{::String => ::String}]
228
224
  # Additional domain-specific parameters, any string must be up to 25000
229
225
  # characters long.
230
226
  #
231
- # <h4>AutoML Vision Classification</h4>
227
+ # AutoML Vision Classification
232
228
  #
233
229
  # `score_threshold`
234
230
  # : (float) A value from 0.0 to 1.0. When the model
235
231
  # makes predictions for an image, it will only produce results that have
236
232
  # at least this confidence score. The default is 0.5.
237
233
  #
238
- # <h4>AutoML Vision Object Detection</h4>
234
+ # AutoML Vision Object Detection
239
235
  #
240
236
  # `score_threshold`
241
237
  # : (float) When Model detects objects on the image,
@@ -247,7 +243,7 @@ module Google
247
243
  # boxes returned. The default is 100. The
248
244
  # number of returned bounding boxes might be limited by the server.
249
245
  #
250
- # <h4>AutoML Tables</h4>
246
+ # AutoML Tables
251
247
  #
252
248
  # `feature_importance`
253
249
  # : (boolean) Whether
@@ -258,26 +254,26 @@ module Google
258
254
  # objects. The default is false.
259
255
  #
260
256
  # @yield [response, operation] Access the result along with the RPC operation
261
- # @yieldparam response [Google::Cloud::AutoML::V1::PredictResponse]
262
- # @yieldparam operation [GRPC::ActiveCall::Operation]
257
+ # @yieldparam response [::Google::Cloud::AutoML::V1::PredictResponse]
258
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
263
259
  #
264
- # @return [Google::Cloud::AutoML::V1::PredictResponse]
260
+ # @return [::Google::Cloud::AutoML::V1::PredictResponse]
265
261
  #
266
- # @raise [Google::Cloud::Error] if the RPC is aborted.
262
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
267
263
  #
268
264
  def predict request, options = nil
269
- raise ArgumentError, "request must be provided" if request.nil?
265
+ raise ::ArgumentError, "request must be provided" if request.nil?
270
266
 
271
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::AutoML::V1::PredictRequest
267
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::PredictRequest
272
268
 
273
269
  # Converts hash and nil to an options object
274
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
270
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
275
271
 
276
272
  # Customize the options with defaults
277
273
  metadata = @config.rpcs.predict.metadata.to_h
278
274
 
279
275
  # Set x-goog-api-client and x-goog-user-project headers
280
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
276
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
281
277
  lib_name: @config.lib_name, lib_version: @config.lib_version,
282
278
  gapic_version: ::Google::Cloud::Automl::V1::VERSION
283
279
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -298,17 +294,17 @@ module Google
298
294
  yield response, operation if block_given?
299
295
  return response
300
296
  end
301
- rescue GRPC::BadStatus => e
302
- raise Google::Cloud::Error.from_error(e)
297
+ rescue ::GRPC::BadStatus => e
298
+ raise ::Google::Cloud::Error.from_error(e)
303
299
  end
304
300
 
305
301
  ##
306
- # Perform a batch prediction. Unlike the online {Google::Cloud::AutoML::V1::PredictionService::Client#predict Predict}, batch
302
+ # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1::PredictionService::Client#predict Predict}, batch
307
303
  # prediction result won't be immediately available in the response. Instead,
308
304
  # a long running operation object is returned. User can poll the operation
309
305
  # result via GetOperation
310
- # method. Once the operation is done, {Google::Cloud::AutoML::V1::BatchPredictResult BatchPredictResult} is returned in
311
- # the {Google::Longrunning::Operation#response response} field.
306
+ # method. Once the operation is done, {::Google::Cloud::AutoML::V1::BatchPredictResult BatchPredictResult} is returned in
307
+ # the {::Google::Longrunning::Operation#response response} field.
312
308
  # Available for following ML scenarios:
313
309
  #
314
310
  # * AutoML Vision Classification
@@ -321,12 +317,12 @@ module Google
321
317
  #
322
318
  # @overload batch_predict(request, options = nil)
323
319
  # Pass arguments to `batch_predict` via a request object, either of type
324
- # {Google::Cloud::AutoML::V1::BatchPredictRequest} or an equivalent Hash.
320
+ # {::Google::Cloud::AutoML::V1::BatchPredictRequest} or an equivalent Hash.
325
321
  #
326
- # @param request [Google::Cloud::AutoML::V1::BatchPredictRequest, Hash]
322
+ # @param request [::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Hash]
327
323
  # A request object representing the call parameters. Required. To specify no
328
324
  # parameters, or to keep all the default parameter values, pass an empty Hash.
329
- # @param options [Gapic::CallOptions, Hash]
325
+ # @param options [::Gapic::CallOptions, ::Hash]
330
326
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
331
327
  #
332
328
  # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil)
@@ -334,18 +330,18 @@ module Google
334
330
  # least one keyword argument is required. To specify no parameters, or to keep all
335
331
  # the default parameter values, pass an empty Hash as a request object (see above).
336
332
  #
337
- # @param name [String]
333
+ # @param name [::String]
338
334
  # Required. Name of the model requested to serve the batch prediction.
339
- # @param input_config [Google::Cloud::AutoML::V1::BatchPredictInputConfig, Hash]
335
+ # @param input_config [::Google::Cloud::AutoML::V1::BatchPredictInputConfig, ::Hash]
340
336
  # Required. The input configuration for batch prediction.
341
- # @param output_config [Google::Cloud::AutoML::V1::BatchPredictOutputConfig, Hash]
337
+ # @param output_config [::Google::Cloud::AutoML::V1::BatchPredictOutputConfig, ::Hash]
342
338
  # Required. The Configuration specifying where output predictions should
343
339
  # be written.
344
- # @param params [Hash{String => String}]
340
+ # @param params [::Hash{::String => ::String}]
345
341
  # Additional domain-specific parameters for the predictions, any string must
346
342
  # be up to 25000 characters long.
347
343
  #
348
- # <h4>AutoML Natural Language Classification</h4>
344
+ # AutoML Natural Language Classification
349
345
  #
350
346
  # `score_threshold`
351
347
  # : (float) A value from 0.0 to 1.0. When the model
@@ -353,14 +349,14 @@ module Google
353
349
  # that have at least this confidence score. The default is 0.5.
354
350
  #
355
351
  #
356
- # <h4>AutoML Vision Classification</h4>
352
+ # AutoML Vision Classification
357
353
  #
358
354
  # `score_threshold`
359
355
  # : (float) A value from 0.0 to 1.0. When the model
360
356
  # makes predictions for an image, it will only produce results that
361
357
  # have at least this confidence score. The default is 0.5.
362
358
  #
363
- # <h4>AutoML Vision Object Detection</h4>
359
+ # AutoML Vision Object Detection
364
360
  #
365
361
  # `score_threshold`
366
362
  # : (float) When Model detects objects on the image,
@@ -371,7 +367,7 @@ module Google
371
367
  # : (int64) The maximum number of bounding
372
368
  # boxes returned per image. The default is 100, the
373
369
  # number of bounding boxes returned might be limited by the server.
374
- # <h4>AutoML Video Intelligence Classification</h4>
370
+ # AutoML Video Intelligence Classification
375
371
  #
376
372
  # `score_threshold`
377
373
  # : (float) A value from 0.0 to 1.0. When the model
@@ -409,7 +405,7 @@ module Google
409
405
  # type, the quality of it depends on training data, but there are no
410
406
  # metrics provided to describe that quality.
411
407
  #
412
- # <h4>AutoML Video Intelligence Object Tracking</h4>
408
+ # AutoML Video Intelligence Object Tracking
413
409
  #
414
410
  # `score_threshold`
415
411
  # : (float) When Model detects objects on video frames,
@@ -427,26 +423,26 @@ module Google
427
423
  # returned. Value in 0 to 1 range. Default is 0.
428
424
  #
429
425
  # @yield [response, operation] Access the result along with the RPC operation
430
- # @yieldparam response [Gapic::Operation]
431
- # @yieldparam operation [GRPC::ActiveCall::Operation]
426
+ # @yieldparam response [::Gapic::Operation]
427
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
432
428
  #
433
- # @return [Gapic::Operation]
429
+ # @return [::Gapic::Operation]
434
430
  #
435
- # @raise [Google::Cloud::Error] if the RPC is aborted.
431
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
436
432
  #
437
433
  def batch_predict request, options = nil
438
- raise ArgumentError, "request must be provided" if request.nil?
434
+ raise ::ArgumentError, "request must be provided" if request.nil?
439
435
 
440
- request = Gapic::Protobuf.coerce request, to: Google::Cloud::AutoML::V1::BatchPredictRequest
436
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1::BatchPredictRequest
441
437
 
442
438
  # Converts hash and nil to an options object
443
- options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
439
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
444
440
 
445
441
  # Customize the options with defaults
446
442
  metadata = @config.rpcs.batch_predict.metadata.to_h
447
443
 
448
444
  # Set x-goog-api-client and x-goog-user-project headers
449
- metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
445
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
450
446
  lib_name: @config.lib_name, lib_version: @config.lib_version,
451
447
  gapic_version: ::Google::Cloud::Automl::V1::VERSION
452
448
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
@@ -464,12 +460,12 @@ module Google
464
460
  retry_policy: @config.retry_policy
465
461
 
466
462
  @prediction_service_stub.call_rpc :batch_predict, request, options: options do |response, operation|
467
- response = Gapic::Operation.new response, @operations_client, options: options
463
+ response = ::Gapic::Operation.new response, @operations_client, options: options
468
464
  yield response, operation if block_given?
469
465
  return response
470
466
  end
471
- rescue GRPC::BadStatus => e
472
- raise Google::Cloud::Error.from_error(e)
467
+ rescue ::GRPC::BadStatus => e
468
+ raise ::Google::Cloud::Error.from_error(e)
473
469
  end
474
470
 
475
471
  ##
@@ -479,7 +475,7 @@ module Google
479
475
  # providing control over timeouts, retry behavior, logging, transport
480
476
  # parameters, and other low-level controls. Certain parameters can also be
481
477
  # applied individually to specific RPCs. See
482
- # {Google::Cloud::AutoML::V1::PredictionService::Client::Configuration::Rpcs}
478
+ # {::Google::Cloud::AutoML::V1::PredictionService::Client::Configuration::Rpcs}
483
479
  # for a list of RPCs that can be configured independently.
484
480
  #
485
481
  # Configuration can be applied globally to all clients, or to a single client
@@ -490,22 +486,22 @@ module Google
490
486
  # To modify the global config, setting the timeout for predict
491
487
  # to 20 seconds, and all remaining timeouts to 10 seconds:
492
488
  #
493
- # Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config|
494
- # config.timeout = 10_000
495
- # config.rpcs.predict.timeout = 20_000
489
+ # ::Google::Cloud::AutoML::V1::PredictionService::Client.configure do |config|
490
+ # config.timeout = 10.0
491
+ # config.rpcs.predict.timeout = 20.0
496
492
  # end
497
493
  #
498
494
  # To apply the above configuration only to a new client:
499
495
  #
500
- # client = Google::Cloud::AutoML::V1::PredictionService::Client.new do |config|
501
- # config.timeout = 10_000
502
- # config.rpcs.predict.timeout = 20_000
496
+ # client = ::Google::Cloud::AutoML::V1::PredictionService::Client.new do |config|
497
+ # config.timeout = 10.0
498
+ # config.rpcs.predict.timeout = 20.0
503
499
  # end
504
500
  #
505
501
  # @!attribute [rw] endpoint
506
502
  # The hostname or hostname:port of the service endpoint.
507
503
  # Defaults to `"automl.googleapis.com"`.
508
- # @return [String]
504
+ # @return [::String]
509
505
  # @!attribute [rw] credentials
510
506
  # Credentials to send with calls. You may provide any of the following types:
511
507
  # * (`String`) The path to a service account key file in JSON format
@@ -517,29 +513,29 @@ module Google
517
513
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
518
514
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
519
515
  # * (`nil`) indicating no credentials
520
- # @return [Object]
516
+ # @return [::Object]
521
517
  # @!attribute [rw] scope
522
518
  # The OAuth scopes
523
- # @return [Array<String>]
519
+ # @return [::Array<::String>]
524
520
  # @!attribute [rw] lib_name
525
521
  # The library name as recorded in instrumentation and logging
526
- # @return [String]
522
+ # @return [::String]
527
523
  # @!attribute [rw] lib_version
528
524
  # The library version as recorded in instrumentation and logging
529
- # @return [String]
525
+ # @return [::String]
530
526
  # @!attribute [rw] channel_args
531
527
  # Extra parameters passed to the gRPC channel. Note: this is ignored if a
532
528
  # `GRPC::Core::Channel` object is provided as the credential.
533
- # @return [Hash]
529
+ # @return [::Hash]
534
530
  # @!attribute [rw] interceptors
535
531
  # An array of interceptors that are run before calls are executed.
536
- # @return [Array<GRPC::ClientInterceptor>]
532
+ # @return [::Array<::GRPC::ClientInterceptor>]
537
533
  # @!attribute [rw] timeout
538
- # The call timeout in milliseconds.
539
- # @return [Numeric]
534
+ # The call timeout in seconds.
535
+ # @return [::Numeric]
540
536
  # @!attribute [rw] metadata
541
537
  # Additional gRPC headers to be sent with the call.
542
- # @return [Hash{Symbol=>String}]
538
+ # @return [::Hash{::Symbol=>::String}]
543
539
  # @!attribute [rw] retry_policy
544
540
  # The retry policy. The value is a hash with the following keys:
545
541
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
@@ -547,10 +543,10 @@ module Google
547
543
  # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
548
544
  # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
549
545
  # trigger a retry.
550
- # @return [Hash]
546
+ # @return [::Hash]
551
547
  #
552
548
  class Configuration
553
- extend Gapic::Config
549
+ extend ::Gapic::Config
554
550
 
555
551
  config_attr :endpoint, "automl.googleapis.com", String
556
552
  config_attr :credentials, nil do |value|
@@ -558,14 +554,14 @@ module Google
558
554
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
559
555
  allowed.any? { |klass| klass === value }
560
556
  end
561
- config_attr :scope, nil, String, Array, nil
562
- config_attr :lib_name, nil, String, nil
563
- config_attr :lib_version, nil, String, nil
564
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
565
- config_attr :interceptors, nil, Array, nil
566
- config_attr :timeout, nil, Numeric, nil
567
- config_attr :metadata, nil, Hash, nil
568
- config_attr :retry_policy, nil, Hash, Proc, nil
557
+ config_attr :scope, nil, ::String, ::Array, nil
558
+ config_attr :lib_name, nil, ::String, nil
559
+ config_attr :lib_version, nil, ::String, nil
560
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
561
+ config_attr :interceptors, nil, ::Array, nil
562
+ config_attr :timeout, nil, ::Numeric, nil
563
+ config_attr :metadata, nil, ::Hash, nil
564
+ config_attr :retry_policy, nil, ::Hash, Proc, nil
569
565
 
570
566
  # @private
571
567
  def initialize parent_config = nil
@@ -606,21 +602,21 @@ module Google
606
602
  class Rpcs
607
603
  ##
608
604
  # RPC-specific configuration for `predict`
609
- # @return [Gapic::Config::Method]
605
+ # @return [::Gapic::Config::Method]
610
606
  #
611
607
  attr_reader :predict
612
608
  ##
613
609
  # RPC-specific configuration for `batch_predict`
614
- # @return [Gapic::Config::Method]
610
+ # @return [::Gapic::Config::Method]
615
611
  #
616
612
  attr_reader :batch_predict
617
613
 
618
614
  # @private
619
615
  def initialize parent_rpcs = nil
620
616
  predict_config = parent_rpcs&.predict if parent_rpcs&.respond_to? :predict
621
- @predict = Gapic::Config::Method.new predict_config
617
+ @predict = ::Gapic::Config::Method.new predict_config
622
618
  batch_predict_config = parent_rpcs&.batch_predict if parent_rpcs&.respond_to? :batch_predict
623
- @batch_predict = Gapic::Config::Method.new batch_predict_config
619
+ @batch_predict = ::Gapic::Config::Method.new batch_predict_config
624
620
 
625
621
  yield self if block_given?
626
622
  end
@@ -24,7 +24,7 @@ module Google
24
24
  module V1
25
25
  module PredictionService
26
26
  # Credentials for the PredictionService API.
27
- class Credentials < Google::Auth::Credentials
27
+ class Credentials < ::Google::Auth::Credentials
28
28
  self.scope = [
29
29
  "https://www.googleapis.com/auth/cloud-platform"
30
30
  ]