google-cloud-automl-v1 0.2.3 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5ec1c1084808944b73df13dcf98e3c6849a5a91b970518a5d1d790d96bfe21b
4
- data.tar.gz: 839d8df977c05eb1deb95204ce17c7a1040c4dcb7c38474178cdcab9223ba405
3
+ metadata.gz: e96f99a2ca103592e15623ff02f48b03eb1eef98b50066212a14113e82d853e3
4
+ data.tar.gz: 0f067699e452c213cf70bb0a3ff6fb6c7ffcec2f90ca57e9575f5385ef905abe
5
5
  SHA512:
6
- metadata.gz: 7709efe34e0b4d58149d0b9d0bd3092dd830ec717ce51d6f742212511b21e75c1fea27ec578fcc4ac62472b066f97e4db00cb619f049b3eb803eda68a070e745
7
- data.tar.gz: 05c9e1d661ac5c2e286effc42821cdbeab75a9706d3538b5a27f3ba888968c05625f4be74853a234601ba0fb9a208eace3c6d2fa93f2e37b54ec8505397822dc
6
+ metadata.gz: 1e760607b9e98ee7d82518552fd5d0fe656e04154cb62d0a9080316acbee40a57c2ccba43bd26f2ecf3e29be80278c85913d0dc176c1f62f91374f5cdd1ed4e5
7
+ data.tar.gz: 7a9c964a8d89ec357e75ed291dcb7391be8b9156cf4292b31ae77454df11811d338d1711cb47fed41365b4a7779b3decf281315ae776054241a714a798df5416
data/README.md CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
18
18
 
19
19
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
20
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/automl.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -33,6 +34,9 @@ response = client.predict request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-automl-v1/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/automl)
38
+ for general usage information.
39
+
36
40
  ## Enabling Logging
37
41
 
38
42
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -34,3 +34,6 @@ module Google
34
34
  end
35
35
  end
36
36
  end
37
+
38
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
39
+ require "google/cloud/automl/v1/_helpers" if ::File.file? helper_path
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+
18
+ module Google
19
+ module Cloud
20
+ module Automl
21
+ module V1
22
+ VERSION = ::Google::Cloud::AutoML::V1::VERSION
23
+ end
24
+ end
25
+ end
26
+ end
@@ -85,7 +85,7 @@ module Google
85
85
  initial_delay: 0.1,
86
86
  max_delay: 60.0,
87
87
  multiplier: 1.3,
88
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
88
+ retry_codes: [4, 14]
89
89
  }
90
90
 
91
91
  default_config.rpcs.list_datasets.timeout = 5.0
@@ -93,7 +93,7 @@ module Google
93
93
  initial_delay: 0.1,
94
94
  max_delay: 60.0,
95
95
  multiplier: 1.3,
96
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
96
+ retry_codes: [4, 14]
97
97
  }
98
98
 
99
99
  default_config.rpcs.update_dataset.timeout = 5.0
@@ -103,7 +103,7 @@ module Google
103
103
  initial_delay: 0.1,
104
104
  max_delay: 60.0,
105
105
  multiplier: 1.3,
106
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
106
+ retry_codes: [4, 14]
107
107
  }
108
108
 
109
109
  default_config.rpcs.import_data.timeout = 5.0
@@ -115,7 +115,7 @@ module Google
115
115
  initial_delay: 0.1,
116
116
  max_delay: 60.0,
117
117
  multiplier: 1.3,
118
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
118
+ retry_codes: [4, 14]
119
119
  }
120
120
 
121
121
  default_config.rpcs.create_model.timeout = 5.0
@@ -125,7 +125,7 @@ module Google
125
125
  initial_delay: 0.1,
126
126
  max_delay: 60.0,
127
127
  multiplier: 1.3,
128
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
128
+ retry_codes: [4, 14]
129
129
  }
130
130
 
131
131
  default_config.rpcs.list_models.timeout = 5.0
@@ -133,7 +133,7 @@ module Google
133
133
  initial_delay: 0.1,
134
134
  max_delay: 60.0,
135
135
  multiplier: 1.3,
136
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
136
+ retry_codes: [4, 14]
137
137
  }
138
138
 
139
139
  default_config.rpcs.delete_model.timeout = 5.0
@@ -141,7 +141,7 @@ module Google
141
141
  initial_delay: 0.1,
142
142
  max_delay: 60.0,
143
143
  multiplier: 1.3,
144
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
144
+ retry_codes: [4, 14]
145
145
  }
146
146
 
147
147
  default_config.rpcs.update_model.timeout = 5.0
@@ -157,7 +157,7 @@ module Google
157
157
  initial_delay: 0.1,
158
158
  max_delay: 60.0,
159
159
  multiplier: 1.3,
160
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
160
+ retry_codes: [4, 14]
161
161
  }
162
162
 
163
163
  default_config.rpcs.list_model_evaluations.timeout = 5.0
@@ -165,7 +165,7 @@ module Google
165
165
  initial_delay: 0.1,
166
166
  max_delay: 60.0,
167
167
  multiplier: 1.3,
168
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
168
+ retry_codes: [4, 14]
169
169
  }
170
170
 
171
171
  default_config
@@ -304,7 +304,7 @@ module Google
304
304
  # Set x-goog-api-client and x-goog-user-project headers
305
305
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
306
306
  lib_name: @config.lib_name, lib_version: @config.lib_version,
307
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
307
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
308
308
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
309
309
 
310
310
  header_params = {
@@ -371,7 +371,7 @@ module Google
371
371
  # Set x-goog-api-client and x-goog-user-project headers
372
372
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
373
373
  lib_name: @config.lib_name, lib_version: @config.lib_version,
374
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
374
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
375
375
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
376
376
 
377
377
  header_params = {
@@ -453,7 +453,7 @@ module Google
453
453
  # Set x-goog-api-client and x-goog-user-project headers
454
454
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
455
455
  lib_name: @config.lib_name, lib_version: @config.lib_version,
456
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
456
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
457
457
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
458
458
 
459
459
  header_params = {
@@ -522,7 +522,7 @@ module Google
522
522
  # Set x-goog-api-client and x-goog-user-project headers
523
523
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
524
524
  lib_name: @config.lib_name, lib_version: @config.lib_version,
525
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
525
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
526
526
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
527
527
 
528
528
  header_params = {
@@ -592,7 +592,7 @@ module Google
592
592
  # Set x-goog-api-client and x-goog-user-project headers
593
593
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
594
594
  lib_name: @config.lib_name, lib_version: @config.lib_version,
595
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
595
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
596
596
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
597
597
 
598
598
  header_params = {
@@ -671,7 +671,7 @@ module Google
671
671
  # Set x-goog-api-client and x-goog-user-project headers
672
672
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
673
673
  lib_name: @config.lib_name, lib_version: @config.lib_version,
674
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
674
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
675
675
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
676
676
 
677
677
  header_params = {
@@ -742,7 +742,7 @@ module Google
742
742
  # Set x-goog-api-client and x-goog-user-project headers
743
743
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
744
744
  lib_name: @config.lib_name, lib_version: @config.lib_version,
745
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
745
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
746
746
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
747
747
 
748
748
  header_params = {
@@ -809,7 +809,7 @@ module Google
809
809
  # Set x-goog-api-client and x-goog-user-project headers
810
810
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
811
811
  lib_name: @config.lib_name, lib_version: @config.lib_version,
812
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
812
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
813
813
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
814
814
 
815
815
  header_params = {
@@ -881,7 +881,7 @@ module Google
881
881
  # Set x-goog-api-client and x-goog-user-project headers
882
882
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
883
883
  lib_name: @config.lib_name, lib_version: @config.lib_version,
884
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
884
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
885
885
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
886
886
 
887
887
  header_params = {
@@ -948,7 +948,7 @@ module Google
948
948
  # Set x-goog-api-client and x-goog-user-project headers
949
949
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
950
950
  lib_name: @config.lib_name, lib_version: @config.lib_version,
951
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
951
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
952
952
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
953
953
 
954
954
  header_params = {
@@ -1031,7 +1031,7 @@ module Google
1031
1031
  # Set x-goog-api-client and x-goog-user-project headers
1032
1032
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1033
1033
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1034
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
1034
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
1035
1035
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1036
1036
 
1037
1037
  header_params = {
@@ -1102,7 +1102,7 @@ module Google
1102
1102
  # Set x-goog-api-client and x-goog-user-project headers
1103
1103
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1104
1104
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1105
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
1105
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
1106
1106
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1107
1107
 
1108
1108
  header_params = {
@@ -1171,7 +1171,7 @@ module Google
1171
1171
  # Set x-goog-api-client and x-goog-user-project headers
1172
1172
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1173
1173
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1174
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
1174
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
1175
1175
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1176
1176
 
1177
1177
  header_params = {
@@ -1252,7 +1252,7 @@ module Google
1252
1252
  # Set x-goog-api-client and x-goog-user-project headers
1253
1253
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1254
1254
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1255
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
1255
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
1256
1256
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1257
1257
 
1258
1258
  header_params = {
@@ -1325,7 +1325,7 @@ module Google
1325
1325
  # Set x-goog-api-client and x-goog-user-project headers
1326
1326
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1327
1327
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1328
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
1328
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
1329
1329
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1330
1330
 
1331
1331
  header_params = {
@@ -1400,7 +1400,7 @@ module Google
1400
1400
  # Set x-goog-api-client and x-goog-user-project headers
1401
1401
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1402
1402
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1403
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
1403
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
1404
1404
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1405
1405
 
1406
1406
  header_params = {
@@ -1467,7 +1467,7 @@ module Google
1467
1467
  # Set x-goog-api-client and x-goog-user-project headers
1468
1468
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1469
1469
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1470
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
1470
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
1471
1471
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1472
1472
 
1473
1473
  header_params = {
@@ -1554,7 +1554,7 @@ module Google
1554
1554
  # Set x-goog-api-client and x-goog-user-project headers
1555
1555
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1556
1556
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1557
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
1557
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
1558
1558
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1559
1559
 
1560
1560
  header_params = {
@@ -1663,7 +1663,7 @@ module Google
1663
1663
 
1664
1664
  config_attr :endpoint, "automl.googleapis.com", ::String
1665
1665
  config_attr :credentials, nil do |value|
1666
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1666
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1667
1667
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1668
1668
  allowed.any? { |klass| klass === value }
1669
1669
  end
@@ -1703,7 +1703,7 @@ module Google
1703
1703
  # Each configuration object is of type `Gapic::Config::Method` and includes
1704
1704
  # the following configuration fields:
1705
1705
  #
1706
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
1706
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1707
1707
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1708
1708
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1709
1709
  # include the following keys:
@@ -152,7 +152,7 @@ module Google
152
152
  # Set x-goog-api-client and x-goog-user-project headers
153
153
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
154
154
  lib_name: @config.lib_name, lib_version: @config.lib_version,
155
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
155
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
156
156
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
157
157
 
158
158
  header_params = {
@@ -222,7 +222,7 @@ module Google
222
222
  # Set x-goog-api-client and x-goog-user-project headers
223
223
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
224
224
  lib_name: @config.lib_name, lib_version: @config.lib_version,
225
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
225
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
226
226
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
227
227
 
228
228
  header_params = {
@@ -292,7 +292,7 @@ module Google
292
292
  # Set x-goog-api-client and x-goog-user-project headers
293
293
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
294
294
  lib_name: @config.lib_name, lib_version: @config.lib_version,
295
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
295
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
296
296
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
297
297
 
298
298
  header_params = {
@@ -367,7 +367,7 @@ module Google
367
367
  # Set x-goog-api-client and x-goog-user-project headers
368
368
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
369
369
  lib_name: @config.lib_name, lib_version: @config.lib_version,
370
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
370
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
371
371
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
372
372
 
373
373
  header_params = {
@@ -475,7 +475,7 @@ module Google
475
475
 
476
476
  config_attr :endpoint, "automl.googleapis.com", ::String
477
477
  config_attr :credentials, nil do |value|
478
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
478
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
479
479
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
480
480
  allowed.any? { |klass| klass === value }
481
481
  end
@@ -515,7 +515,7 @@ module Google
515
515
  # Each configuration object is of type `Gapic::Config::Method` and includes
516
516
  # the following configuration fields:
517
517
  #
518
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
518
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
519
519
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
520
520
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
521
521
  # include the following keys:
@@ -276,7 +276,7 @@ module Google
276
276
  # Set x-goog-api-client and x-goog-user-project headers
277
277
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
278
278
  lib_name: @config.lib_name, lib_version: @config.lib_version,
279
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
279
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
280
280
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
281
281
 
282
282
  header_params = {
@@ -445,7 +445,7 @@ module Google
445
445
  # Set x-goog-api-client and x-goog-user-project headers
446
446
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
447
447
  lib_name: @config.lib_name, lib_version: @config.lib_version,
448
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
448
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
449
449
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
450
450
 
451
451
  header_params = {
@@ -554,7 +554,7 @@ module Google
554
554
 
555
555
  config_attr :endpoint, "automl.googleapis.com", ::String
556
556
  config_attr :credentials, nil do |value|
557
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
557
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
558
558
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
559
559
  allowed.any? { |klass| klass === value }
560
560
  end
@@ -594,7 +594,7 @@ module Google
594
594
  # Each configuration object is of type `Gapic::Config::Method` and includes
595
595
  # the following configuration fields:
596
596
  #
597
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
597
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
598
598
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
599
599
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
600
600
  # include the following keys:
@@ -152,7 +152,7 @@ module Google
152
152
  # Set x-goog-api-client and x-goog-user-project headers
153
153
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
154
154
  lib_name: @config.lib_name, lib_version: @config.lib_version,
155
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
155
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
156
156
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
157
157
 
158
158
  header_params = {
@@ -222,7 +222,7 @@ module Google
222
222
  # Set x-goog-api-client and x-goog-user-project headers
223
223
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
224
224
  lib_name: @config.lib_name, lib_version: @config.lib_version,
225
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
225
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
226
226
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
227
227
 
228
228
  header_params = {
@@ -292,7 +292,7 @@ module Google
292
292
  # Set x-goog-api-client and x-goog-user-project headers
293
293
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
294
294
  lib_name: @config.lib_name, lib_version: @config.lib_version,
295
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
295
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
296
296
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
297
297
 
298
298
  header_params = {
@@ -367,7 +367,7 @@ module Google
367
367
  # Set x-goog-api-client and x-goog-user-project headers
368
368
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
369
369
  lib_name: @config.lib_name, lib_version: @config.lib_version,
370
- gapic_version: ::Google::Cloud::Automl::V1::VERSION
370
+ gapic_version: ::Google::Cloud::AutoML::V1::VERSION
371
371
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
372
372
 
373
373
  header_params = {
@@ -475,7 +475,7 @@ module Google
475
475
 
476
476
  config_attr :endpoint, "automl.googleapis.com", ::String
477
477
  config_attr :credentials, nil do |value|
478
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
478
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
479
479
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
480
480
  allowed.any? { |klass| klass === value }
481
481
  end
@@ -515,7 +515,7 @@ module Google
515
515
  # Each configuration object is of type `Gapic::Config::Method` and includes
516
516
  # the following configuration fields:
517
517
  #
518
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
518
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
519
519
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
520
520
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
521
521
  # include the following keys:
@@ -72,7 +72,7 @@ module Google
72
72
  # * A row with column values matching
73
73
  # the columns of the model, up to 5MB. Not available for FORECASTING
74
74
  # `prediction_type`.
75
- rpc :Predict, Google::Cloud::AutoML::V1::PredictRequest, Google::Cloud::AutoML::V1::PredictResponse
75
+ rpc :Predict, ::Google::Cloud::AutoML::V1::PredictRequest, ::Google::Cloud::AutoML::V1::PredictResponse
76
76
  # Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1.PredictionService.Predict], batch
77
77
  # prediction result won't be immediately available in the response. Instead,
78
78
  # a long running operation object is returned. User can poll the operation
@@ -88,7 +88,7 @@ module Google
88
88
  # * AutoML Natural Language Entity Extraction
89
89
  # * AutoML Natural Language Sentiment Analysis
90
90
  # * AutoML Tables
91
- rpc :BatchPredict, Google::Cloud::AutoML::V1::BatchPredictRequest, Google::Longrunning::Operation
91
+ rpc :BatchPredict, ::Google::Cloud::AutoML::V1::BatchPredictRequest, ::Google::Longrunning::Operation
92
92
  end
93
93
 
94
94
  Stub = Service.rpc_stub_class
@@ -47,19 +47,19 @@ module Google
47
47
  self.service_name = 'google.cloud.automl.v1.AutoMl'
48
48
 
49
49
  # Creates a dataset.
50
- rpc :CreateDataset, Google::Cloud::AutoML::V1::CreateDatasetRequest, Google::Longrunning::Operation
50
+ rpc :CreateDataset, ::Google::Cloud::AutoML::V1::CreateDatasetRequest, ::Google::Longrunning::Operation
51
51
  # Gets a dataset.
52
- rpc :GetDataset, Google::Cloud::AutoML::V1::GetDatasetRequest, Google::Cloud::AutoML::V1::Dataset
52
+ rpc :GetDataset, ::Google::Cloud::AutoML::V1::GetDatasetRequest, ::Google::Cloud::AutoML::V1::Dataset
53
53
  # Lists datasets in a project.
54
- rpc :ListDatasets, Google::Cloud::AutoML::V1::ListDatasetsRequest, Google::Cloud::AutoML::V1::ListDatasetsResponse
54
+ rpc :ListDatasets, ::Google::Cloud::AutoML::V1::ListDatasetsRequest, ::Google::Cloud::AutoML::V1::ListDatasetsResponse
55
55
  # Updates a dataset.
56
- rpc :UpdateDataset, Google::Cloud::AutoML::V1::UpdateDatasetRequest, Google::Cloud::AutoML::V1::Dataset
56
+ rpc :UpdateDataset, ::Google::Cloud::AutoML::V1::UpdateDatasetRequest, ::Google::Cloud::AutoML::V1::Dataset
57
57
  # Deletes a dataset and all of its contents.
58
58
  # Returns empty response in the
59
59
  # [response][google.longrunning.Operation.response] field when it completes,
60
60
  # and `delete_details` in the
61
61
  # [metadata][google.longrunning.Operation.metadata] field.
62
- rpc :DeleteDataset, Google::Cloud::AutoML::V1::DeleteDatasetRequest, Google::Longrunning::Operation
62
+ rpc :DeleteDataset, ::Google::Cloud::AutoML::V1::DeleteDatasetRequest, ::Google::Longrunning::Operation
63
63
  # Imports data into a dataset.
64
64
  # For Tables this method can only be called on an empty Dataset.
65
65
  #
@@ -69,31 +69,31 @@ module Google
69
69
  # parameter must be explicitly set.
70
70
  # Returns an empty response in the
71
71
  # [response][google.longrunning.Operation.response] field when it completes.
72
- rpc :ImportData, Google::Cloud::AutoML::V1::ImportDataRequest, Google::Longrunning::Operation
72
+ rpc :ImportData, ::Google::Cloud::AutoML::V1::ImportDataRequest, ::Google::Longrunning::Operation
73
73
  # Exports dataset's data to the provided output location.
74
74
  # Returns an empty response in the
75
75
  # [response][google.longrunning.Operation.response] field when it completes.
76
- rpc :ExportData, Google::Cloud::AutoML::V1::ExportDataRequest, Google::Longrunning::Operation
76
+ rpc :ExportData, ::Google::Cloud::AutoML::V1::ExportDataRequest, ::Google::Longrunning::Operation
77
77
  # Gets an annotation spec.
78
- rpc :GetAnnotationSpec, Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, Google::Cloud::AutoML::V1::AnnotationSpec
78
+ rpc :GetAnnotationSpec, ::Google::Cloud::AutoML::V1::GetAnnotationSpecRequest, ::Google::Cloud::AutoML::V1::AnnotationSpec
79
79
  # Creates a model.
80
80
  # Returns a Model in the [response][google.longrunning.Operation.response]
81
81
  # field when it completes.
82
82
  # When you create a model, several model evaluations are created for it:
83
83
  # a global evaluation, and one evaluation for each annotation spec.
84
- rpc :CreateModel, Google::Cloud::AutoML::V1::CreateModelRequest, Google::Longrunning::Operation
84
+ rpc :CreateModel, ::Google::Cloud::AutoML::V1::CreateModelRequest, ::Google::Longrunning::Operation
85
85
  # Gets a model.
86
- rpc :GetModel, Google::Cloud::AutoML::V1::GetModelRequest, Google::Cloud::AutoML::V1::Model
86
+ rpc :GetModel, ::Google::Cloud::AutoML::V1::GetModelRequest, ::Google::Cloud::AutoML::V1::Model
87
87
  # Lists models.
88
- rpc :ListModels, Google::Cloud::AutoML::V1::ListModelsRequest, Google::Cloud::AutoML::V1::ListModelsResponse
88
+ rpc :ListModels, ::Google::Cloud::AutoML::V1::ListModelsRequest, ::Google::Cloud::AutoML::V1::ListModelsResponse
89
89
  # Deletes a model.
90
90
  # Returns `google.protobuf.Empty` in the
91
91
  # [response][google.longrunning.Operation.response] field when it completes,
92
92
  # and `delete_details` in the
93
93
  # [metadata][google.longrunning.Operation.metadata] field.
94
- rpc :DeleteModel, Google::Cloud::AutoML::V1::DeleteModelRequest, Google::Longrunning::Operation
94
+ rpc :DeleteModel, ::Google::Cloud::AutoML::V1::DeleteModelRequest, ::Google::Longrunning::Operation
95
95
  # Updates a model.
96
- rpc :UpdateModel, Google::Cloud::AutoML::V1::UpdateModelRequest, Google::Cloud::AutoML::V1::Model
96
+ rpc :UpdateModel, ::Google::Cloud::AutoML::V1::UpdateModelRequest, ::Google::Cloud::AutoML::V1::Model
97
97
  # Deploys a model. If a model is already deployed, deploying it with the
98
98
  # same parameters has no effect. Deploying with different parametrs
99
99
  # (as e.g. changing
@@ -106,7 +106,7 @@ module Google
106
106
  #
107
107
  # Returns an empty response in the
108
108
  # [response][google.longrunning.Operation.response] field when it completes.
109
- rpc :DeployModel, Google::Cloud::AutoML::V1::DeployModelRequest, Google::Longrunning::Operation
109
+ rpc :DeployModel, ::Google::Cloud::AutoML::V1::DeployModelRequest, ::Google::Longrunning::Operation
110
110
  # Undeploys a model. If the model is not deployed this method has no effect.
111
111
  #
112
112
  # Only applicable for Text Classification, Image Object Detection and Tables;
@@ -114,7 +114,7 @@ module Google
114
114
  #
115
115
  # Returns an empty response in the
116
116
  # [response][google.longrunning.Operation.response] field when it completes.
117
- rpc :UndeployModel, Google::Cloud::AutoML::V1::UndeployModelRequest, Google::Longrunning::Operation
117
+ rpc :UndeployModel, ::Google::Cloud::AutoML::V1::UndeployModelRequest, ::Google::Longrunning::Operation
118
118
  # Exports a trained, "export-able", model to a user specified Google Cloud
119
119
  # Storage location. A model is considered export-able if and only if it has
120
120
  # an export format defined for it in
@@ -122,11 +122,11 @@ module Google
122
122
  #
123
123
  # Returns an empty response in the
124
124
  # [response][google.longrunning.Operation.response] field when it completes.
125
- rpc :ExportModel, Google::Cloud::AutoML::V1::ExportModelRequest, Google::Longrunning::Operation
125
+ rpc :ExportModel, ::Google::Cloud::AutoML::V1::ExportModelRequest, ::Google::Longrunning::Operation
126
126
  # Gets a model evaluation.
127
- rpc :GetModelEvaluation, Google::Cloud::AutoML::V1::GetModelEvaluationRequest, Google::Cloud::AutoML::V1::ModelEvaluation
127
+ rpc :GetModelEvaluation, ::Google::Cloud::AutoML::V1::GetModelEvaluationRequest, ::Google::Cloud::AutoML::V1::ModelEvaluation
128
128
  # Lists model evaluations.
129
- rpc :ListModelEvaluations, Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, Google::Cloud::AutoML::V1::ListModelEvaluationsResponse
129
+ rpc :ListModelEvaluations, ::Google::Cloud::AutoML::V1::ListModelEvaluationsRequest, ::Google::Cloud::AutoML::V1::ListModelEvaluationsResponse
130
130
  end
131
131
 
132
132
  Stub = Service.rpc_stub_class
@@ -19,9 +19,9 @@
19
19
 
20
20
  module Google
21
21
  module Cloud
22
- module Automl
22
+ module AutoML
23
23
  module V1
24
- VERSION = "0.2.3"
24
+ VERSION = "0.2.8"
25
25
  end
26
26
  end
27
27
  end
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/\\{project}/topics/\\{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/\\{project}"
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
185
  # @return [::String]
186
- # The plural name used in the resource name, such as 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-automl-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-08 00:00:00.000000000 Z
11
+ date: 2021-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.2'
19
+ version: '0.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.2'
26
+ version: '0.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-errors
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -166,6 +166,7 @@ files:
166
166
  - README.md
167
167
  - lib/google-cloud-automl-v1.rb
168
168
  - lib/google/cloud/automl/v1.rb
169
+ - lib/google/cloud/automl/v1/_helpers.rb
169
170
  - lib/google/cloud/automl/v1/annotation_payload_pb.rb
170
171
  - lib/google/cloud/automl/v1/annotation_spec_pb.rb
171
172
  - lib/google/cloud/automl/v1/automl.rb
@@ -247,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
248
  - !ruby/object:Gem::Version
248
249
  version: '0'
249
250
  requirements: []
250
- rubygems_version: 3.1.3
251
+ rubygems_version: 3.2.6
251
252
  signing_key:
252
253
  specification_version: 4
253
254
  summary: API Client library for the Cloud AutoML V1 API