google-cloud-data_labeling-v1beta1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-data_labeling-v1beta1.rb +21 -0
- data/lib/google/cloud/data_labeling/v1beta1.rb +35 -0
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service.rb +50 -0
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb +3294 -0
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/credentials.rb +51 -0
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/operations.rb +570 -0
- data/lib/google/cloud/data_labeling/v1beta1/data_labeling_service/paths.rb +193 -0
- data/lib/google/cloud/data_labeling/v1beta1/version.rb +28 -0
- data/lib/google/cloud/datalabeling/v1beta1/annotation_pb.rb +178 -0
- data/lib/google/cloud/datalabeling/v1beta1/annotation_spec_set_pb.rb +33 -0
- data/lib/google/cloud/datalabeling/v1beta1/data_labeling_service_pb.rb +301 -0
- data/lib/google/cloud/datalabeling/v1beta1/data_labeling_service_services_pb.rb +132 -0
- data/lib/google/cloud/datalabeling/v1beta1/data_payloads_pb.rb +45 -0
- data/lib/google/cloud/datalabeling/v1beta1/dataset_pb.rb +142 -0
- data/lib/google/cloud/datalabeling/v1beta1/evaluation_job_pb.rb +71 -0
- data/lib/google/cloud/datalabeling/v1beta1/evaluation_pb.rb +93 -0
- data/lib/google/cloud/datalabeling/v1beta1/human_annotation_config_pb.rb +98 -0
- data/lib/google/cloud/datalabeling/v1beta1/instruction_pb.rb +42 -0
- data/lib/google/cloud/datalabeling/v1beta1/operations_pb.rb +124 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/annotation.rb +407 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/annotation_spec_set.rb +71 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/data_labeling_service.rb +839 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/data_payloads.rb +87 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/dataset.rb +354 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/evaluation.rb +225 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/evaluation_job.rb +280 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/human_annotation_config.rb +248 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/instruction.rb +88 -0
- data/proto_docs/google/cloud/datalabeling/v1beta1/operations.rb +279 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +227 -0
@@ -0,0 +1,21 @@
|
|
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
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/data_labeling/v1beta1"
|
@@ -0,0 +1,35 @@
|
|
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
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/data_labeling/v1beta1/data_labeling_service"
|
20
|
+
require "google/cloud/data_labeling/v1beta1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module DataLabeling
|
25
|
+
##
|
26
|
+
# To load this package, including all its services, and instantiate a client:
|
27
|
+
#
|
28
|
+
# require "google/cloud/data_labeling/v1beta1"
|
29
|
+
# client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
|
30
|
+
#
|
31
|
+
module V1beta1
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/data_labeling/v1beta1/version"
|
24
|
+
|
25
|
+
require "google/cloud/data_labeling/v1beta1/data_labeling_service/credentials"
|
26
|
+
require "google/cloud/data_labeling/v1beta1/data_labeling_service/paths"
|
27
|
+
require "google/cloud/data_labeling/v1beta1/data_labeling_service/operations"
|
28
|
+
require "google/cloud/data_labeling/v1beta1/data_labeling_service/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module DataLabeling
|
33
|
+
module V1beta1
|
34
|
+
##
|
35
|
+
# Service for the AI Platform Data Labeling API.
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/data_labeling/v1beta1/data_labeling_service"
|
40
|
+
# client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
|
41
|
+
#
|
42
|
+
module DataLabelingService
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
helper_path = ::File.join __dir__, "data_labeling_service", "helpers.rb"
|
50
|
+
require "google/cloud/data_labeling/v1beta1/data_labeling_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,3294 @@
|
|
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
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/datalabeling/v1beta1/data_labeling_service_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module DataLabeling
|
25
|
+
module V1beta1
|
26
|
+
module DataLabelingService
|
27
|
+
##
|
28
|
+
# Client for the DataLabelingService service.
|
29
|
+
#
|
30
|
+
# Service for the AI Platform Data Labeling API.
|
31
|
+
#
|
32
|
+
class Client
|
33
|
+
include Paths
|
34
|
+
|
35
|
+
# @private
|
36
|
+
attr_reader :data_labeling_service_stub
|
37
|
+
|
38
|
+
##
|
39
|
+
# Configure the DataLabelingService Client class.
|
40
|
+
#
|
41
|
+
# See {::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client::Configuration}
|
42
|
+
# for a description of the configuration fields.
|
43
|
+
#
|
44
|
+
# ## Example
|
45
|
+
#
|
46
|
+
# To modify the configuration for all DataLabelingService clients:
|
47
|
+
#
|
48
|
+
# ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# @yield [config] Configure the Client client.
|
53
|
+
# @yieldparam config [Client::Configuration]
|
54
|
+
#
|
55
|
+
# @return [Client::Configuration]
|
56
|
+
#
|
57
|
+
def self.configure
|
58
|
+
@configure ||= begin
|
59
|
+
namespace = ["Google", "Cloud", "DataLabeling", "V1beta1"]
|
60
|
+
parent_config = while namespace.any?
|
61
|
+
parent_name = namespace.join "::"
|
62
|
+
parent_const = const_get parent_name
|
63
|
+
break parent_const.configure if parent_const&.respond_to? :configure
|
64
|
+
namespace.pop
|
65
|
+
end
|
66
|
+
default_config = Client::Configuration.new parent_config
|
67
|
+
|
68
|
+
default_config.rpcs.create_dataset.timeout = 30.0
|
69
|
+
|
70
|
+
default_config.rpcs.get_dataset.timeout = 30.0
|
71
|
+
default_config.rpcs.get_dataset.retry_policy = {
|
72
|
+
initial_delay: 0.1,
|
73
|
+
max_delay: 30.0,
|
74
|
+
multiplier: 1.3,
|
75
|
+
retry_codes: [4, 14]
|
76
|
+
}
|
77
|
+
|
78
|
+
default_config.rpcs.list_datasets.timeout = 30.0
|
79
|
+
default_config.rpcs.list_datasets.retry_policy = {
|
80
|
+
initial_delay: 0.1,
|
81
|
+
max_delay: 30.0,
|
82
|
+
multiplier: 1.3,
|
83
|
+
retry_codes: [4, 14]
|
84
|
+
}
|
85
|
+
|
86
|
+
default_config.rpcs.delete_dataset.timeout = 30.0
|
87
|
+
default_config.rpcs.delete_dataset.retry_policy = {
|
88
|
+
initial_delay: 0.1,
|
89
|
+
max_delay: 30.0,
|
90
|
+
multiplier: 1.3,
|
91
|
+
retry_codes: [4, 14]
|
92
|
+
}
|
93
|
+
|
94
|
+
default_config.rpcs.import_data.timeout = 30.0
|
95
|
+
|
96
|
+
default_config.rpcs.export_data.timeout = 30.0
|
97
|
+
default_config.rpcs.export_data.retry_policy = {
|
98
|
+
initial_delay: 0.1,
|
99
|
+
max_delay: 30.0,
|
100
|
+
multiplier: 1.3,
|
101
|
+
retry_codes: [4, 14]
|
102
|
+
}
|
103
|
+
|
104
|
+
default_config.rpcs.get_data_item.timeout = 30.0
|
105
|
+
default_config.rpcs.get_data_item.retry_policy = {
|
106
|
+
initial_delay: 0.1,
|
107
|
+
max_delay: 30.0,
|
108
|
+
multiplier: 1.3,
|
109
|
+
retry_codes: [4, 14]
|
110
|
+
}
|
111
|
+
|
112
|
+
default_config.rpcs.list_data_items.timeout = 30.0
|
113
|
+
default_config.rpcs.list_data_items.retry_policy = {
|
114
|
+
initial_delay: 0.1,
|
115
|
+
max_delay: 30.0,
|
116
|
+
multiplier: 1.3,
|
117
|
+
retry_codes: [4, 14]
|
118
|
+
}
|
119
|
+
|
120
|
+
default_config.rpcs.get_annotated_dataset.timeout = 30.0
|
121
|
+
default_config.rpcs.get_annotated_dataset.retry_policy = {
|
122
|
+
initial_delay: 0.1,
|
123
|
+
max_delay: 30.0,
|
124
|
+
multiplier: 1.3,
|
125
|
+
retry_codes: [4, 14]
|
126
|
+
}
|
127
|
+
|
128
|
+
default_config.rpcs.list_annotated_datasets.timeout = 30.0
|
129
|
+
default_config.rpcs.list_annotated_datasets.retry_policy = {
|
130
|
+
initial_delay: 0.1,
|
131
|
+
max_delay: 30.0,
|
132
|
+
multiplier: 1.3,
|
133
|
+
retry_codes: [4, 14]
|
134
|
+
}
|
135
|
+
|
136
|
+
default_config.rpcs.label_image.timeout = 30.0
|
137
|
+
|
138
|
+
default_config.rpcs.label_video.timeout = 30.0
|
139
|
+
|
140
|
+
default_config.rpcs.label_text.timeout = 30.0
|
141
|
+
|
142
|
+
default_config.rpcs.get_example.timeout = 30.0
|
143
|
+
default_config.rpcs.get_example.retry_policy = {
|
144
|
+
initial_delay: 0.1,
|
145
|
+
max_delay: 30.0,
|
146
|
+
multiplier: 1.3,
|
147
|
+
retry_codes: [4, 14]
|
148
|
+
}
|
149
|
+
|
150
|
+
default_config.rpcs.list_examples.timeout = 30.0
|
151
|
+
default_config.rpcs.list_examples.retry_policy = {
|
152
|
+
initial_delay: 0.1,
|
153
|
+
max_delay: 30.0,
|
154
|
+
multiplier: 1.3,
|
155
|
+
retry_codes: [4, 14]
|
156
|
+
}
|
157
|
+
|
158
|
+
default_config.rpcs.create_annotation_spec_set.timeout = 30.0
|
159
|
+
|
160
|
+
default_config.rpcs.get_annotation_spec_set.timeout = 30.0
|
161
|
+
default_config.rpcs.get_annotation_spec_set.retry_policy = {
|
162
|
+
initial_delay: 0.1,
|
163
|
+
max_delay: 30.0,
|
164
|
+
multiplier: 1.3,
|
165
|
+
retry_codes: [4, 14]
|
166
|
+
}
|
167
|
+
|
168
|
+
default_config.rpcs.list_annotation_spec_sets.timeout = 30.0
|
169
|
+
default_config.rpcs.list_annotation_spec_sets.retry_policy = {
|
170
|
+
initial_delay: 0.1,
|
171
|
+
max_delay: 30.0,
|
172
|
+
multiplier: 1.3,
|
173
|
+
retry_codes: [4, 14]
|
174
|
+
}
|
175
|
+
|
176
|
+
default_config.rpcs.delete_annotation_spec_set.timeout = 30.0
|
177
|
+
default_config.rpcs.delete_annotation_spec_set.retry_policy = {
|
178
|
+
initial_delay: 0.1,
|
179
|
+
max_delay: 30.0,
|
180
|
+
multiplier: 1.3,
|
181
|
+
retry_codes: [4, 14]
|
182
|
+
}
|
183
|
+
|
184
|
+
default_config.rpcs.create_instruction.timeout = 30.0
|
185
|
+
|
186
|
+
default_config.rpcs.get_instruction.timeout = 30.0
|
187
|
+
default_config.rpcs.get_instruction.retry_policy = {
|
188
|
+
initial_delay: 0.1,
|
189
|
+
max_delay: 30.0,
|
190
|
+
multiplier: 1.3,
|
191
|
+
retry_codes: [4, 14]
|
192
|
+
}
|
193
|
+
|
194
|
+
default_config.rpcs.list_instructions.timeout = 30.0
|
195
|
+
default_config.rpcs.list_instructions.retry_policy = {
|
196
|
+
initial_delay: 0.1,
|
197
|
+
max_delay: 30.0,
|
198
|
+
multiplier: 1.3,
|
199
|
+
retry_codes: [4, 14]
|
200
|
+
}
|
201
|
+
|
202
|
+
default_config.rpcs.delete_instruction.timeout = 30.0
|
203
|
+
default_config.rpcs.delete_instruction.retry_policy = {
|
204
|
+
initial_delay: 0.1,
|
205
|
+
max_delay: 30.0,
|
206
|
+
multiplier: 1.3,
|
207
|
+
retry_codes: [4, 14]
|
208
|
+
}
|
209
|
+
|
210
|
+
default_config.rpcs.get_evaluation.timeout = 30.0
|
211
|
+
default_config.rpcs.get_evaluation.retry_policy = {
|
212
|
+
initial_delay: 0.1,
|
213
|
+
max_delay: 30.0,
|
214
|
+
multiplier: 1.3,
|
215
|
+
retry_codes: [4, 14]
|
216
|
+
}
|
217
|
+
|
218
|
+
default_config.rpcs.search_evaluations.timeout = 30.0
|
219
|
+
default_config.rpcs.search_evaluations.retry_policy = {
|
220
|
+
initial_delay: 0.1,
|
221
|
+
max_delay: 30.0,
|
222
|
+
multiplier: 1.3,
|
223
|
+
retry_codes: [4, 14]
|
224
|
+
}
|
225
|
+
|
226
|
+
default_config.rpcs.search_example_comparisons.timeout = 30.0
|
227
|
+
|
228
|
+
default_config.rpcs.create_evaluation_job.timeout = 30.0
|
229
|
+
|
230
|
+
default_config.rpcs.update_evaluation_job.timeout = 30.0
|
231
|
+
|
232
|
+
default_config.rpcs.get_evaluation_job.timeout = 30.0
|
233
|
+
default_config.rpcs.get_evaluation_job.retry_policy = {
|
234
|
+
initial_delay: 0.1,
|
235
|
+
max_delay: 30.0,
|
236
|
+
multiplier: 1.3,
|
237
|
+
retry_codes: [4, 14]
|
238
|
+
}
|
239
|
+
|
240
|
+
default_config.rpcs.pause_evaluation_job.timeout = 30.0
|
241
|
+
|
242
|
+
default_config.rpcs.resume_evaluation_job.timeout = 30.0
|
243
|
+
|
244
|
+
default_config.rpcs.delete_evaluation_job.timeout = 30.0
|
245
|
+
default_config.rpcs.delete_evaluation_job.retry_policy = {
|
246
|
+
initial_delay: 0.1,
|
247
|
+
max_delay: 30.0,
|
248
|
+
multiplier: 1.3,
|
249
|
+
retry_codes: [4, 14]
|
250
|
+
}
|
251
|
+
|
252
|
+
default_config.rpcs.list_evaluation_jobs.timeout = 30.0
|
253
|
+
default_config.rpcs.list_evaluation_jobs.retry_policy = {
|
254
|
+
initial_delay: 0.1,
|
255
|
+
max_delay: 30.0,
|
256
|
+
multiplier: 1.3,
|
257
|
+
retry_codes: [4, 14]
|
258
|
+
}
|
259
|
+
|
260
|
+
default_config
|
261
|
+
end
|
262
|
+
yield @configure if block_given?
|
263
|
+
@configure
|
264
|
+
end
|
265
|
+
|
266
|
+
##
|
267
|
+
# Configure the DataLabelingService Client instance.
|
268
|
+
#
|
269
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
270
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
271
|
+
# should be made on {Client.configure}.
|
272
|
+
#
|
273
|
+
# See {::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client::Configuration}
|
274
|
+
# for a description of the configuration fields.
|
275
|
+
#
|
276
|
+
# @yield [config] Configure the Client client.
|
277
|
+
# @yieldparam config [Client::Configuration]
|
278
|
+
#
|
279
|
+
# @return [Client::Configuration]
|
280
|
+
#
|
281
|
+
def configure
|
282
|
+
yield @config if block_given?
|
283
|
+
@config
|
284
|
+
end
|
285
|
+
|
286
|
+
##
|
287
|
+
# Create a new DataLabelingService client object.
|
288
|
+
#
|
289
|
+
# ## Examples
|
290
|
+
#
|
291
|
+
# To create a new DataLabelingService client with the default
|
292
|
+
# configuration:
|
293
|
+
#
|
294
|
+
# client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
|
295
|
+
#
|
296
|
+
# To create a new DataLabelingService client with a custom
|
297
|
+
# configuration:
|
298
|
+
#
|
299
|
+
# client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new do |config|
|
300
|
+
# config.timeout = 10.0
|
301
|
+
# end
|
302
|
+
#
|
303
|
+
# @yield [config] Configure the DataLabelingService client.
|
304
|
+
# @yieldparam config [Client::Configuration]
|
305
|
+
#
|
306
|
+
def initialize
|
307
|
+
# These require statements are intentionally placed here to initialize
|
308
|
+
# the gRPC module only when it's required.
|
309
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
310
|
+
require "gapic/grpc"
|
311
|
+
require "google/cloud/datalabeling/v1beta1/data_labeling_service_services_pb"
|
312
|
+
|
313
|
+
# Create the configuration object
|
314
|
+
@config = Configuration.new Client.configure
|
315
|
+
|
316
|
+
# Yield the configuration if needed
|
317
|
+
yield @config if block_given?
|
318
|
+
|
319
|
+
# Create credentials
|
320
|
+
credentials = @config.credentials
|
321
|
+
credentials ||= Credentials.default scope: @config.scope
|
322
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
323
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
324
|
+
end
|
325
|
+
@quota_project_id = @config.quota_project
|
326
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
327
|
+
|
328
|
+
@operations_client = Operations.new do |config|
|
329
|
+
config.credentials = credentials
|
330
|
+
config.endpoint = @config.endpoint
|
331
|
+
end
|
332
|
+
|
333
|
+
@data_labeling_service_stub = ::Gapic::ServiceStub.new(
|
334
|
+
::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Stub,
|
335
|
+
credentials: credentials,
|
336
|
+
endpoint: @config.endpoint,
|
337
|
+
channel_args: @config.channel_args,
|
338
|
+
interceptors: @config.interceptors
|
339
|
+
)
|
340
|
+
end
|
341
|
+
|
342
|
+
##
|
343
|
+
# Get the associated client for long-running operations.
|
344
|
+
#
|
345
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Operations]
|
346
|
+
#
|
347
|
+
attr_reader :operations_client
|
348
|
+
|
349
|
+
# Service calls
|
350
|
+
|
351
|
+
##
|
352
|
+
# Creates dataset. If success return a Dataset resource.
|
353
|
+
#
|
354
|
+
# @overload create_dataset(request, options = nil)
|
355
|
+
# Pass arguments to `create_dataset` via a request object, either of type
|
356
|
+
# {::Google::Cloud::DataLabeling::V1beta1::CreateDatasetRequest} or an equivalent Hash.
|
357
|
+
#
|
358
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::CreateDatasetRequest, ::Hash]
|
359
|
+
# A request object representing the call parameters. Required. To specify no
|
360
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
361
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
362
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
363
|
+
#
|
364
|
+
# @overload create_dataset(parent: nil, dataset: nil)
|
365
|
+
# Pass arguments to `create_dataset` via keyword arguments. Note that at
|
366
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
367
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
368
|
+
#
|
369
|
+
# @param parent [::String]
|
370
|
+
# Required. Dataset resource parent, format:
|
371
|
+
# projects/\\{project_id}
|
372
|
+
# @param dataset [::Google::Cloud::DataLabeling::V1beta1::Dataset, ::Hash]
|
373
|
+
# Required. The dataset to be created.
|
374
|
+
#
|
375
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
376
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::Dataset]
|
377
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
378
|
+
#
|
379
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::Dataset]
|
380
|
+
#
|
381
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
382
|
+
#
|
383
|
+
def create_dataset request, options = nil
|
384
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
385
|
+
|
386
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::CreateDatasetRequest
|
387
|
+
|
388
|
+
# Converts hash and nil to an options object
|
389
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
390
|
+
|
391
|
+
# Customize the options with defaults
|
392
|
+
metadata = @config.rpcs.create_dataset.metadata.to_h
|
393
|
+
|
394
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
395
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
396
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
397
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
398
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
399
|
+
|
400
|
+
header_params = {
|
401
|
+
"parent" => request.parent
|
402
|
+
}
|
403
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
404
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
405
|
+
|
406
|
+
options.apply_defaults timeout: @config.rpcs.create_dataset.timeout,
|
407
|
+
metadata: metadata,
|
408
|
+
retry_policy: @config.rpcs.create_dataset.retry_policy
|
409
|
+
options.apply_defaults metadata: @config.metadata,
|
410
|
+
retry_policy: @config.retry_policy
|
411
|
+
|
412
|
+
@data_labeling_service_stub.call_rpc :create_dataset, request, options: options do |response, operation|
|
413
|
+
yield response, operation if block_given?
|
414
|
+
return response
|
415
|
+
end
|
416
|
+
rescue ::GRPC::BadStatus => e
|
417
|
+
raise ::Google::Cloud::Error.from_error(e)
|
418
|
+
end
|
419
|
+
|
420
|
+
##
|
421
|
+
# Gets dataset by resource name.
|
422
|
+
#
|
423
|
+
# @overload get_dataset(request, options = nil)
|
424
|
+
# Pass arguments to `get_dataset` via a request object, either of type
|
425
|
+
# {::Google::Cloud::DataLabeling::V1beta1::GetDatasetRequest} or an equivalent Hash.
|
426
|
+
#
|
427
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::GetDatasetRequest, ::Hash]
|
428
|
+
# A request object representing the call parameters. Required. To specify no
|
429
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
430
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
431
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
432
|
+
#
|
433
|
+
# @overload get_dataset(name: nil)
|
434
|
+
# Pass arguments to `get_dataset` via keyword arguments. Note that at
|
435
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
436
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
437
|
+
#
|
438
|
+
# @param name [::String]
|
439
|
+
# Required. Dataset resource name, format:
|
440
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}
|
441
|
+
#
|
442
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
443
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::Dataset]
|
444
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
445
|
+
#
|
446
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::Dataset]
|
447
|
+
#
|
448
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
449
|
+
#
|
450
|
+
def get_dataset request, options = nil
|
451
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
452
|
+
|
453
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetDatasetRequest
|
454
|
+
|
455
|
+
# Converts hash and nil to an options object
|
456
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
457
|
+
|
458
|
+
# Customize the options with defaults
|
459
|
+
metadata = @config.rpcs.get_dataset.metadata.to_h
|
460
|
+
|
461
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
462
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
463
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
464
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
465
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
466
|
+
|
467
|
+
header_params = {
|
468
|
+
"name" => request.name
|
469
|
+
}
|
470
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
471
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
472
|
+
|
473
|
+
options.apply_defaults timeout: @config.rpcs.get_dataset.timeout,
|
474
|
+
metadata: metadata,
|
475
|
+
retry_policy: @config.rpcs.get_dataset.retry_policy
|
476
|
+
options.apply_defaults metadata: @config.metadata,
|
477
|
+
retry_policy: @config.retry_policy
|
478
|
+
|
479
|
+
@data_labeling_service_stub.call_rpc :get_dataset, request, options: options do |response, operation|
|
480
|
+
yield response, operation if block_given?
|
481
|
+
return response
|
482
|
+
end
|
483
|
+
rescue ::GRPC::BadStatus => e
|
484
|
+
raise ::Google::Cloud::Error.from_error(e)
|
485
|
+
end
|
486
|
+
|
487
|
+
##
|
488
|
+
# Lists datasets under a project. Pagination is supported.
|
489
|
+
#
|
490
|
+
# @overload list_datasets(request, options = nil)
|
491
|
+
# Pass arguments to `list_datasets` via a request object, either of type
|
492
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListDatasetsRequest} or an equivalent Hash.
|
493
|
+
#
|
494
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::ListDatasetsRequest, ::Hash]
|
495
|
+
# A request object representing the call parameters. Required. To specify no
|
496
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
497
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
498
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
499
|
+
#
|
500
|
+
# @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
501
|
+
# Pass arguments to `list_datasets` via keyword arguments. Note that at
|
502
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
503
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
504
|
+
#
|
505
|
+
# @param parent [::String]
|
506
|
+
# Required. Dataset resource parent, format:
|
507
|
+
# projects/\\{project_id}
|
508
|
+
# @param filter [::String]
|
509
|
+
# Optional. Filter on dataset is not supported at this moment.
|
510
|
+
# @param page_size [::Integer]
|
511
|
+
# Optional. Requested page size. Server may return fewer results than
|
512
|
+
# requested. Default value is 100.
|
513
|
+
# @param page_token [::String]
|
514
|
+
# Optional. A token identifying a page of results for the server to return.
|
515
|
+
# Typically obtained by
|
516
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous
|
517
|
+
# [DataLabelingService.ListDatasets] call.
|
518
|
+
# Returns the first page if empty.
|
519
|
+
#
|
520
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
521
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>]
|
522
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
523
|
+
#
|
524
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>]
|
525
|
+
#
|
526
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
527
|
+
#
|
528
|
+
def list_datasets request, options = nil
|
529
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
530
|
+
|
531
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListDatasetsRequest
|
532
|
+
|
533
|
+
# Converts hash and nil to an options object
|
534
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
535
|
+
|
536
|
+
# Customize the options with defaults
|
537
|
+
metadata = @config.rpcs.list_datasets.metadata.to_h
|
538
|
+
|
539
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
540
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
541
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
542
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
543
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
544
|
+
|
545
|
+
header_params = {
|
546
|
+
"parent" => request.parent
|
547
|
+
}
|
548
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
549
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
550
|
+
|
551
|
+
options.apply_defaults timeout: @config.rpcs.list_datasets.timeout,
|
552
|
+
metadata: metadata,
|
553
|
+
retry_policy: @config.rpcs.list_datasets.retry_policy
|
554
|
+
options.apply_defaults metadata: @config.metadata,
|
555
|
+
retry_policy: @config.retry_policy
|
556
|
+
|
557
|
+
@data_labeling_service_stub.call_rpc :list_datasets, request, options: options do |response, operation|
|
558
|
+
response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_datasets, request, response, operation, options
|
559
|
+
yield response, operation if block_given?
|
560
|
+
return response
|
561
|
+
end
|
562
|
+
rescue ::GRPC::BadStatus => e
|
563
|
+
raise ::Google::Cloud::Error.from_error(e)
|
564
|
+
end
|
565
|
+
|
566
|
+
##
|
567
|
+
# Deletes a dataset by resource name.
|
568
|
+
#
|
569
|
+
# @overload delete_dataset(request, options = nil)
|
570
|
+
# Pass arguments to `delete_dataset` via a request object, either of type
|
571
|
+
# {::Google::Cloud::DataLabeling::V1beta1::DeleteDatasetRequest} or an equivalent Hash.
|
572
|
+
#
|
573
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::DeleteDatasetRequest, ::Hash]
|
574
|
+
# A request object representing the call parameters. Required. To specify no
|
575
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
576
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
577
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
578
|
+
#
|
579
|
+
# @overload delete_dataset(name: nil)
|
580
|
+
# Pass arguments to `delete_dataset` via keyword arguments. Note that at
|
581
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
582
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
583
|
+
#
|
584
|
+
# @param name [::String]
|
585
|
+
# Required. Dataset resource name, format:
|
586
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}
|
587
|
+
#
|
588
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
589
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
590
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
591
|
+
#
|
592
|
+
# @return [::Google::Protobuf::Empty]
|
593
|
+
#
|
594
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
595
|
+
#
|
596
|
+
def delete_dataset request, options = nil
|
597
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
598
|
+
|
599
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::DeleteDatasetRequest
|
600
|
+
|
601
|
+
# Converts hash and nil to an options object
|
602
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
603
|
+
|
604
|
+
# Customize the options with defaults
|
605
|
+
metadata = @config.rpcs.delete_dataset.metadata.to_h
|
606
|
+
|
607
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
608
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
609
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
610
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
611
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
612
|
+
|
613
|
+
header_params = {
|
614
|
+
"name" => request.name
|
615
|
+
}
|
616
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
617
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
618
|
+
|
619
|
+
options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout,
|
620
|
+
metadata: metadata,
|
621
|
+
retry_policy: @config.rpcs.delete_dataset.retry_policy
|
622
|
+
options.apply_defaults metadata: @config.metadata,
|
623
|
+
retry_policy: @config.retry_policy
|
624
|
+
|
625
|
+
@data_labeling_service_stub.call_rpc :delete_dataset, request, options: options do |response, operation|
|
626
|
+
yield response, operation if block_given?
|
627
|
+
return response
|
628
|
+
end
|
629
|
+
rescue ::GRPC::BadStatus => e
|
630
|
+
raise ::Google::Cloud::Error.from_error(e)
|
631
|
+
end
|
632
|
+
|
633
|
+
##
|
634
|
+
# Imports data into dataset based on source locations defined in request.
|
635
|
+
# It can be called multiple times for the same dataset. Each dataset can
|
636
|
+
# only have one long running operation running on it. For example, no
|
637
|
+
# labeling task (also long running operation) can be started while
|
638
|
+
# importing is still ongoing. Vice versa.
|
639
|
+
#
|
640
|
+
# @overload import_data(request, options = nil)
|
641
|
+
# Pass arguments to `import_data` via a request object, either of type
|
642
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ImportDataRequest} or an equivalent Hash.
|
643
|
+
#
|
644
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::ImportDataRequest, ::Hash]
|
645
|
+
# A request object representing the call parameters. Required. To specify no
|
646
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
647
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
648
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
649
|
+
#
|
650
|
+
# @overload import_data(name: nil, input_config: nil, user_email_address: nil)
|
651
|
+
# Pass arguments to `import_data` via keyword arguments. Note that at
|
652
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
653
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
654
|
+
#
|
655
|
+
# @param name [::String]
|
656
|
+
# Required. Dataset resource name, format:
|
657
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}
|
658
|
+
# @param input_config [::Google::Cloud::DataLabeling::V1beta1::InputConfig, ::Hash]
|
659
|
+
# Required. Specify the input source of the data.
|
660
|
+
# @param user_email_address [::String]
|
661
|
+
# Email of the user who started the import task and should be notified by
|
662
|
+
# email. If empty no notification will be sent.
|
663
|
+
#
|
664
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
665
|
+
# @yieldparam response [::Gapic::Operation]
|
666
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
667
|
+
#
|
668
|
+
# @return [::Gapic::Operation]
|
669
|
+
#
|
670
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
671
|
+
#
|
672
|
+
def import_data request, options = nil
|
673
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
674
|
+
|
675
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ImportDataRequest
|
676
|
+
|
677
|
+
# Converts hash and nil to an options object
|
678
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
679
|
+
|
680
|
+
# Customize the options with defaults
|
681
|
+
metadata = @config.rpcs.import_data.metadata.to_h
|
682
|
+
|
683
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
684
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
685
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
686
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
687
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
688
|
+
|
689
|
+
header_params = {
|
690
|
+
"name" => request.name
|
691
|
+
}
|
692
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
693
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
694
|
+
|
695
|
+
options.apply_defaults timeout: @config.rpcs.import_data.timeout,
|
696
|
+
metadata: metadata,
|
697
|
+
retry_policy: @config.rpcs.import_data.retry_policy
|
698
|
+
options.apply_defaults metadata: @config.metadata,
|
699
|
+
retry_policy: @config.retry_policy
|
700
|
+
|
701
|
+
@data_labeling_service_stub.call_rpc :import_data, request, options: options do |response, operation|
|
702
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
703
|
+
yield response, operation if block_given?
|
704
|
+
return response
|
705
|
+
end
|
706
|
+
rescue ::GRPC::BadStatus => e
|
707
|
+
raise ::Google::Cloud::Error.from_error(e)
|
708
|
+
end
|
709
|
+
|
710
|
+
##
|
711
|
+
# Exports data and annotations from dataset.
|
712
|
+
#
|
713
|
+
# @overload export_data(request, options = nil)
|
714
|
+
# Pass arguments to `export_data` via a request object, either of type
|
715
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ExportDataRequest} or an equivalent Hash.
|
716
|
+
#
|
717
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::ExportDataRequest, ::Hash]
|
718
|
+
# A request object representing the call parameters. Required. To specify no
|
719
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
720
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
721
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
722
|
+
#
|
723
|
+
# @overload export_data(name: nil, annotated_dataset: nil, filter: nil, output_config: nil, user_email_address: nil)
|
724
|
+
# Pass arguments to `export_data` via keyword arguments. Note that at
|
725
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
726
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
727
|
+
#
|
728
|
+
# @param name [::String]
|
729
|
+
# Required. Dataset resource name, format:
|
730
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}
|
731
|
+
# @param annotated_dataset [::String]
|
732
|
+
# Required. Annotated dataset resource name. DataItem in
|
733
|
+
# Dataset and their annotations in specified annotated dataset will be
|
734
|
+
# exported. It's in format of
|
735
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}/annotatedDatasets/
|
736
|
+
# \\{annotated_dataset_id}
|
737
|
+
# @param filter [::String]
|
738
|
+
# Optional. Filter is not supported at this moment.
|
739
|
+
# @param output_config [::Google::Cloud::DataLabeling::V1beta1::OutputConfig, ::Hash]
|
740
|
+
# Required. Specify the output destination.
|
741
|
+
# @param user_email_address [::String]
|
742
|
+
# Email of the user who started the export task and should be notified by
|
743
|
+
# email. If empty no notification will be sent.
|
744
|
+
#
|
745
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
746
|
+
# @yieldparam response [::Gapic::Operation]
|
747
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
748
|
+
#
|
749
|
+
# @return [::Gapic::Operation]
|
750
|
+
#
|
751
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
752
|
+
#
|
753
|
+
def export_data request, options = nil
|
754
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
755
|
+
|
756
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ExportDataRequest
|
757
|
+
|
758
|
+
# Converts hash and nil to an options object
|
759
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
760
|
+
|
761
|
+
# Customize the options with defaults
|
762
|
+
metadata = @config.rpcs.export_data.metadata.to_h
|
763
|
+
|
764
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
765
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
766
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
767
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
768
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
769
|
+
|
770
|
+
header_params = {
|
771
|
+
"name" => request.name
|
772
|
+
}
|
773
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
774
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
775
|
+
|
776
|
+
options.apply_defaults timeout: @config.rpcs.export_data.timeout,
|
777
|
+
metadata: metadata,
|
778
|
+
retry_policy: @config.rpcs.export_data.retry_policy
|
779
|
+
options.apply_defaults metadata: @config.metadata,
|
780
|
+
retry_policy: @config.retry_policy
|
781
|
+
|
782
|
+
@data_labeling_service_stub.call_rpc :export_data, request, options: options do |response, operation|
|
783
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
784
|
+
yield response, operation if block_given?
|
785
|
+
return response
|
786
|
+
end
|
787
|
+
rescue ::GRPC::BadStatus => e
|
788
|
+
raise ::Google::Cloud::Error.from_error(e)
|
789
|
+
end
|
790
|
+
|
791
|
+
##
|
792
|
+
# Gets a data item in a dataset by resource name. This API can be
|
793
|
+
# called after data are imported into dataset.
|
794
|
+
#
|
795
|
+
# @overload get_data_item(request, options = nil)
|
796
|
+
# Pass arguments to `get_data_item` via a request object, either of type
|
797
|
+
# {::Google::Cloud::DataLabeling::V1beta1::GetDataItemRequest} or an equivalent Hash.
|
798
|
+
#
|
799
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::GetDataItemRequest, ::Hash]
|
800
|
+
# A request object representing the call parameters. Required. To specify no
|
801
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
802
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
803
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
804
|
+
#
|
805
|
+
# @overload get_data_item(name: nil)
|
806
|
+
# Pass arguments to `get_data_item` via keyword arguments. Note that at
|
807
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
808
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
809
|
+
#
|
810
|
+
# @param name [::String]
|
811
|
+
# Required. The name of the data item to get, format:
|
812
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}/dataItems/\\{data_item_id}
|
813
|
+
#
|
814
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
815
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::DataItem]
|
816
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
817
|
+
#
|
818
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::DataItem]
|
819
|
+
#
|
820
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
821
|
+
#
|
822
|
+
def get_data_item request, options = nil
|
823
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
824
|
+
|
825
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetDataItemRequest
|
826
|
+
|
827
|
+
# Converts hash and nil to an options object
|
828
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
829
|
+
|
830
|
+
# Customize the options with defaults
|
831
|
+
metadata = @config.rpcs.get_data_item.metadata.to_h
|
832
|
+
|
833
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
834
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
835
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
836
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
837
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
838
|
+
|
839
|
+
header_params = {
|
840
|
+
"name" => request.name
|
841
|
+
}
|
842
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
843
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
844
|
+
|
845
|
+
options.apply_defaults timeout: @config.rpcs.get_data_item.timeout,
|
846
|
+
metadata: metadata,
|
847
|
+
retry_policy: @config.rpcs.get_data_item.retry_policy
|
848
|
+
options.apply_defaults metadata: @config.metadata,
|
849
|
+
retry_policy: @config.retry_policy
|
850
|
+
|
851
|
+
@data_labeling_service_stub.call_rpc :get_data_item, request, options: options do |response, operation|
|
852
|
+
yield response, operation if block_given?
|
853
|
+
return response
|
854
|
+
end
|
855
|
+
rescue ::GRPC::BadStatus => e
|
856
|
+
raise ::Google::Cloud::Error.from_error(e)
|
857
|
+
end
|
858
|
+
|
859
|
+
##
|
860
|
+
# Lists data items in a dataset. This API can be called after data
|
861
|
+
# are imported into dataset. Pagination is supported.
|
862
|
+
#
|
863
|
+
# @overload list_data_items(request, options = nil)
|
864
|
+
# Pass arguments to `list_data_items` via a request object, either of type
|
865
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListDataItemsRequest} or an equivalent Hash.
|
866
|
+
#
|
867
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::ListDataItemsRequest, ::Hash]
|
868
|
+
# A request object representing the call parameters. Required. To specify no
|
869
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
870
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
871
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
872
|
+
#
|
873
|
+
# @overload list_data_items(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
874
|
+
# Pass arguments to `list_data_items` via keyword arguments. Note that at
|
875
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
876
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
877
|
+
#
|
878
|
+
# @param parent [::String]
|
879
|
+
# Required. Name of the dataset to list data items, format:
|
880
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}
|
881
|
+
# @param filter [::String]
|
882
|
+
# Optional. Filter is not supported at this moment.
|
883
|
+
# @param page_size [::Integer]
|
884
|
+
# Optional. Requested page size. Server may return fewer results than
|
885
|
+
# requested. Default value is 100.
|
886
|
+
# @param page_token [::String]
|
887
|
+
# Optional. A token identifying a page of results for the server to return.
|
888
|
+
# Typically obtained by
|
889
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListDataItemsResponse#next_page_token ListDataItemsResponse.next_page_token} of the previous
|
890
|
+
# [DataLabelingService.ListDataItems] call.
|
891
|
+
# Return first page if empty.
|
892
|
+
#
|
893
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
894
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>]
|
895
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
896
|
+
#
|
897
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>]
|
898
|
+
#
|
899
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
900
|
+
#
|
901
|
+
def list_data_items request, options = nil
|
902
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
903
|
+
|
904
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListDataItemsRequest
|
905
|
+
|
906
|
+
# Converts hash and nil to an options object
|
907
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
908
|
+
|
909
|
+
# Customize the options with defaults
|
910
|
+
metadata = @config.rpcs.list_data_items.metadata.to_h
|
911
|
+
|
912
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
913
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
914
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
915
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
916
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
917
|
+
|
918
|
+
header_params = {
|
919
|
+
"parent" => request.parent
|
920
|
+
}
|
921
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
922
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
923
|
+
|
924
|
+
options.apply_defaults timeout: @config.rpcs.list_data_items.timeout,
|
925
|
+
metadata: metadata,
|
926
|
+
retry_policy: @config.rpcs.list_data_items.retry_policy
|
927
|
+
options.apply_defaults metadata: @config.metadata,
|
928
|
+
retry_policy: @config.retry_policy
|
929
|
+
|
930
|
+
@data_labeling_service_stub.call_rpc :list_data_items, request, options: options do |response, operation|
|
931
|
+
response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_data_items, request, response, operation, options
|
932
|
+
yield response, operation if block_given?
|
933
|
+
return response
|
934
|
+
end
|
935
|
+
rescue ::GRPC::BadStatus => e
|
936
|
+
raise ::Google::Cloud::Error.from_error(e)
|
937
|
+
end
|
938
|
+
|
939
|
+
##
|
940
|
+
# Gets an annotated dataset by resource name.
|
941
|
+
#
|
942
|
+
# @overload get_annotated_dataset(request, options = nil)
|
943
|
+
# Pass arguments to `get_annotated_dataset` via a request object, either of type
|
944
|
+
# {::Google::Cloud::DataLabeling::V1beta1::GetAnnotatedDatasetRequest} or an equivalent Hash.
|
945
|
+
#
|
946
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::GetAnnotatedDatasetRequest, ::Hash]
|
947
|
+
# A request object representing the call parameters. Required. To specify no
|
948
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
949
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
950
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
951
|
+
#
|
952
|
+
# @overload get_annotated_dataset(name: nil)
|
953
|
+
# Pass arguments to `get_annotated_dataset` via keyword arguments. Note that at
|
954
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
955
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
956
|
+
#
|
957
|
+
# @param name [::String]
|
958
|
+
# Required. Name of the annotated dataset to get, format:
|
959
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}/annotatedDatasets/
|
960
|
+
# \\{annotated_dataset_id}
|
961
|
+
#
|
962
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
963
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset]
|
964
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
965
|
+
#
|
966
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset]
|
967
|
+
#
|
968
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
969
|
+
#
|
970
|
+
def get_annotated_dataset request, options = nil
|
971
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
972
|
+
|
973
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetAnnotatedDatasetRequest
|
974
|
+
|
975
|
+
# Converts hash and nil to an options object
|
976
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
977
|
+
|
978
|
+
# Customize the options with defaults
|
979
|
+
metadata = @config.rpcs.get_annotated_dataset.metadata.to_h
|
980
|
+
|
981
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
982
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
983
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
984
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
985
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
986
|
+
|
987
|
+
header_params = {
|
988
|
+
"name" => request.name
|
989
|
+
}
|
990
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
991
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
992
|
+
|
993
|
+
options.apply_defaults timeout: @config.rpcs.get_annotated_dataset.timeout,
|
994
|
+
metadata: metadata,
|
995
|
+
retry_policy: @config.rpcs.get_annotated_dataset.retry_policy
|
996
|
+
options.apply_defaults metadata: @config.metadata,
|
997
|
+
retry_policy: @config.retry_policy
|
998
|
+
|
999
|
+
@data_labeling_service_stub.call_rpc :get_annotated_dataset, request, options: options do |response, operation|
|
1000
|
+
yield response, operation if block_given?
|
1001
|
+
return response
|
1002
|
+
end
|
1003
|
+
rescue ::GRPC::BadStatus => e
|
1004
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1005
|
+
end
|
1006
|
+
|
1007
|
+
##
|
1008
|
+
# Lists annotated datasets for a dataset. Pagination is supported.
|
1009
|
+
#
|
1010
|
+
# @overload list_annotated_datasets(request, options = nil)
|
1011
|
+
# Pass arguments to `list_annotated_datasets` via a request object, either of type
|
1012
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListAnnotatedDatasetsRequest} or an equivalent Hash.
|
1013
|
+
#
|
1014
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::ListAnnotatedDatasetsRequest, ::Hash]
|
1015
|
+
# A request object representing the call parameters. Required. To specify no
|
1016
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1017
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1018
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1019
|
+
#
|
1020
|
+
# @overload list_annotated_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
1021
|
+
# Pass arguments to `list_annotated_datasets` via keyword arguments. Note that at
|
1022
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1023
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1024
|
+
#
|
1025
|
+
# @param parent [::String]
|
1026
|
+
# Required. Name of the dataset to list annotated datasets, format:
|
1027
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}
|
1028
|
+
# @param filter [::String]
|
1029
|
+
# Optional. Filter is not supported at this moment.
|
1030
|
+
# @param page_size [::Integer]
|
1031
|
+
# Optional. Requested page size. Server may return fewer results than
|
1032
|
+
# requested. Default value is 100.
|
1033
|
+
# @param page_token [::String]
|
1034
|
+
# Optional. A token identifying a page of results for the server to return.
|
1035
|
+
# Typically obtained by
|
1036
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListAnnotatedDatasetsResponse#next_page_token ListAnnotatedDatasetsResponse.next_page_token} of the previous
|
1037
|
+
# [DataLabelingService.ListAnnotatedDatasets] call.
|
1038
|
+
# Return first page if empty.
|
1039
|
+
#
|
1040
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1041
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>]
|
1042
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1043
|
+
#
|
1044
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>]
|
1045
|
+
#
|
1046
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1047
|
+
#
|
1048
|
+
def list_annotated_datasets request, options = nil
|
1049
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1050
|
+
|
1051
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListAnnotatedDatasetsRequest
|
1052
|
+
|
1053
|
+
# Converts hash and nil to an options object
|
1054
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1055
|
+
|
1056
|
+
# Customize the options with defaults
|
1057
|
+
metadata = @config.rpcs.list_annotated_datasets.metadata.to_h
|
1058
|
+
|
1059
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1060
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1061
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1062
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1063
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1064
|
+
|
1065
|
+
header_params = {
|
1066
|
+
"parent" => request.parent
|
1067
|
+
}
|
1068
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1069
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1070
|
+
|
1071
|
+
options.apply_defaults timeout: @config.rpcs.list_annotated_datasets.timeout,
|
1072
|
+
metadata: metadata,
|
1073
|
+
retry_policy: @config.rpcs.list_annotated_datasets.retry_policy
|
1074
|
+
options.apply_defaults metadata: @config.metadata,
|
1075
|
+
retry_policy: @config.retry_policy
|
1076
|
+
|
1077
|
+
@data_labeling_service_stub.call_rpc :list_annotated_datasets, request, options: options do |response, operation|
|
1078
|
+
response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_annotated_datasets, request, response, operation, options
|
1079
|
+
yield response, operation if block_given?
|
1080
|
+
return response
|
1081
|
+
end
|
1082
|
+
rescue ::GRPC::BadStatus => e
|
1083
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1084
|
+
end
|
1085
|
+
|
1086
|
+
##
|
1087
|
+
# Deletes an annotated dataset by resource name.
|
1088
|
+
#
|
1089
|
+
# @overload delete_annotated_dataset(request, options = nil)
|
1090
|
+
# Pass arguments to `delete_annotated_dataset` via a request object, either of type
|
1091
|
+
# {::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest} or an equivalent Hash.
|
1092
|
+
#
|
1093
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest, ::Hash]
|
1094
|
+
# A request object representing the call parameters. Required. To specify no
|
1095
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1096
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1097
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1098
|
+
#
|
1099
|
+
# @overload delete_annotated_dataset(name: nil)
|
1100
|
+
# Pass arguments to `delete_annotated_dataset` via keyword arguments. Note that at
|
1101
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1102
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1103
|
+
#
|
1104
|
+
# @param name [::String]
|
1105
|
+
# Required. Name of the annotated dataset to delete, format:
|
1106
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}/annotatedDatasets/
|
1107
|
+
# \\{annotated_dataset_id}
|
1108
|
+
#
|
1109
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1110
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1111
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1112
|
+
#
|
1113
|
+
# @return [::Google::Protobuf::Empty]
|
1114
|
+
#
|
1115
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1116
|
+
#
|
1117
|
+
def delete_annotated_dataset request, options = nil
|
1118
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1119
|
+
|
1120
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest
|
1121
|
+
|
1122
|
+
# Converts hash and nil to an options object
|
1123
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1124
|
+
|
1125
|
+
# Customize the options with defaults
|
1126
|
+
metadata = @config.rpcs.delete_annotated_dataset.metadata.to_h
|
1127
|
+
|
1128
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1129
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1130
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1131
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1132
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1133
|
+
|
1134
|
+
header_params = {
|
1135
|
+
"name" => request.name
|
1136
|
+
}
|
1137
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1138
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1139
|
+
|
1140
|
+
options.apply_defaults timeout: @config.rpcs.delete_annotated_dataset.timeout,
|
1141
|
+
metadata: metadata,
|
1142
|
+
retry_policy: @config.rpcs.delete_annotated_dataset.retry_policy
|
1143
|
+
options.apply_defaults metadata: @config.metadata,
|
1144
|
+
retry_policy: @config.retry_policy
|
1145
|
+
|
1146
|
+
@data_labeling_service_stub.call_rpc :delete_annotated_dataset, request, options: options do |response, operation|
|
1147
|
+
yield response, operation if block_given?
|
1148
|
+
return response
|
1149
|
+
end
|
1150
|
+
rescue ::GRPC::BadStatus => e
|
1151
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
##
|
1155
|
+
# Starts a labeling task for image. The type of image labeling task is
|
1156
|
+
# configured by feature in the request.
|
1157
|
+
#
|
1158
|
+
# @overload label_image(request, options = nil)
|
1159
|
+
# Pass arguments to `label_image` via a request object, either of type
|
1160
|
+
# {::Google::Cloud::DataLabeling::V1beta1::LabelImageRequest} or an equivalent Hash.
|
1161
|
+
#
|
1162
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::LabelImageRequest, ::Hash]
|
1163
|
+
# A request object representing the call parameters. Required. To specify no
|
1164
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1165
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1166
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1167
|
+
#
|
1168
|
+
# @overload label_image(image_classification_config: nil, bounding_poly_config: nil, polyline_config: nil, segmentation_config: nil, parent: nil, basic_config: nil, feature: nil)
|
1169
|
+
# Pass arguments to `label_image` via keyword arguments. Note that at
|
1170
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1171
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1172
|
+
#
|
1173
|
+
# @param image_classification_config [::Google::Cloud::DataLabeling::V1beta1::ImageClassificationConfig, ::Hash]
|
1174
|
+
# Configuration for image classification task.
|
1175
|
+
# One of image_classification_config, bounding_poly_config,
|
1176
|
+
# polyline_config and segmentation_config are required.
|
1177
|
+
# @param bounding_poly_config [::Google::Cloud::DataLabeling::V1beta1::BoundingPolyConfig, ::Hash]
|
1178
|
+
# Configuration for bounding box and bounding poly task.
|
1179
|
+
# One of image_classification_config, bounding_poly_config,
|
1180
|
+
# polyline_config and segmentation_config are required.
|
1181
|
+
# @param polyline_config [::Google::Cloud::DataLabeling::V1beta1::PolylineConfig, ::Hash]
|
1182
|
+
# Configuration for polyline task.
|
1183
|
+
# One of image_classification_config, bounding_poly_config,
|
1184
|
+
# polyline_config and segmentation_config are required.
|
1185
|
+
# @param segmentation_config [::Google::Cloud::DataLabeling::V1beta1::SegmentationConfig, ::Hash]
|
1186
|
+
# Configuration for segmentation task.
|
1187
|
+
# One of image_classification_config, bounding_poly_config,
|
1188
|
+
# polyline_config and segmentation_config are required.
|
1189
|
+
# @param parent [::String]
|
1190
|
+
# Required. Name of the dataset to request labeling task, format:
|
1191
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}
|
1192
|
+
# @param basic_config [::Google::Cloud::DataLabeling::V1beta1::HumanAnnotationConfig, ::Hash]
|
1193
|
+
# Required. Basic human annotation config.
|
1194
|
+
# @param feature [::Google::Cloud::DataLabeling::V1beta1::LabelImageRequest::Feature]
|
1195
|
+
# Required. The type of image labeling task.
|
1196
|
+
#
|
1197
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1198
|
+
# @yieldparam response [::Gapic::Operation]
|
1199
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1200
|
+
#
|
1201
|
+
# @return [::Gapic::Operation]
|
1202
|
+
#
|
1203
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1204
|
+
#
|
1205
|
+
def label_image request, options = nil
|
1206
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1207
|
+
|
1208
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::LabelImageRequest
|
1209
|
+
|
1210
|
+
# Converts hash and nil to an options object
|
1211
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1212
|
+
|
1213
|
+
# Customize the options with defaults
|
1214
|
+
metadata = @config.rpcs.label_image.metadata.to_h
|
1215
|
+
|
1216
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1217
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1218
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1219
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1220
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1221
|
+
|
1222
|
+
header_params = {
|
1223
|
+
"parent" => request.parent
|
1224
|
+
}
|
1225
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1226
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1227
|
+
|
1228
|
+
options.apply_defaults timeout: @config.rpcs.label_image.timeout,
|
1229
|
+
metadata: metadata,
|
1230
|
+
retry_policy: @config.rpcs.label_image.retry_policy
|
1231
|
+
options.apply_defaults metadata: @config.metadata,
|
1232
|
+
retry_policy: @config.retry_policy
|
1233
|
+
|
1234
|
+
@data_labeling_service_stub.call_rpc :label_image, request, options: options do |response, operation|
|
1235
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1236
|
+
yield response, operation if block_given?
|
1237
|
+
return response
|
1238
|
+
end
|
1239
|
+
rescue ::GRPC::BadStatus => e
|
1240
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
##
|
1244
|
+
# Starts a labeling task for video. The type of video labeling task is
|
1245
|
+
# configured by feature in the request.
|
1246
|
+
#
|
1247
|
+
# @overload label_video(request, options = nil)
|
1248
|
+
# Pass arguments to `label_video` via a request object, either of type
|
1249
|
+
# {::Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest} or an equivalent Hash.
|
1250
|
+
#
|
1251
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest, ::Hash]
|
1252
|
+
# A request object representing the call parameters. Required. To specify no
|
1253
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1254
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1255
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1256
|
+
#
|
1257
|
+
# @overload label_video(video_classification_config: nil, object_detection_config: nil, object_tracking_config: nil, event_config: nil, parent: nil, basic_config: nil, feature: nil)
|
1258
|
+
# Pass arguments to `label_video` via keyword arguments. Note that at
|
1259
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1260
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1261
|
+
#
|
1262
|
+
# @param video_classification_config [::Google::Cloud::DataLabeling::V1beta1::VideoClassificationConfig, ::Hash]
|
1263
|
+
# Configuration for video classification task.
|
1264
|
+
# One of video_classification_config, object_detection_config,
|
1265
|
+
# object_tracking_config and event_config is required.
|
1266
|
+
# @param object_detection_config [::Google::Cloud::DataLabeling::V1beta1::ObjectDetectionConfig, ::Hash]
|
1267
|
+
# Configuration for video object detection task.
|
1268
|
+
# One of video_classification_config, object_detection_config,
|
1269
|
+
# object_tracking_config and event_config is required.
|
1270
|
+
# @param object_tracking_config [::Google::Cloud::DataLabeling::V1beta1::ObjectTrackingConfig, ::Hash]
|
1271
|
+
# Configuration for video object tracking task.
|
1272
|
+
# One of video_classification_config, object_detection_config,
|
1273
|
+
# object_tracking_config and event_config is required.
|
1274
|
+
# @param event_config [::Google::Cloud::DataLabeling::V1beta1::EventConfig, ::Hash]
|
1275
|
+
# Configuration for video event task.
|
1276
|
+
# One of video_classification_config, object_detection_config,
|
1277
|
+
# object_tracking_config and event_config is required.
|
1278
|
+
# @param parent [::String]
|
1279
|
+
# Required. Name of the dataset to request labeling task, format:
|
1280
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}
|
1281
|
+
# @param basic_config [::Google::Cloud::DataLabeling::V1beta1::HumanAnnotationConfig, ::Hash]
|
1282
|
+
# Required. Basic human annotation config.
|
1283
|
+
# @param feature [::Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest::Feature]
|
1284
|
+
# Required. The type of video labeling task.
|
1285
|
+
#
|
1286
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1287
|
+
# @yieldparam response [::Gapic::Operation]
|
1288
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1289
|
+
#
|
1290
|
+
# @return [::Gapic::Operation]
|
1291
|
+
#
|
1292
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1293
|
+
#
|
1294
|
+
def label_video request, options = nil
|
1295
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1296
|
+
|
1297
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest
|
1298
|
+
|
1299
|
+
# Converts hash and nil to an options object
|
1300
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1301
|
+
|
1302
|
+
# Customize the options with defaults
|
1303
|
+
metadata = @config.rpcs.label_video.metadata.to_h
|
1304
|
+
|
1305
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1306
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1307
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1308
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1309
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1310
|
+
|
1311
|
+
header_params = {
|
1312
|
+
"parent" => request.parent
|
1313
|
+
}
|
1314
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1315
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1316
|
+
|
1317
|
+
options.apply_defaults timeout: @config.rpcs.label_video.timeout,
|
1318
|
+
metadata: metadata,
|
1319
|
+
retry_policy: @config.rpcs.label_video.retry_policy
|
1320
|
+
options.apply_defaults metadata: @config.metadata,
|
1321
|
+
retry_policy: @config.retry_policy
|
1322
|
+
|
1323
|
+
@data_labeling_service_stub.call_rpc :label_video, request, options: options do |response, operation|
|
1324
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1325
|
+
yield response, operation if block_given?
|
1326
|
+
return response
|
1327
|
+
end
|
1328
|
+
rescue ::GRPC::BadStatus => e
|
1329
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1330
|
+
end
|
1331
|
+
|
1332
|
+
##
|
1333
|
+
# Starts a labeling task for text. The type of text labeling task is
|
1334
|
+
# configured by feature in the request.
|
1335
|
+
#
|
1336
|
+
# @overload label_text(request, options = nil)
|
1337
|
+
# Pass arguments to `label_text` via a request object, either of type
|
1338
|
+
# {::Google::Cloud::DataLabeling::V1beta1::LabelTextRequest} or an equivalent Hash.
|
1339
|
+
#
|
1340
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::LabelTextRequest, ::Hash]
|
1341
|
+
# A request object representing the call parameters. Required. To specify no
|
1342
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1343
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1344
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1345
|
+
#
|
1346
|
+
# @overload label_text(text_classification_config: nil, text_entity_extraction_config: nil, parent: nil, basic_config: nil, feature: nil)
|
1347
|
+
# Pass arguments to `label_text` via keyword arguments. Note that at
|
1348
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1349
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1350
|
+
#
|
1351
|
+
# @param text_classification_config [::Google::Cloud::DataLabeling::V1beta1::TextClassificationConfig, ::Hash]
|
1352
|
+
# Configuration for text classification task.
|
1353
|
+
# One of text_classification_config and text_entity_extraction_config
|
1354
|
+
# is required.
|
1355
|
+
# @param text_entity_extraction_config [::Google::Cloud::DataLabeling::V1beta1::TextEntityExtractionConfig, ::Hash]
|
1356
|
+
# Configuration for entity extraction task.
|
1357
|
+
# One of text_classification_config and text_entity_extraction_config
|
1358
|
+
# is required.
|
1359
|
+
# @param parent [::String]
|
1360
|
+
# Required. Name of the data set to request labeling task, format:
|
1361
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}
|
1362
|
+
# @param basic_config [::Google::Cloud::DataLabeling::V1beta1::HumanAnnotationConfig, ::Hash]
|
1363
|
+
# Required. Basic human annotation config.
|
1364
|
+
# @param feature [::Google::Cloud::DataLabeling::V1beta1::LabelTextRequest::Feature]
|
1365
|
+
# Required. The type of text labeling task.
|
1366
|
+
#
|
1367
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1368
|
+
# @yieldparam response [::Gapic::Operation]
|
1369
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1370
|
+
#
|
1371
|
+
# @return [::Gapic::Operation]
|
1372
|
+
#
|
1373
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1374
|
+
#
|
1375
|
+
def label_text request, options = nil
|
1376
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1377
|
+
|
1378
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::LabelTextRequest
|
1379
|
+
|
1380
|
+
# Converts hash and nil to an options object
|
1381
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1382
|
+
|
1383
|
+
# Customize the options with defaults
|
1384
|
+
metadata = @config.rpcs.label_text.metadata.to_h
|
1385
|
+
|
1386
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1387
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1388
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1389
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1390
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1391
|
+
|
1392
|
+
header_params = {
|
1393
|
+
"parent" => request.parent
|
1394
|
+
}
|
1395
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1396
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1397
|
+
|
1398
|
+
options.apply_defaults timeout: @config.rpcs.label_text.timeout,
|
1399
|
+
metadata: metadata,
|
1400
|
+
retry_policy: @config.rpcs.label_text.retry_policy
|
1401
|
+
options.apply_defaults metadata: @config.metadata,
|
1402
|
+
retry_policy: @config.retry_policy
|
1403
|
+
|
1404
|
+
@data_labeling_service_stub.call_rpc :label_text, request, options: options do |response, operation|
|
1405
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1406
|
+
yield response, operation if block_given?
|
1407
|
+
return response
|
1408
|
+
end
|
1409
|
+
rescue ::GRPC::BadStatus => e
|
1410
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1411
|
+
end
|
1412
|
+
|
1413
|
+
##
|
1414
|
+
# Gets an example by resource name, including both data and annotation.
|
1415
|
+
#
|
1416
|
+
# @overload get_example(request, options = nil)
|
1417
|
+
# Pass arguments to `get_example` via a request object, either of type
|
1418
|
+
# {::Google::Cloud::DataLabeling::V1beta1::GetExampleRequest} or an equivalent Hash.
|
1419
|
+
#
|
1420
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::GetExampleRequest, ::Hash]
|
1421
|
+
# A request object representing the call parameters. Required. To specify no
|
1422
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1423
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1424
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1425
|
+
#
|
1426
|
+
# @overload get_example(name: nil, filter: nil)
|
1427
|
+
# Pass arguments to `get_example` via keyword arguments. Note that at
|
1428
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1429
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1430
|
+
#
|
1431
|
+
# @param name [::String]
|
1432
|
+
# Required. Name of example, format:
|
1433
|
+
# projects/\\{project_id}/datasets/\\{dataset_id}/annotatedDatasets/
|
1434
|
+
# \\{annotated_dataset_id}/examples/\\{example_id}
|
1435
|
+
# @param filter [::String]
|
1436
|
+
# Optional. An expression for filtering Examples. Filter by
|
1437
|
+
# annotation_spec.display_name is supported. Format
|
1438
|
+
# "annotation_spec.display_name = \\{display_name}"
|
1439
|
+
#
|
1440
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1441
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::Example]
|
1442
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1443
|
+
#
|
1444
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::Example]
|
1445
|
+
#
|
1446
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1447
|
+
#
|
1448
|
+
def get_example request, options = nil
|
1449
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1450
|
+
|
1451
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetExampleRequest
|
1452
|
+
|
1453
|
+
# Converts hash and nil to an options object
|
1454
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1455
|
+
|
1456
|
+
# Customize the options with defaults
|
1457
|
+
metadata = @config.rpcs.get_example.metadata.to_h
|
1458
|
+
|
1459
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1460
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1461
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1462
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1463
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1464
|
+
|
1465
|
+
header_params = {
|
1466
|
+
"name" => request.name
|
1467
|
+
}
|
1468
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1469
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1470
|
+
|
1471
|
+
options.apply_defaults timeout: @config.rpcs.get_example.timeout,
|
1472
|
+
metadata: metadata,
|
1473
|
+
retry_policy: @config.rpcs.get_example.retry_policy
|
1474
|
+
options.apply_defaults metadata: @config.metadata,
|
1475
|
+
retry_policy: @config.retry_policy
|
1476
|
+
|
1477
|
+
@data_labeling_service_stub.call_rpc :get_example, request, options: options do |response, operation|
|
1478
|
+
yield response, operation if block_given?
|
1479
|
+
return response
|
1480
|
+
end
|
1481
|
+
rescue ::GRPC::BadStatus => e
|
1482
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1483
|
+
end
|
1484
|
+
|
1485
|
+
##
|
1486
|
+
# Lists examples in an annotated dataset. Pagination is supported.
|
1487
|
+
#
|
1488
|
+
# @overload list_examples(request, options = nil)
|
1489
|
+
# Pass arguments to `list_examples` via a request object, either of type
|
1490
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListExamplesRequest} or an equivalent Hash.
|
1491
|
+
#
|
1492
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::ListExamplesRequest, ::Hash]
|
1493
|
+
# A request object representing the call parameters. Required. To specify no
|
1494
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1495
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1496
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1497
|
+
#
|
1498
|
+
# @overload list_examples(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
1499
|
+
# Pass arguments to `list_examples` via keyword arguments. Note that at
|
1500
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1501
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1502
|
+
#
|
1503
|
+
# @param parent [::String]
|
1504
|
+
# Required. Example resource parent.
|
1505
|
+
# @param filter [::String]
|
1506
|
+
# Optional. An expression for filtering Examples. For annotated datasets that
|
1507
|
+
# have annotation spec set, filter by
|
1508
|
+
# annotation_spec.display_name is supported. Format
|
1509
|
+
# "annotation_spec.display_name = \\{display_name}"
|
1510
|
+
# @param page_size [::Integer]
|
1511
|
+
# Optional. Requested page size. Server may return fewer results than
|
1512
|
+
# requested. Default value is 100.
|
1513
|
+
# @param page_token [::String]
|
1514
|
+
# Optional. A token identifying a page of results for the server to return.
|
1515
|
+
# Typically obtained by
|
1516
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListExamplesResponse#next_page_token ListExamplesResponse.next_page_token} of the previous
|
1517
|
+
# [DataLabelingService.ListExamples] call.
|
1518
|
+
# Return first page if empty.
|
1519
|
+
#
|
1520
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1521
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>]
|
1522
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1523
|
+
#
|
1524
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>]
|
1525
|
+
#
|
1526
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1527
|
+
#
|
1528
|
+
def list_examples request, options = nil
|
1529
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1530
|
+
|
1531
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListExamplesRequest
|
1532
|
+
|
1533
|
+
# Converts hash and nil to an options object
|
1534
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1535
|
+
|
1536
|
+
# Customize the options with defaults
|
1537
|
+
metadata = @config.rpcs.list_examples.metadata.to_h
|
1538
|
+
|
1539
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1540
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1541
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1542
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1543
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1544
|
+
|
1545
|
+
header_params = {
|
1546
|
+
"parent" => request.parent
|
1547
|
+
}
|
1548
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1549
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1550
|
+
|
1551
|
+
options.apply_defaults timeout: @config.rpcs.list_examples.timeout,
|
1552
|
+
metadata: metadata,
|
1553
|
+
retry_policy: @config.rpcs.list_examples.retry_policy
|
1554
|
+
options.apply_defaults metadata: @config.metadata,
|
1555
|
+
retry_policy: @config.retry_policy
|
1556
|
+
|
1557
|
+
@data_labeling_service_stub.call_rpc :list_examples, request, options: options do |response, operation|
|
1558
|
+
response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_examples, request, response, operation, options
|
1559
|
+
yield response, operation if block_given?
|
1560
|
+
return response
|
1561
|
+
end
|
1562
|
+
rescue ::GRPC::BadStatus => e
|
1563
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1564
|
+
end
|
1565
|
+
|
1566
|
+
##
|
1567
|
+
# Creates an annotation spec set by providing a set of labels.
|
1568
|
+
#
|
1569
|
+
# @overload create_annotation_spec_set(request, options = nil)
|
1570
|
+
# Pass arguments to `create_annotation_spec_set` via a request object, either of type
|
1571
|
+
# {::Google::Cloud::DataLabeling::V1beta1::CreateAnnotationSpecSetRequest} or an equivalent Hash.
|
1572
|
+
#
|
1573
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::CreateAnnotationSpecSetRequest, ::Hash]
|
1574
|
+
# A request object representing the call parameters. Required. To specify no
|
1575
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1576
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1577
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1578
|
+
#
|
1579
|
+
# @overload create_annotation_spec_set(parent: nil, annotation_spec_set: nil)
|
1580
|
+
# Pass arguments to `create_annotation_spec_set` via keyword arguments. Note that at
|
1581
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1582
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1583
|
+
#
|
1584
|
+
# @param parent [::String]
|
1585
|
+
# Required. AnnotationSpecSet resource parent, format:
|
1586
|
+
# projects/\\{project_id}
|
1587
|
+
# @param annotation_spec_set [::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet, ::Hash]
|
1588
|
+
# Required. Annotation spec set to create. Annotation specs must be included.
|
1589
|
+
# Only one annotation spec will be accepted for annotation specs with same
|
1590
|
+
# display_name.
|
1591
|
+
#
|
1592
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1593
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet]
|
1594
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1595
|
+
#
|
1596
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet]
|
1597
|
+
#
|
1598
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1599
|
+
#
|
1600
|
+
def create_annotation_spec_set request, options = nil
|
1601
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1602
|
+
|
1603
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::CreateAnnotationSpecSetRequest
|
1604
|
+
|
1605
|
+
# Converts hash and nil to an options object
|
1606
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1607
|
+
|
1608
|
+
# Customize the options with defaults
|
1609
|
+
metadata = @config.rpcs.create_annotation_spec_set.metadata.to_h
|
1610
|
+
|
1611
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1612
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1613
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1614
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1615
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1616
|
+
|
1617
|
+
header_params = {
|
1618
|
+
"parent" => request.parent
|
1619
|
+
}
|
1620
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1621
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1622
|
+
|
1623
|
+
options.apply_defaults timeout: @config.rpcs.create_annotation_spec_set.timeout,
|
1624
|
+
metadata: metadata,
|
1625
|
+
retry_policy: @config.rpcs.create_annotation_spec_set.retry_policy
|
1626
|
+
options.apply_defaults metadata: @config.metadata,
|
1627
|
+
retry_policy: @config.retry_policy
|
1628
|
+
|
1629
|
+
@data_labeling_service_stub.call_rpc :create_annotation_spec_set, request, options: options do |response, operation|
|
1630
|
+
yield response, operation if block_given?
|
1631
|
+
return response
|
1632
|
+
end
|
1633
|
+
rescue ::GRPC::BadStatus => e
|
1634
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1635
|
+
end
|
1636
|
+
|
1637
|
+
##
|
1638
|
+
# Gets an annotation spec set by resource name.
|
1639
|
+
#
|
1640
|
+
# @overload get_annotation_spec_set(request, options = nil)
|
1641
|
+
# Pass arguments to `get_annotation_spec_set` via a request object, either of type
|
1642
|
+
# {::Google::Cloud::DataLabeling::V1beta1::GetAnnotationSpecSetRequest} or an equivalent Hash.
|
1643
|
+
#
|
1644
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::GetAnnotationSpecSetRequest, ::Hash]
|
1645
|
+
# A request object representing the call parameters. Required. To specify no
|
1646
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1647
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1648
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1649
|
+
#
|
1650
|
+
# @overload get_annotation_spec_set(name: nil)
|
1651
|
+
# Pass arguments to `get_annotation_spec_set` via keyword arguments. Note that at
|
1652
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1653
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1654
|
+
#
|
1655
|
+
# @param name [::String]
|
1656
|
+
# Required. AnnotationSpecSet resource name, format:
|
1657
|
+
# projects/\\{project_id}/annotationSpecSets/\\{annotation_spec_set_id}
|
1658
|
+
#
|
1659
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1660
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet]
|
1661
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1662
|
+
#
|
1663
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet]
|
1664
|
+
#
|
1665
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1666
|
+
#
|
1667
|
+
def get_annotation_spec_set request, options = nil
|
1668
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1669
|
+
|
1670
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetAnnotationSpecSetRequest
|
1671
|
+
|
1672
|
+
# Converts hash and nil to an options object
|
1673
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1674
|
+
|
1675
|
+
# Customize the options with defaults
|
1676
|
+
metadata = @config.rpcs.get_annotation_spec_set.metadata.to_h
|
1677
|
+
|
1678
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1679
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1680
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1681
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1682
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1683
|
+
|
1684
|
+
header_params = {
|
1685
|
+
"name" => request.name
|
1686
|
+
}
|
1687
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1688
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1689
|
+
|
1690
|
+
options.apply_defaults timeout: @config.rpcs.get_annotation_spec_set.timeout,
|
1691
|
+
metadata: metadata,
|
1692
|
+
retry_policy: @config.rpcs.get_annotation_spec_set.retry_policy
|
1693
|
+
options.apply_defaults metadata: @config.metadata,
|
1694
|
+
retry_policy: @config.retry_policy
|
1695
|
+
|
1696
|
+
@data_labeling_service_stub.call_rpc :get_annotation_spec_set, request, options: options do |response, operation|
|
1697
|
+
yield response, operation if block_given?
|
1698
|
+
return response
|
1699
|
+
end
|
1700
|
+
rescue ::GRPC::BadStatus => e
|
1701
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1702
|
+
end
|
1703
|
+
|
1704
|
+
##
|
1705
|
+
# Lists annotation spec sets for a project. Pagination is supported.
|
1706
|
+
#
|
1707
|
+
# @overload list_annotation_spec_sets(request, options = nil)
|
1708
|
+
# Pass arguments to `list_annotation_spec_sets` via a request object, either of type
|
1709
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListAnnotationSpecSetsRequest} or an equivalent Hash.
|
1710
|
+
#
|
1711
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::ListAnnotationSpecSetsRequest, ::Hash]
|
1712
|
+
# A request object representing the call parameters. Required. To specify no
|
1713
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1714
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1715
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1716
|
+
#
|
1717
|
+
# @overload list_annotation_spec_sets(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
1718
|
+
# Pass arguments to `list_annotation_spec_sets` via keyword arguments. Note that at
|
1719
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1720
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1721
|
+
#
|
1722
|
+
# @param parent [::String]
|
1723
|
+
# Required. Parent of AnnotationSpecSet resource, format:
|
1724
|
+
# projects/\\{project_id}
|
1725
|
+
# @param filter [::String]
|
1726
|
+
# Optional. Filter is not supported at this moment.
|
1727
|
+
# @param page_size [::Integer]
|
1728
|
+
# Optional. Requested page size. Server may return fewer results than
|
1729
|
+
# requested. Default value is 100.
|
1730
|
+
# @param page_token [::String]
|
1731
|
+
# Optional. A token identifying a page of results for the server to return.
|
1732
|
+
# Typically obtained by
|
1733
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListAnnotationSpecSetsResponse#next_page_token ListAnnotationSpecSetsResponse.next_page_token} of the previous
|
1734
|
+
# [DataLabelingService.ListAnnotationSpecSets] call.
|
1735
|
+
# Return first page if empty.
|
1736
|
+
#
|
1737
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1738
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>]
|
1739
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1740
|
+
#
|
1741
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>]
|
1742
|
+
#
|
1743
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1744
|
+
#
|
1745
|
+
def list_annotation_spec_sets request, options = nil
|
1746
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1747
|
+
|
1748
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListAnnotationSpecSetsRequest
|
1749
|
+
|
1750
|
+
# Converts hash and nil to an options object
|
1751
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1752
|
+
|
1753
|
+
# Customize the options with defaults
|
1754
|
+
metadata = @config.rpcs.list_annotation_spec_sets.metadata.to_h
|
1755
|
+
|
1756
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1757
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1758
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1759
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1760
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1761
|
+
|
1762
|
+
header_params = {
|
1763
|
+
"parent" => request.parent
|
1764
|
+
}
|
1765
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1766
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1767
|
+
|
1768
|
+
options.apply_defaults timeout: @config.rpcs.list_annotation_spec_sets.timeout,
|
1769
|
+
metadata: metadata,
|
1770
|
+
retry_policy: @config.rpcs.list_annotation_spec_sets.retry_policy
|
1771
|
+
options.apply_defaults metadata: @config.metadata,
|
1772
|
+
retry_policy: @config.retry_policy
|
1773
|
+
|
1774
|
+
@data_labeling_service_stub.call_rpc :list_annotation_spec_sets, request, options: options do |response, operation|
|
1775
|
+
response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_annotation_spec_sets, request, response, operation, options
|
1776
|
+
yield response, operation if block_given?
|
1777
|
+
return response
|
1778
|
+
end
|
1779
|
+
rescue ::GRPC::BadStatus => e
|
1780
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1781
|
+
end
|
1782
|
+
|
1783
|
+
##
|
1784
|
+
# Deletes an annotation spec set by resource name.
|
1785
|
+
#
|
1786
|
+
# @overload delete_annotation_spec_set(request, options = nil)
|
1787
|
+
# Pass arguments to `delete_annotation_spec_set` via a request object, either of type
|
1788
|
+
# {::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest} or an equivalent Hash.
|
1789
|
+
#
|
1790
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest, ::Hash]
|
1791
|
+
# A request object representing the call parameters. Required. To specify no
|
1792
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1793
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1794
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1795
|
+
#
|
1796
|
+
# @overload delete_annotation_spec_set(name: nil)
|
1797
|
+
# Pass arguments to `delete_annotation_spec_set` via keyword arguments. Note that at
|
1798
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1799
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1800
|
+
#
|
1801
|
+
# @param name [::String]
|
1802
|
+
# Required. AnnotationSpec resource name, format:
|
1803
|
+
# `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
|
1804
|
+
#
|
1805
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1806
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1807
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1808
|
+
#
|
1809
|
+
# @return [::Google::Protobuf::Empty]
|
1810
|
+
#
|
1811
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1812
|
+
#
|
1813
|
+
def delete_annotation_spec_set request, options = nil
|
1814
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1815
|
+
|
1816
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest
|
1817
|
+
|
1818
|
+
# Converts hash and nil to an options object
|
1819
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1820
|
+
|
1821
|
+
# Customize the options with defaults
|
1822
|
+
metadata = @config.rpcs.delete_annotation_spec_set.metadata.to_h
|
1823
|
+
|
1824
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1825
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1826
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1827
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1828
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1829
|
+
|
1830
|
+
header_params = {
|
1831
|
+
"name" => request.name
|
1832
|
+
}
|
1833
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1834
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1835
|
+
|
1836
|
+
options.apply_defaults timeout: @config.rpcs.delete_annotation_spec_set.timeout,
|
1837
|
+
metadata: metadata,
|
1838
|
+
retry_policy: @config.rpcs.delete_annotation_spec_set.retry_policy
|
1839
|
+
options.apply_defaults metadata: @config.metadata,
|
1840
|
+
retry_policy: @config.retry_policy
|
1841
|
+
|
1842
|
+
@data_labeling_service_stub.call_rpc :delete_annotation_spec_set, request, options: options do |response, operation|
|
1843
|
+
yield response, operation if block_given?
|
1844
|
+
return response
|
1845
|
+
end
|
1846
|
+
rescue ::GRPC::BadStatus => e
|
1847
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1848
|
+
end
|
1849
|
+
|
1850
|
+
##
|
1851
|
+
# Creates an instruction for how data should be labeled.
|
1852
|
+
#
|
1853
|
+
# @overload create_instruction(request, options = nil)
|
1854
|
+
# Pass arguments to `create_instruction` via a request object, either of type
|
1855
|
+
# {::Google::Cloud::DataLabeling::V1beta1::CreateInstructionRequest} or an equivalent Hash.
|
1856
|
+
#
|
1857
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::CreateInstructionRequest, ::Hash]
|
1858
|
+
# A request object representing the call parameters. Required. To specify no
|
1859
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1860
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1861
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1862
|
+
#
|
1863
|
+
# @overload create_instruction(parent: nil, instruction: nil)
|
1864
|
+
# Pass arguments to `create_instruction` via keyword arguments. Note that at
|
1865
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1866
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1867
|
+
#
|
1868
|
+
# @param parent [::String]
|
1869
|
+
# Required. Instruction resource parent, format:
|
1870
|
+
# projects/\\{project_id}
|
1871
|
+
# @param instruction [::Google::Cloud::DataLabeling::V1beta1::Instruction, ::Hash]
|
1872
|
+
# Required. Instruction of how to perform the labeling task.
|
1873
|
+
#
|
1874
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1875
|
+
# @yieldparam response [::Gapic::Operation]
|
1876
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1877
|
+
#
|
1878
|
+
# @return [::Gapic::Operation]
|
1879
|
+
#
|
1880
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1881
|
+
#
|
1882
|
+
def create_instruction request, options = nil
|
1883
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1884
|
+
|
1885
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::CreateInstructionRequest
|
1886
|
+
|
1887
|
+
# Converts hash and nil to an options object
|
1888
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1889
|
+
|
1890
|
+
# Customize the options with defaults
|
1891
|
+
metadata = @config.rpcs.create_instruction.metadata.to_h
|
1892
|
+
|
1893
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1894
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1895
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1896
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1897
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1898
|
+
|
1899
|
+
header_params = {
|
1900
|
+
"parent" => request.parent
|
1901
|
+
}
|
1902
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1903
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1904
|
+
|
1905
|
+
options.apply_defaults timeout: @config.rpcs.create_instruction.timeout,
|
1906
|
+
metadata: metadata,
|
1907
|
+
retry_policy: @config.rpcs.create_instruction.retry_policy
|
1908
|
+
options.apply_defaults metadata: @config.metadata,
|
1909
|
+
retry_policy: @config.retry_policy
|
1910
|
+
|
1911
|
+
@data_labeling_service_stub.call_rpc :create_instruction, request, options: options do |response, operation|
|
1912
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1913
|
+
yield response, operation if block_given?
|
1914
|
+
return response
|
1915
|
+
end
|
1916
|
+
rescue ::GRPC::BadStatus => e
|
1917
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1918
|
+
end
|
1919
|
+
|
1920
|
+
##
|
1921
|
+
# Gets an instruction by resource name.
|
1922
|
+
#
|
1923
|
+
# @overload get_instruction(request, options = nil)
|
1924
|
+
# Pass arguments to `get_instruction` via a request object, either of type
|
1925
|
+
# {::Google::Cloud::DataLabeling::V1beta1::GetInstructionRequest} or an equivalent Hash.
|
1926
|
+
#
|
1927
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::GetInstructionRequest, ::Hash]
|
1928
|
+
# A request object representing the call parameters. Required. To specify no
|
1929
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1930
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1931
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1932
|
+
#
|
1933
|
+
# @overload get_instruction(name: nil)
|
1934
|
+
# Pass arguments to `get_instruction` via keyword arguments. Note that at
|
1935
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1936
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1937
|
+
#
|
1938
|
+
# @param name [::String]
|
1939
|
+
# Required. Instruction resource name, format:
|
1940
|
+
# projects/\\{project_id}/instructions/\\{instruction_id}
|
1941
|
+
#
|
1942
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1943
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::Instruction]
|
1944
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1945
|
+
#
|
1946
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::Instruction]
|
1947
|
+
#
|
1948
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1949
|
+
#
|
1950
|
+
def get_instruction request, options = nil
|
1951
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1952
|
+
|
1953
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetInstructionRequest
|
1954
|
+
|
1955
|
+
# Converts hash and nil to an options object
|
1956
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1957
|
+
|
1958
|
+
# Customize the options with defaults
|
1959
|
+
metadata = @config.rpcs.get_instruction.metadata.to_h
|
1960
|
+
|
1961
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1962
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1963
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1964
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
1965
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1966
|
+
|
1967
|
+
header_params = {
|
1968
|
+
"name" => request.name
|
1969
|
+
}
|
1970
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1971
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1972
|
+
|
1973
|
+
options.apply_defaults timeout: @config.rpcs.get_instruction.timeout,
|
1974
|
+
metadata: metadata,
|
1975
|
+
retry_policy: @config.rpcs.get_instruction.retry_policy
|
1976
|
+
options.apply_defaults metadata: @config.metadata,
|
1977
|
+
retry_policy: @config.retry_policy
|
1978
|
+
|
1979
|
+
@data_labeling_service_stub.call_rpc :get_instruction, request, options: options do |response, operation|
|
1980
|
+
yield response, operation if block_given?
|
1981
|
+
return response
|
1982
|
+
end
|
1983
|
+
rescue ::GRPC::BadStatus => e
|
1984
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1985
|
+
end
|
1986
|
+
|
1987
|
+
##
|
1988
|
+
# Lists instructions for a project. Pagination is supported.
|
1989
|
+
#
|
1990
|
+
# @overload list_instructions(request, options = nil)
|
1991
|
+
# Pass arguments to `list_instructions` via a request object, either of type
|
1992
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListInstructionsRequest} or an equivalent Hash.
|
1993
|
+
#
|
1994
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::ListInstructionsRequest, ::Hash]
|
1995
|
+
# A request object representing the call parameters. Required. To specify no
|
1996
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1997
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1998
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1999
|
+
#
|
2000
|
+
# @overload list_instructions(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
2001
|
+
# Pass arguments to `list_instructions` via keyword arguments. Note that at
|
2002
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2003
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2004
|
+
#
|
2005
|
+
# @param parent [::String]
|
2006
|
+
# Required. Instruction resource parent, format:
|
2007
|
+
# projects/\\{project_id}
|
2008
|
+
# @param filter [::String]
|
2009
|
+
# Optional. Filter is not supported at this moment.
|
2010
|
+
# @param page_size [::Integer]
|
2011
|
+
# Optional. Requested page size. Server may return fewer results than
|
2012
|
+
# requested. Default value is 100.
|
2013
|
+
# @param page_token [::String]
|
2014
|
+
# Optional. A token identifying a page of results for the server to return.
|
2015
|
+
# Typically obtained by
|
2016
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListInstructionsResponse#next_page_token ListInstructionsResponse.next_page_token} of the previous
|
2017
|
+
# [DataLabelingService.ListInstructions] call.
|
2018
|
+
# Return first page if empty.
|
2019
|
+
#
|
2020
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2021
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>]
|
2022
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2023
|
+
#
|
2024
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>]
|
2025
|
+
#
|
2026
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2027
|
+
#
|
2028
|
+
def list_instructions request, options = nil
|
2029
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2030
|
+
|
2031
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListInstructionsRequest
|
2032
|
+
|
2033
|
+
# Converts hash and nil to an options object
|
2034
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2035
|
+
|
2036
|
+
# Customize the options with defaults
|
2037
|
+
metadata = @config.rpcs.list_instructions.metadata.to_h
|
2038
|
+
|
2039
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2040
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2041
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2042
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2043
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2044
|
+
|
2045
|
+
header_params = {
|
2046
|
+
"parent" => request.parent
|
2047
|
+
}
|
2048
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2049
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2050
|
+
|
2051
|
+
options.apply_defaults timeout: @config.rpcs.list_instructions.timeout,
|
2052
|
+
metadata: metadata,
|
2053
|
+
retry_policy: @config.rpcs.list_instructions.retry_policy
|
2054
|
+
options.apply_defaults metadata: @config.metadata,
|
2055
|
+
retry_policy: @config.retry_policy
|
2056
|
+
|
2057
|
+
@data_labeling_service_stub.call_rpc :list_instructions, request, options: options do |response, operation|
|
2058
|
+
response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_instructions, request, response, operation, options
|
2059
|
+
yield response, operation if block_given?
|
2060
|
+
return response
|
2061
|
+
end
|
2062
|
+
rescue ::GRPC::BadStatus => e
|
2063
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2064
|
+
end
|
2065
|
+
|
2066
|
+
##
|
2067
|
+
# Deletes an instruction object by resource name.
|
2068
|
+
#
|
2069
|
+
# @overload delete_instruction(request, options = nil)
|
2070
|
+
# Pass arguments to `delete_instruction` via a request object, either of type
|
2071
|
+
# {::Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest} or an equivalent Hash.
|
2072
|
+
#
|
2073
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest, ::Hash]
|
2074
|
+
# A request object representing the call parameters. Required. To specify no
|
2075
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2076
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2077
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2078
|
+
#
|
2079
|
+
# @overload delete_instruction(name: nil)
|
2080
|
+
# Pass arguments to `delete_instruction` via keyword arguments. Note that at
|
2081
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2082
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2083
|
+
#
|
2084
|
+
# @param name [::String]
|
2085
|
+
# Required. Instruction resource name, format:
|
2086
|
+
# projects/\\{project_id}/instructions/\\{instruction_id}
|
2087
|
+
#
|
2088
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2089
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
2090
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2091
|
+
#
|
2092
|
+
# @return [::Google::Protobuf::Empty]
|
2093
|
+
#
|
2094
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2095
|
+
#
|
2096
|
+
def delete_instruction request, options = nil
|
2097
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2098
|
+
|
2099
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest
|
2100
|
+
|
2101
|
+
# Converts hash and nil to an options object
|
2102
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2103
|
+
|
2104
|
+
# Customize the options with defaults
|
2105
|
+
metadata = @config.rpcs.delete_instruction.metadata.to_h
|
2106
|
+
|
2107
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2108
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2109
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2110
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2111
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2112
|
+
|
2113
|
+
header_params = {
|
2114
|
+
"name" => request.name
|
2115
|
+
}
|
2116
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2117
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2118
|
+
|
2119
|
+
options.apply_defaults timeout: @config.rpcs.delete_instruction.timeout,
|
2120
|
+
metadata: metadata,
|
2121
|
+
retry_policy: @config.rpcs.delete_instruction.retry_policy
|
2122
|
+
options.apply_defaults metadata: @config.metadata,
|
2123
|
+
retry_policy: @config.retry_policy
|
2124
|
+
|
2125
|
+
@data_labeling_service_stub.call_rpc :delete_instruction, request, options: options do |response, operation|
|
2126
|
+
yield response, operation if block_given?
|
2127
|
+
return response
|
2128
|
+
end
|
2129
|
+
rescue ::GRPC::BadStatus => e
|
2130
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2131
|
+
end
|
2132
|
+
|
2133
|
+
##
|
2134
|
+
# Gets an evaluation by resource name (to search, use
|
2135
|
+
# {::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client#search_evaluations projects.evaluations.search}).
|
2136
|
+
#
|
2137
|
+
# @overload get_evaluation(request, options = nil)
|
2138
|
+
# Pass arguments to `get_evaluation` via a request object, either of type
|
2139
|
+
# {::Google::Cloud::DataLabeling::V1beta1::GetEvaluationRequest} or an equivalent Hash.
|
2140
|
+
#
|
2141
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::GetEvaluationRequest, ::Hash]
|
2142
|
+
# A request object representing the call parameters. Required. To specify no
|
2143
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2144
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2145
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2146
|
+
#
|
2147
|
+
# @overload get_evaluation(name: nil)
|
2148
|
+
# Pass arguments to `get_evaluation` via keyword arguments. Note that at
|
2149
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2150
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2151
|
+
#
|
2152
|
+
# @param name [::String]
|
2153
|
+
# Required. Name of the evaluation. Format:
|
2154
|
+
#
|
2155
|
+
# "projects/<var>\\{project_id}</var>/datasets/<var>\\{dataset_id}</var>/evaluations/<var>\\{evaluation_id}</var>'
|
2156
|
+
#
|
2157
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2158
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::Evaluation]
|
2159
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2160
|
+
#
|
2161
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::Evaluation]
|
2162
|
+
#
|
2163
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2164
|
+
#
|
2165
|
+
def get_evaluation request, options = nil
|
2166
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2167
|
+
|
2168
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetEvaluationRequest
|
2169
|
+
|
2170
|
+
# Converts hash and nil to an options object
|
2171
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2172
|
+
|
2173
|
+
# Customize the options with defaults
|
2174
|
+
metadata = @config.rpcs.get_evaluation.metadata.to_h
|
2175
|
+
|
2176
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2177
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2178
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2179
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2180
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2181
|
+
|
2182
|
+
header_params = {
|
2183
|
+
"name" => request.name
|
2184
|
+
}
|
2185
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2186
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2187
|
+
|
2188
|
+
options.apply_defaults timeout: @config.rpcs.get_evaluation.timeout,
|
2189
|
+
metadata: metadata,
|
2190
|
+
retry_policy: @config.rpcs.get_evaluation.retry_policy
|
2191
|
+
options.apply_defaults metadata: @config.metadata,
|
2192
|
+
retry_policy: @config.retry_policy
|
2193
|
+
|
2194
|
+
@data_labeling_service_stub.call_rpc :get_evaluation, request, options: options do |response, operation|
|
2195
|
+
yield response, operation if block_given?
|
2196
|
+
return response
|
2197
|
+
end
|
2198
|
+
rescue ::GRPC::BadStatus => e
|
2199
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2200
|
+
end
|
2201
|
+
|
2202
|
+
##
|
2203
|
+
# Searches {::Google::Cloud::DataLabeling::V1beta1::Evaluation evaluations} within a project.
|
2204
|
+
#
|
2205
|
+
# @overload search_evaluations(request, options = nil)
|
2206
|
+
# Pass arguments to `search_evaluations` via a request object, either of type
|
2207
|
+
# {::Google::Cloud::DataLabeling::V1beta1::SearchEvaluationsRequest} or an equivalent Hash.
|
2208
|
+
#
|
2209
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::SearchEvaluationsRequest, ::Hash]
|
2210
|
+
# A request object representing the call parameters. Required. To specify no
|
2211
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2212
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2213
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2214
|
+
#
|
2215
|
+
# @overload search_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
2216
|
+
# Pass arguments to `search_evaluations` via keyword arguments. Note that at
|
2217
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2218
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2219
|
+
#
|
2220
|
+
# @param parent [::String]
|
2221
|
+
# Required. Evaluation search parent (project ID). Format:
|
2222
|
+
# "projects/<var>\\{project_id}</var>"
|
2223
|
+
# @param filter [::String]
|
2224
|
+
# Optional. To search evaluations, you can filter by the following:
|
2225
|
+
#
|
2226
|
+
# * evaluation<span>_</span>job.evaluation_job_id (the last part of
|
2227
|
+
# {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#name EvaluationJob.name})
|
2228
|
+
# * evaluation<span>_</span>job.model_id (the <var>\\{model_name}</var> portion
|
2229
|
+
# of {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#model_version EvaluationJob.modelVersion})
|
2230
|
+
# * evaluation<span>_</span>job.evaluation_job_run_time_start (Minimum
|
2231
|
+
# threshold for the
|
2232
|
+
# {::Google::Cloud::DataLabeling::V1beta1::Evaluation#evaluation_job_run_time evaluationJobRunTime} that created
|
2233
|
+
# the evaluation)
|
2234
|
+
# * evaluation<span>_</span>job.evaluation_job_run_time_end (Maximum
|
2235
|
+
# threshold for the
|
2236
|
+
# {::Google::Cloud::DataLabeling::V1beta1::Evaluation#evaluation_job_run_time evaluationJobRunTime} that created
|
2237
|
+
# the evaluation)
|
2238
|
+
# * evaluation<span>_</span>job.job_state ({::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#state EvaluationJob.state})
|
2239
|
+
# * annotation<span>_</span>spec.display_name (the Evaluation contains a
|
2240
|
+
# metric for the annotation spec with this
|
2241
|
+
# {::Google::Cloud::DataLabeling::V1beta1::AnnotationSpec#display_name displayName})
|
2242
|
+
#
|
2243
|
+
# To filter by multiple critiera, use the `AND` operator or the `OR`
|
2244
|
+
# operator. The following examples shows a string that filters by several
|
2245
|
+
# critiera:
|
2246
|
+
#
|
2247
|
+
# "evaluation<span>_</span>job.evaluation_job_id =
|
2248
|
+
# <var>\\{evaluation_job_id}</var> AND evaluation<span>_</span>job.model_id =
|
2249
|
+
# <var>\\{model_name}</var> AND
|
2250
|
+
# evaluation<span>_</span>job.evaluation_job_run_time_start =
|
2251
|
+
# <var>\\{timestamp_1}</var> AND
|
2252
|
+
# evaluation<span>_</span>job.evaluation_job_run_time_end =
|
2253
|
+
# <var>\\{timestamp_2}</var> AND annotation<span>_</span>spec.display_name =
|
2254
|
+
# <var>\\{display_name}</var>"
|
2255
|
+
# @param page_size [::Integer]
|
2256
|
+
# Optional. Requested page size. Server may return fewer results than
|
2257
|
+
# requested. Default value is 100.
|
2258
|
+
# @param page_token [::String]
|
2259
|
+
# Optional. A token identifying a page of results for the server to return.
|
2260
|
+
# Typically obtained by the
|
2261
|
+
# {::Google::Cloud::DataLabeling::V1beta1::SearchEvaluationsResponse#next_page_token nextPageToken} of the response
|
2262
|
+
# to a previous search request.
|
2263
|
+
#
|
2264
|
+
# If you don't specify this field, the API call requests the first page of
|
2265
|
+
# the search.
|
2266
|
+
#
|
2267
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2268
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>]
|
2269
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2270
|
+
#
|
2271
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>]
|
2272
|
+
#
|
2273
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2274
|
+
#
|
2275
|
+
def search_evaluations request, options = nil
|
2276
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2277
|
+
|
2278
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::SearchEvaluationsRequest
|
2279
|
+
|
2280
|
+
# Converts hash and nil to an options object
|
2281
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2282
|
+
|
2283
|
+
# Customize the options with defaults
|
2284
|
+
metadata = @config.rpcs.search_evaluations.metadata.to_h
|
2285
|
+
|
2286
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2287
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2288
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2289
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2290
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2291
|
+
|
2292
|
+
header_params = {
|
2293
|
+
"parent" => request.parent
|
2294
|
+
}
|
2295
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2296
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2297
|
+
|
2298
|
+
options.apply_defaults timeout: @config.rpcs.search_evaluations.timeout,
|
2299
|
+
metadata: metadata,
|
2300
|
+
retry_policy: @config.rpcs.search_evaluations.retry_policy
|
2301
|
+
options.apply_defaults metadata: @config.metadata,
|
2302
|
+
retry_policy: @config.retry_policy
|
2303
|
+
|
2304
|
+
@data_labeling_service_stub.call_rpc :search_evaluations, request, options: options do |response, operation|
|
2305
|
+
response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :search_evaluations, request, response, operation, options
|
2306
|
+
yield response, operation if block_given?
|
2307
|
+
return response
|
2308
|
+
end
|
2309
|
+
rescue ::GRPC::BadStatus => e
|
2310
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2311
|
+
end
|
2312
|
+
|
2313
|
+
##
|
2314
|
+
# Searches example comparisons from an evaluation. The return format is a
|
2315
|
+
# list of example comparisons that show ground truth and prediction(s) for
|
2316
|
+
# a single input. Search by providing an evaluation ID.
|
2317
|
+
#
|
2318
|
+
# @overload search_example_comparisons(request, options = nil)
|
2319
|
+
# Pass arguments to `search_example_comparisons` via a request object, either of type
|
2320
|
+
# {::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsRequest} or an equivalent Hash.
|
2321
|
+
#
|
2322
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsRequest, ::Hash]
|
2323
|
+
# A request object representing the call parameters. Required. To specify no
|
2324
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2325
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2326
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2327
|
+
#
|
2328
|
+
# @overload search_example_comparisons(parent: nil, page_size: nil, page_token: nil)
|
2329
|
+
# Pass arguments to `search_example_comparisons` via keyword arguments. Note that at
|
2330
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2331
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2332
|
+
#
|
2333
|
+
# @param parent [::String]
|
2334
|
+
# Required. Name of the {::Google::Cloud::DataLabeling::V1beta1::Evaluation Evaluation} resource to search for example
|
2335
|
+
# comparisons from. Format:
|
2336
|
+
#
|
2337
|
+
# "projects/<var>\\{project_id}</var>/datasets/<var>\\{dataset_id}</var>/evaluations/<var>\\{evaluation_id}</var>"
|
2338
|
+
# @param page_size [::Integer]
|
2339
|
+
# Optional. Requested page size. Server may return fewer results than
|
2340
|
+
# requested. Default value is 100.
|
2341
|
+
# @param page_token [::String]
|
2342
|
+
# Optional. A token identifying a page of results for the server to return.
|
2343
|
+
# Typically obtained by the
|
2344
|
+
# [nextPageToken][SearchExampleComparisons.next_page_token] of the response
|
2345
|
+
# to a previous search rquest.
|
2346
|
+
#
|
2347
|
+
# If you don't specify this field, the API call requests the first page of
|
2348
|
+
# the search.
|
2349
|
+
#
|
2350
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2351
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>]
|
2352
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2353
|
+
#
|
2354
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>]
|
2355
|
+
#
|
2356
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2357
|
+
#
|
2358
|
+
def search_example_comparisons request, options = nil
|
2359
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2360
|
+
|
2361
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsRequest
|
2362
|
+
|
2363
|
+
# Converts hash and nil to an options object
|
2364
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2365
|
+
|
2366
|
+
# Customize the options with defaults
|
2367
|
+
metadata = @config.rpcs.search_example_comparisons.metadata.to_h
|
2368
|
+
|
2369
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2370
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2371
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2372
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2373
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2374
|
+
|
2375
|
+
header_params = {
|
2376
|
+
"parent" => request.parent
|
2377
|
+
}
|
2378
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2379
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2380
|
+
|
2381
|
+
options.apply_defaults timeout: @config.rpcs.search_example_comparisons.timeout,
|
2382
|
+
metadata: metadata,
|
2383
|
+
retry_policy: @config.rpcs.search_example_comparisons.retry_policy
|
2384
|
+
options.apply_defaults metadata: @config.metadata,
|
2385
|
+
retry_policy: @config.retry_policy
|
2386
|
+
|
2387
|
+
@data_labeling_service_stub.call_rpc :search_example_comparisons, request, options: options do |response, operation|
|
2388
|
+
response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :search_example_comparisons, request, response, operation, options
|
2389
|
+
yield response, operation if block_given?
|
2390
|
+
return response
|
2391
|
+
end
|
2392
|
+
rescue ::GRPC::BadStatus => e
|
2393
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2394
|
+
end
|
2395
|
+
|
2396
|
+
##
|
2397
|
+
# Creates an evaluation job.
|
2398
|
+
#
|
2399
|
+
# @overload create_evaluation_job(request, options = nil)
|
2400
|
+
# Pass arguments to `create_evaluation_job` via a request object, either of type
|
2401
|
+
# {::Google::Cloud::DataLabeling::V1beta1::CreateEvaluationJobRequest} or an equivalent Hash.
|
2402
|
+
#
|
2403
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::CreateEvaluationJobRequest, ::Hash]
|
2404
|
+
# A request object representing the call parameters. Required. To specify no
|
2405
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2406
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2407
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2408
|
+
#
|
2409
|
+
# @overload create_evaluation_job(parent: nil, job: nil)
|
2410
|
+
# Pass arguments to `create_evaluation_job` via keyword arguments. Note that at
|
2411
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2412
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2413
|
+
#
|
2414
|
+
# @param parent [::String]
|
2415
|
+
# Required. Evaluation job resource parent. Format:
|
2416
|
+
# "projects/<var>\\{project_id}</var>"
|
2417
|
+
# @param job [::Google::Cloud::DataLabeling::V1beta1::EvaluationJob, ::Hash]
|
2418
|
+
# Required. The evaluation job to create.
|
2419
|
+
#
|
2420
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2421
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::EvaluationJob]
|
2422
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2423
|
+
#
|
2424
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::EvaluationJob]
|
2425
|
+
#
|
2426
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2427
|
+
#
|
2428
|
+
def create_evaluation_job request, options = nil
|
2429
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2430
|
+
|
2431
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::CreateEvaluationJobRequest
|
2432
|
+
|
2433
|
+
# Converts hash and nil to an options object
|
2434
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2435
|
+
|
2436
|
+
# Customize the options with defaults
|
2437
|
+
metadata = @config.rpcs.create_evaluation_job.metadata.to_h
|
2438
|
+
|
2439
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2440
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2441
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2442
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2443
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2444
|
+
|
2445
|
+
header_params = {
|
2446
|
+
"parent" => request.parent
|
2447
|
+
}
|
2448
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2449
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2450
|
+
|
2451
|
+
options.apply_defaults timeout: @config.rpcs.create_evaluation_job.timeout,
|
2452
|
+
metadata: metadata,
|
2453
|
+
retry_policy: @config.rpcs.create_evaluation_job.retry_policy
|
2454
|
+
options.apply_defaults metadata: @config.metadata,
|
2455
|
+
retry_policy: @config.retry_policy
|
2456
|
+
|
2457
|
+
@data_labeling_service_stub.call_rpc :create_evaluation_job, request, options: options do |response, operation|
|
2458
|
+
yield response, operation if block_given?
|
2459
|
+
return response
|
2460
|
+
end
|
2461
|
+
rescue ::GRPC::BadStatus => e
|
2462
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2463
|
+
end
|
2464
|
+
|
2465
|
+
##
|
2466
|
+
# Updates an evaluation job. You can only update certain fields of the job's
|
2467
|
+
# {::Google::Cloud::DataLabeling::V1beta1::EvaluationJobConfig EvaluationJobConfig}: `humanAnnotationConfig.instruction`,
|
2468
|
+
# `exampleCount`, and `exampleSamplePercentage`.
|
2469
|
+
#
|
2470
|
+
# If you want to change any other aspect of the evaluation job, you must
|
2471
|
+
# delete the job and create a new one.
|
2472
|
+
#
|
2473
|
+
# @overload update_evaluation_job(request, options = nil)
|
2474
|
+
# Pass arguments to `update_evaluation_job` via a request object, either of type
|
2475
|
+
# {::Google::Cloud::DataLabeling::V1beta1::UpdateEvaluationJobRequest} or an equivalent Hash.
|
2476
|
+
#
|
2477
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::UpdateEvaluationJobRequest, ::Hash]
|
2478
|
+
# A request object representing the call parameters. Required. To specify no
|
2479
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2480
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2481
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2482
|
+
#
|
2483
|
+
# @overload update_evaluation_job(evaluation_job: nil, update_mask: nil)
|
2484
|
+
# Pass arguments to `update_evaluation_job` via keyword arguments. Note that at
|
2485
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2486
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2487
|
+
#
|
2488
|
+
# @param evaluation_job [::Google::Cloud::DataLabeling::V1beta1::EvaluationJob, ::Hash]
|
2489
|
+
# Required. Evaluation job that is going to be updated.
|
2490
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
2491
|
+
# Optional. Mask for which fields to update. You can only provide the
|
2492
|
+
# following fields:
|
2493
|
+
#
|
2494
|
+
# * `evaluationJobConfig.humanAnnotationConfig.instruction`
|
2495
|
+
# * `evaluationJobConfig.exampleCount`
|
2496
|
+
# * `evaluationJobConfig.exampleSamplePercentage`
|
2497
|
+
#
|
2498
|
+
# You can provide more than one of these fields by separating them with
|
2499
|
+
# commas.
|
2500
|
+
#
|
2501
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2502
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::EvaluationJob]
|
2503
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2504
|
+
#
|
2505
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::EvaluationJob]
|
2506
|
+
#
|
2507
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2508
|
+
#
|
2509
|
+
def update_evaluation_job request, options = nil
|
2510
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2511
|
+
|
2512
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::UpdateEvaluationJobRequest
|
2513
|
+
|
2514
|
+
# Converts hash and nil to an options object
|
2515
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2516
|
+
|
2517
|
+
# Customize the options with defaults
|
2518
|
+
metadata = @config.rpcs.update_evaluation_job.metadata.to_h
|
2519
|
+
|
2520
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2521
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2522
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2523
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2524
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2525
|
+
|
2526
|
+
header_params = {
|
2527
|
+
"evaluation_job.name" => request.evaluation_job.name
|
2528
|
+
}
|
2529
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2530
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2531
|
+
|
2532
|
+
options.apply_defaults timeout: @config.rpcs.update_evaluation_job.timeout,
|
2533
|
+
metadata: metadata,
|
2534
|
+
retry_policy: @config.rpcs.update_evaluation_job.retry_policy
|
2535
|
+
options.apply_defaults metadata: @config.metadata,
|
2536
|
+
retry_policy: @config.retry_policy
|
2537
|
+
|
2538
|
+
@data_labeling_service_stub.call_rpc :update_evaluation_job, request, options: options do |response, operation|
|
2539
|
+
yield response, operation if block_given?
|
2540
|
+
return response
|
2541
|
+
end
|
2542
|
+
rescue ::GRPC::BadStatus => e
|
2543
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2544
|
+
end
|
2545
|
+
|
2546
|
+
##
|
2547
|
+
# Gets an evaluation job by resource name.
|
2548
|
+
#
|
2549
|
+
# @overload get_evaluation_job(request, options = nil)
|
2550
|
+
# Pass arguments to `get_evaluation_job` via a request object, either of type
|
2551
|
+
# {::Google::Cloud::DataLabeling::V1beta1::GetEvaluationJobRequest} or an equivalent Hash.
|
2552
|
+
#
|
2553
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::GetEvaluationJobRequest, ::Hash]
|
2554
|
+
# A request object representing the call parameters. Required. To specify no
|
2555
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2556
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2557
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2558
|
+
#
|
2559
|
+
# @overload get_evaluation_job(name: nil)
|
2560
|
+
# Pass arguments to `get_evaluation_job` via keyword arguments. Note that at
|
2561
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2562
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2563
|
+
#
|
2564
|
+
# @param name [::String]
|
2565
|
+
# Required. Name of the evaluation job. Format:
|
2566
|
+
#
|
2567
|
+
# "projects/<var>\\{project_id}</var>/evaluationJobs/<var>\\{evaluation_job_id}</var>"
|
2568
|
+
#
|
2569
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2570
|
+
# @yieldparam response [::Google::Cloud::DataLabeling::V1beta1::EvaluationJob]
|
2571
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2572
|
+
#
|
2573
|
+
# @return [::Google::Cloud::DataLabeling::V1beta1::EvaluationJob]
|
2574
|
+
#
|
2575
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2576
|
+
#
|
2577
|
+
def get_evaluation_job request, options = nil
|
2578
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2579
|
+
|
2580
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetEvaluationJobRequest
|
2581
|
+
|
2582
|
+
# Converts hash and nil to an options object
|
2583
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2584
|
+
|
2585
|
+
# Customize the options with defaults
|
2586
|
+
metadata = @config.rpcs.get_evaluation_job.metadata.to_h
|
2587
|
+
|
2588
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2589
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2590
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2591
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2592
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2593
|
+
|
2594
|
+
header_params = {
|
2595
|
+
"name" => request.name
|
2596
|
+
}
|
2597
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2598
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2599
|
+
|
2600
|
+
options.apply_defaults timeout: @config.rpcs.get_evaluation_job.timeout,
|
2601
|
+
metadata: metadata,
|
2602
|
+
retry_policy: @config.rpcs.get_evaluation_job.retry_policy
|
2603
|
+
options.apply_defaults metadata: @config.metadata,
|
2604
|
+
retry_policy: @config.retry_policy
|
2605
|
+
|
2606
|
+
@data_labeling_service_stub.call_rpc :get_evaluation_job, request, options: options do |response, operation|
|
2607
|
+
yield response, operation if block_given?
|
2608
|
+
return response
|
2609
|
+
end
|
2610
|
+
rescue ::GRPC::BadStatus => e
|
2611
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2612
|
+
end
|
2613
|
+
|
2614
|
+
##
|
2615
|
+
# Pauses an evaluation job. Pausing an evaluation job that is already in a
|
2616
|
+
# `PAUSED` state is a no-op.
|
2617
|
+
#
|
2618
|
+
# @overload pause_evaluation_job(request, options = nil)
|
2619
|
+
# Pass arguments to `pause_evaluation_job` via a request object, either of type
|
2620
|
+
# {::Google::Cloud::DataLabeling::V1beta1::PauseEvaluationJobRequest} or an equivalent Hash.
|
2621
|
+
#
|
2622
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::PauseEvaluationJobRequest, ::Hash]
|
2623
|
+
# A request object representing the call parameters. Required. To specify no
|
2624
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2625
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2626
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2627
|
+
#
|
2628
|
+
# @overload pause_evaluation_job(name: nil)
|
2629
|
+
# Pass arguments to `pause_evaluation_job` via keyword arguments. Note that at
|
2630
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2631
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2632
|
+
#
|
2633
|
+
# @param name [::String]
|
2634
|
+
# Required. Name of the evaluation job that is going to be paused. Format:
|
2635
|
+
#
|
2636
|
+
# "projects/<var>\\{project_id}</var>/evaluationJobs/<var>\\{evaluation_job_id}</var>"
|
2637
|
+
#
|
2638
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2639
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
2640
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2641
|
+
#
|
2642
|
+
# @return [::Google::Protobuf::Empty]
|
2643
|
+
#
|
2644
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2645
|
+
#
|
2646
|
+
def pause_evaluation_job request, options = nil
|
2647
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2648
|
+
|
2649
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::PauseEvaluationJobRequest
|
2650
|
+
|
2651
|
+
# Converts hash and nil to an options object
|
2652
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2653
|
+
|
2654
|
+
# Customize the options with defaults
|
2655
|
+
metadata = @config.rpcs.pause_evaluation_job.metadata.to_h
|
2656
|
+
|
2657
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2658
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2659
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2660
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2661
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2662
|
+
|
2663
|
+
header_params = {
|
2664
|
+
"name" => request.name
|
2665
|
+
}
|
2666
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2667
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2668
|
+
|
2669
|
+
options.apply_defaults timeout: @config.rpcs.pause_evaluation_job.timeout,
|
2670
|
+
metadata: metadata,
|
2671
|
+
retry_policy: @config.rpcs.pause_evaluation_job.retry_policy
|
2672
|
+
options.apply_defaults metadata: @config.metadata,
|
2673
|
+
retry_policy: @config.retry_policy
|
2674
|
+
|
2675
|
+
@data_labeling_service_stub.call_rpc :pause_evaluation_job, request, options: options do |response, operation|
|
2676
|
+
yield response, operation if block_given?
|
2677
|
+
return response
|
2678
|
+
end
|
2679
|
+
rescue ::GRPC::BadStatus => e
|
2680
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2681
|
+
end
|
2682
|
+
|
2683
|
+
##
|
2684
|
+
# Resumes a paused evaluation job. A deleted evaluation job can't be resumed.
|
2685
|
+
# Resuming a running or scheduled evaluation job is a no-op.
|
2686
|
+
#
|
2687
|
+
# @overload resume_evaluation_job(request, options = nil)
|
2688
|
+
# Pass arguments to `resume_evaluation_job` via a request object, either of type
|
2689
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ResumeEvaluationJobRequest} or an equivalent Hash.
|
2690
|
+
#
|
2691
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::ResumeEvaluationJobRequest, ::Hash]
|
2692
|
+
# A request object representing the call parameters. Required. To specify no
|
2693
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2694
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2695
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2696
|
+
#
|
2697
|
+
# @overload resume_evaluation_job(name: nil)
|
2698
|
+
# Pass arguments to `resume_evaluation_job` via keyword arguments. Note that at
|
2699
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2700
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2701
|
+
#
|
2702
|
+
# @param name [::String]
|
2703
|
+
# Required. Name of the evaluation job that is going to be resumed. Format:
|
2704
|
+
#
|
2705
|
+
# "projects/<var>\\{project_id}</var>/evaluationJobs/<var>\\{evaluation_job_id}</var>"
|
2706
|
+
#
|
2707
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2708
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
2709
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2710
|
+
#
|
2711
|
+
# @return [::Google::Protobuf::Empty]
|
2712
|
+
#
|
2713
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2714
|
+
#
|
2715
|
+
def resume_evaluation_job request, options = nil
|
2716
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2717
|
+
|
2718
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ResumeEvaluationJobRequest
|
2719
|
+
|
2720
|
+
# Converts hash and nil to an options object
|
2721
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2722
|
+
|
2723
|
+
# Customize the options with defaults
|
2724
|
+
metadata = @config.rpcs.resume_evaluation_job.metadata.to_h
|
2725
|
+
|
2726
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2727
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2728
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2729
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2730
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2731
|
+
|
2732
|
+
header_params = {
|
2733
|
+
"name" => request.name
|
2734
|
+
}
|
2735
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2736
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2737
|
+
|
2738
|
+
options.apply_defaults timeout: @config.rpcs.resume_evaluation_job.timeout,
|
2739
|
+
metadata: metadata,
|
2740
|
+
retry_policy: @config.rpcs.resume_evaluation_job.retry_policy
|
2741
|
+
options.apply_defaults metadata: @config.metadata,
|
2742
|
+
retry_policy: @config.retry_policy
|
2743
|
+
|
2744
|
+
@data_labeling_service_stub.call_rpc :resume_evaluation_job, request, options: options do |response, operation|
|
2745
|
+
yield response, operation if block_given?
|
2746
|
+
return response
|
2747
|
+
end
|
2748
|
+
rescue ::GRPC::BadStatus => e
|
2749
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2750
|
+
end
|
2751
|
+
|
2752
|
+
##
|
2753
|
+
# Stops and deletes an evaluation job.
|
2754
|
+
#
|
2755
|
+
# @overload delete_evaluation_job(request, options = nil)
|
2756
|
+
# Pass arguments to `delete_evaluation_job` via a request object, either of type
|
2757
|
+
# {::Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest} or an equivalent Hash.
|
2758
|
+
#
|
2759
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest, ::Hash]
|
2760
|
+
# A request object representing the call parameters. Required. To specify no
|
2761
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2762
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2763
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2764
|
+
#
|
2765
|
+
# @overload delete_evaluation_job(name: nil)
|
2766
|
+
# Pass arguments to `delete_evaluation_job` via keyword arguments. Note that at
|
2767
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2768
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2769
|
+
#
|
2770
|
+
# @param name [::String]
|
2771
|
+
# Required. Name of the evaluation job that is going to be deleted. Format:
|
2772
|
+
#
|
2773
|
+
# "projects/<var>\\{project_id}</var>/evaluationJobs/<var>\\{evaluation_job_id}</var>"
|
2774
|
+
#
|
2775
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2776
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
2777
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2778
|
+
#
|
2779
|
+
# @return [::Google::Protobuf::Empty]
|
2780
|
+
#
|
2781
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2782
|
+
#
|
2783
|
+
def delete_evaluation_job request, options = nil
|
2784
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2785
|
+
|
2786
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest
|
2787
|
+
|
2788
|
+
# Converts hash and nil to an options object
|
2789
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2790
|
+
|
2791
|
+
# Customize the options with defaults
|
2792
|
+
metadata = @config.rpcs.delete_evaluation_job.metadata.to_h
|
2793
|
+
|
2794
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2795
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2796
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2797
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2798
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2799
|
+
|
2800
|
+
header_params = {
|
2801
|
+
"name" => request.name
|
2802
|
+
}
|
2803
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2804
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2805
|
+
|
2806
|
+
options.apply_defaults timeout: @config.rpcs.delete_evaluation_job.timeout,
|
2807
|
+
metadata: metadata,
|
2808
|
+
retry_policy: @config.rpcs.delete_evaluation_job.retry_policy
|
2809
|
+
options.apply_defaults metadata: @config.metadata,
|
2810
|
+
retry_policy: @config.retry_policy
|
2811
|
+
|
2812
|
+
@data_labeling_service_stub.call_rpc :delete_evaluation_job, request, options: options do |response, operation|
|
2813
|
+
yield response, operation if block_given?
|
2814
|
+
return response
|
2815
|
+
end
|
2816
|
+
rescue ::GRPC::BadStatus => e
|
2817
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2818
|
+
end
|
2819
|
+
|
2820
|
+
##
|
2821
|
+
# Lists all evaluation jobs within a project with possible filters.
|
2822
|
+
# Pagination is supported.
|
2823
|
+
#
|
2824
|
+
# @overload list_evaluation_jobs(request, options = nil)
|
2825
|
+
# Pass arguments to `list_evaluation_jobs` via a request object, either of type
|
2826
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListEvaluationJobsRequest} or an equivalent Hash.
|
2827
|
+
#
|
2828
|
+
# @param request [::Google::Cloud::DataLabeling::V1beta1::ListEvaluationJobsRequest, ::Hash]
|
2829
|
+
# A request object representing the call parameters. Required. To specify no
|
2830
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2831
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2832
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2833
|
+
#
|
2834
|
+
# @overload list_evaluation_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil)
|
2835
|
+
# Pass arguments to `list_evaluation_jobs` via keyword arguments. Note that at
|
2836
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2837
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2838
|
+
#
|
2839
|
+
# @param parent [::String]
|
2840
|
+
# Required. Evaluation job resource parent. Format:
|
2841
|
+
# "projects/<var>\\{project_id}</var>"
|
2842
|
+
# @param filter [::String]
|
2843
|
+
# Optional. You can filter the jobs to list by model_id (also known as
|
2844
|
+
# model_name, as described in
|
2845
|
+
# {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#model_version EvaluationJob.modelVersion}) or by
|
2846
|
+
# evaluation job state (as described in {::Google::Cloud::DataLabeling::V1beta1::EvaluationJob#state EvaluationJob.state}). To filter
|
2847
|
+
# by both criteria, use the `AND` operator or the `OR` operator. For example,
|
2848
|
+
# you can use the following string for your filter:
|
2849
|
+
# "evaluation<span>_</span>job.model_id = <var>\\{model_name}</var> AND
|
2850
|
+
# evaluation<span>_</span>job.state = <var>\\{evaluation_job_state}</var>"
|
2851
|
+
# @param page_size [::Integer]
|
2852
|
+
# Optional. Requested page size. Server may return fewer results than
|
2853
|
+
# requested. Default value is 100.
|
2854
|
+
# @param page_token [::String]
|
2855
|
+
# Optional. A token identifying a page of results for the server to return.
|
2856
|
+
# Typically obtained by the
|
2857
|
+
# {::Google::Cloud::DataLabeling::V1beta1::ListEvaluationJobsResponse#next_page_token nextPageToken} in the response
|
2858
|
+
# to the previous request. The request returns the first page if this is
|
2859
|
+
# empty.
|
2860
|
+
#
|
2861
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2862
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>]
|
2863
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2864
|
+
#
|
2865
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>]
|
2866
|
+
#
|
2867
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2868
|
+
#
|
2869
|
+
def list_evaluation_jobs request, options = nil
|
2870
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2871
|
+
|
2872
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListEvaluationJobsRequest
|
2873
|
+
|
2874
|
+
# Converts hash and nil to an options object
|
2875
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2876
|
+
|
2877
|
+
# Customize the options with defaults
|
2878
|
+
metadata = @config.rpcs.list_evaluation_jobs.metadata.to_h
|
2879
|
+
|
2880
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2881
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2882
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2883
|
+
gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
|
2884
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2885
|
+
|
2886
|
+
header_params = {
|
2887
|
+
"parent" => request.parent
|
2888
|
+
}
|
2889
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2890
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2891
|
+
|
2892
|
+
options.apply_defaults timeout: @config.rpcs.list_evaluation_jobs.timeout,
|
2893
|
+
metadata: metadata,
|
2894
|
+
retry_policy: @config.rpcs.list_evaluation_jobs.retry_policy
|
2895
|
+
options.apply_defaults metadata: @config.metadata,
|
2896
|
+
retry_policy: @config.retry_policy
|
2897
|
+
|
2898
|
+
@data_labeling_service_stub.call_rpc :list_evaluation_jobs, request, options: options do |response, operation|
|
2899
|
+
response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_evaluation_jobs, request, response, operation, options
|
2900
|
+
yield response, operation if block_given?
|
2901
|
+
return response
|
2902
|
+
end
|
2903
|
+
rescue ::GRPC::BadStatus => e
|
2904
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2905
|
+
end
|
2906
|
+
|
2907
|
+
##
|
2908
|
+
# Configuration class for the DataLabelingService API.
|
2909
|
+
#
|
2910
|
+
# This class represents the configuration for DataLabelingService,
|
2911
|
+
# providing control over timeouts, retry behavior, logging, transport
|
2912
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
2913
|
+
# applied individually to specific RPCs. See
|
2914
|
+
# {::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client::Configuration::Rpcs}
|
2915
|
+
# for a list of RPCs that can be configured independently.
|
2916
|
+
#
|
2917
|
+
# Configuration can be applied globally to all clients, or to a single client
|
2918
|
+
# on construction.
|
2919
|
+
#
|
2920
|
+
# # Examples
|
2921
|
+
#
|
2922
|
+
# To modify the global config, setting the timeout for create_dataset
|
2923
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
2924
|
+
#
|
2925
|
+
# ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.configure do |config|
|
2926
|
+
# config.timeout = 10.0
|
2927
|
+
# config.rpcs.create_dataset.timeout = 20.0
|
2928
|
+
# end
|
2929
|
+
#
|
2930
|
+
# To apply the above configuration only to a new client:
|
2931
|
+
#
|
2932
|
+
# client = ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new do |config|
|
2933
|
+
# config.timeout = 10.0
|
2934
|
+
# config.rpcs.create_dataset.timeout = 20.0
|
2935
|
+
# end
|
2936
|
+
#
|
2937
|
+
# @!attribute [rw] endpoint
|
2938
|
+
# The hostname or hostname:port of the service endpoint.
|
2939
|
+
# Defaults to `"datalabeling.googleapis.com"`.
|
2940
|
+
# @return [::String]
|
2941
|
+
# @!attribute [rw] credentials
|
2942
|
+
# Credentials to send with calls. You may provide any of the following types:
|
2943
|
+
# * (`String`) The path to a service account key file in JSON format
|
2944
|
+
# * (`Hash`) A service account key as a Hash
|
2945
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2946
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
2947
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2948
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
2949
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2950
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2951
|
+
# * (`nil`) indicating no credentials
|
2952
|
+
# @return [::Object]
|
2953
|
+
# @!attribute [rw] scope
|
2954
|
+
# The OAuth scopes
|
2955
|
+
# @return [::Array<::String>]
|
2956
|
+
# @!attribute [rw] lib_name
|
2957
|
+
# The library name as recorded in instrumentation and logging
|
2958
|
+
# @return [::String]
|
2959
|
+
# @!attribute [rw] lib_version
|
2960
|
+
# The library version as recorded in instrumentation and logging
|
2961
|
+
# @return [::String]
|
2962
|
+
# @!attribute [rw] channel_args
|
2963
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
2964
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
2965
|
+
# @return [::Hash]
|
2966
|
+
# @!attribute [rw] interceptors
|
2967
|
+
# An array of interceptors that are run before calls are executed.
|
2968
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
2969
|
+
# @!attribute [rw] timeout
|
2970
|
+
# The call timeout in seconds.
|
2971
|
+
# @return [::Numeric]
|
2972
|
+
# @!attribute [rw] metadata
|
2973
|
+
# Additional gRPC headers to be sent with the call.
|
2974
|
+
# @return [::Hash{::Symbol=>::String}]
|
2975
|
+
# @!attribute [rw] retry_policy
|
2976
|
+
# The retry policy. The value is a hash with the following keys:
|
2977
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2978
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2979
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2980
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2981
|
+
# trigger a retry.
|
2982
|
+
# @return [::Hash]
|
2983
|
+
# @!attribute [rw] quota_project
|
2984
|
+
# A separate project against which to charge quota.
|
2985
|
+
# @return [::String]
|
2986
|
+
#
|
2987
|
+
class Configuration
|
2988
|
+
extend ::Gapic::Config
|
2989
|
+
|
2990
|
+
config_attr :endpoint, "datalabeling.googleapis.com", ::String
|
2991
|
+
config_attr :credentials, nil do |value|
|
2992
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2993
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
2994
|
+
allowed.any? { |klass| klass === value }
|
2995
|
+
end
|
2996
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
2997
|
+
config_attr :lib_name, nil, ::String, nil
|
2998
|
+
config_attr :lib_version, nil, ::String, nil
|
2999
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
3000
|
+
config_attr :interceptors, nil, ::Array, nil
|
3001
|
+
config_attr :timeout, nil, ::Numeric, nil
|
3002
|
+
config_attr :metadata, nil, ::Hash, nil
|
3003
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
3004
|
+
config_attr :quota_project, nil, ::String, nil
|
3005
|
+
|
3006
|
+
# @private
|
3007
|
+
def initialize parent_config = nil
|
3008
|
+
@parent_config = parent_config unless parent_config.nil?
|
3009
|
+
|
3010
|
+
yield self if block_given?
|
3011
|
+
end
|
3012
|
+
|
3013
|
+
##
|
3014
|
+
# Configurations for individual RPCs
|
3015
|
+
# @return [Rpcs]
|
3016
|
+
#
|
3017
|
+
def rpcs
|
3018
|
+
@rpcs ||= begin
|
3019
|
+
parent_rpcs = nil
|
3020
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
|
3021
|
+
Rpcs.new parent_rpcs
|
3022
|
+
end
|
3023
|
+
end
|
3024
|
+
|
3025
|
+
##
|
3026
|
+
# Configuration RPC class for the DataLabelingService API.
|
3027
|
+
#
|
3028
|
+
# Includes fields providing the configuration for each RPC in this service.
|
3029
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
3030
|
+
# the following configuration fields:
|
3031
|
+
#
|
3032
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
|
3033
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
3034
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
3035
|
+
# include the following keys:
|
3036
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
3037
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
3038
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
3039
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
3040
|
+
# trigger a retry.
|
3041
|
+
#
|
3042
|
+
class Rpcs
|
3043
|
+
##
|
3044
|
+
# RPC-specific configuration for `create_dataset`
|
3045
|
+
# @return [::Gapic::Config::Method]
|
3046
|
+
#
|
3047
|
+
attr_reader :create_dataset
|
3048
|
+
##
|
3049
|
+
# RPC-specific configuration for `get_dataset`
|
3050
|
+
# @return [::Gapic::Config::Method]
|
3051
|
+
#
|
3052
|
+
attr_reader :get_dataset
|
3053
|
+
##
|
3054
|
+
# RPC-specific configuration for `list_datasets`
|
3055
|
+
# @return [::Gapic::Config::Method]
|
3056
|
+
#
|
3057
|
+
attr_reader :list_datasets
|
3058
|
+
##
|
3059
|
+
# RPC-specific configuration for `delete_dataset`
|
3060
|
+
# @return [::Gapic::Config::Method]
|
3061
|
+
#
|
3062
|
+
attr_reader :delete_dataset
|
3063
|
+
##
|
3064
|
+
# RPC-specific configuration for `import_data`
|
3065
|
+
# @return [::Gapic::Config::Method]
|
3066
|
+
#
|
3067
|
+
attr_reader :import_data
|
3068
|
+
##
|
3069
|
+
# RPC-specific configuration for `export_data`
|
3070
|
+
# @return [::Gapic::Config::Method]
|
3071
|
+
#
|
3072
|
+
attr_reader :export_data
|
3073
|
+
##
|
3074
|
+
# RPC-specific configuration for `get_data_item`
|
3075
|
+
# @return [::Gapic::Config::Method]
|
3076
|
+
#
|
3077
|
+
attr_reader :get_data_item
|
3078
|
+
##
|
3079
|
+
# RPC-specific configuration for `list_data_items`
|
3080
|
+
# @return [::Gapic::Config::Method]
|
3081
|
+
#
|
3082
|
+
attr_reader :list_data_items
|
3083
|
+
##
|
3084
|
+
# RPC-specific configuration for `get_annotated_dataset`
|
3085
|
+
# @return [::Gapic::Config::Method]
|
3086
|
+
#
|
3087
|
+
attr_reader :get_annotated_dataset
|
3088
|
+
##
|
3089
|
+
# RPC-specific configuration for `list_annotated_datasets`
|
3090
|
+
# @return [::Gapic::Config::Method]
|
3091
|
+
#
|
3092
|
+
attr_reader :list_annotated_datasets
|
3093
|
+
##
|
3094
|
+
# RPC-specific configuration for `delete_annotated_dataset`
|
3095
|
+
# @return [::Gapic::Config::Method]
|
3096
|
+
#
|
3097
|
+
attr_reader :delete_annotated_dataset
|
3098
|
+
##
|
3099
|
+
# RPC-specific configuration for `label_image`
|
3100
|
+
# @return [::Gapic::Config::Method]
|
3101
|
+
#
|
3102
|
+
attr_reader :label_image
|
3103
|
+
##
|
3104
|
+
# RPC-specific configuration for `label_video`
|
3105
|
+
# @return [::Gapic::Config::Method]
|
3106
|
+
#
|
3107
|
+
attr_reader :label_video
|
3108
|
+
##
|
3109
|
+
# RPC-specific configuration for `label_text`
|
3110
|
+
# @return [::Gapic::Config::Method]
|
3111
|
+
#
|
3112
|
+
attr_reader :label_text
|
3113
|
+
##
|
3114
|
+
# RPC-specific configuration for `get_example`
|
3115
|
+
# @return [::Gapic::Config::Method]
|
3116
|
+
#
|
3117
|
+
attr_reader :get_example
|
3118
|
+
##
|
3119
|
+
# RPC-specific configuration for `list_examples`
|
3120
|
+
# @return [::Gapic::Config::Method]
|
3121
|
+
#
|
3122
|
+
attr_reader :list_examples
|
3123
|
+
##
|
3124
|
+
# RPC-specific configuration for `create_annotation_spec_set`
|
3125
|
+
# @return [::Gapic::Config::Method]
|
3126
|
+
#
|
3127
|
+
attr_reader :create_annotation_spec_set
|
3128
|
+
##
|
3129
|
+
# RPC-specific configuration for `get_annotation_spec_set`
|
3130
|
+
# @return [::Gapic::Config::Method]
|
3131
|
+
#
|
3132
|
+
attr_reader :get_annotation_spec_set
|
3133
|
+
##
|
3134
|
+
# RPC-specific configuration for `list_annotation_spec_sets`
|
3135
|
+
# @return [::Gapic::Config::Method]
|
3136
|
+
#
|
3137
|
+
attr_reader :list_annotation_spec_sets
|
3138
|
+
##
|
3139
|
+
# RPC-specific configuration for `delete_annotation_spec_set`
|
3140
|
+
# @return [::Gapic::Config::Method]
|
3141
|
+
#
|
3142
|
+
attr_reader :delete_annotation_spec_set
|
3143
|
+
##
|
3144
|
+
# RPC-specific configuration for `create_instruction`
|
3145
|
+
# @return [::Gapic::Config::Method]
|
3146
|
+
#
|
3147
|
+
attr_reader :create_instruction
|
3148
|
+
##
|
3149
|
+
# RPC-specific configuration for `get_instruction`
|
3150
|
+
# @return [::Gapic::Config::Method]
|
3151
|
+
#
|
3152
|
+
attr_reader :get_instruction
|
3153
|
+
##
|
3154
|
+
# RPC-specific configuration for `list_instructions`
|
3155
|
+
# @return [::Gapic::Config::Method]
|
3156
|
+
#
|
3157
|
+
attr_reader :list_instructions
|
3158
|
+
##
|
3159
|
+
# RPC-specific configuration for `delete_instruction`
|
3160
|
+
# @return [::Gapic::Config::Method]
|
3161
|
+
#
|
3162
|
+
attr_reader :delete_instruction
|
3163
|
+
##
|
3164
|
+
# RPC-specific configuration for `get_evaluation`
|
3165
|
+
# @return [::Gapic::Config::Method]
|
3166
|
+
#
|
3167
|
+
attr_reader :get_evaluation
|
3168
|
+
##
|
3169
|
+
# RPC-specific configuration for `search_evaluations`
|
3170
|
+
# @return [::Gapic::Config::Method]
|
3171
|
+
#
|
3172
|
+
attr_reader :search_evaluations
|
3173
|
+
##
|
3174
|
+
# RPC-specific configuration for `search_example_comparisons`
|
3175
|
+
# @return [::Gapic::Config::Method]
|
3176
|
+
#
|
3177
|
+
attr_reader :search_example_comparisons
|
3178
|
+
##
|
3179
|
+
# RPC-specific configuration for `create_evaluation_job`
|
3180
|
+
# @return [::Gapic::Config::Method]
|
3181
|
+
#
|
3182
|
+
attr_reader :create_evaluation_job
|
3183
|
+
##
|
3184
|
+
# RPC-specific configuration for `update_evaluation_job`
|
3185
|
+
# @return [::Gapic::Config::Method]
|
3186
|
+
#
|
3187
|
+
attr_reader :update_evaluation_job
|
3188
|
+
##
|
3189
|
+
# RPC-specific configuration for `get_evaluation_job`
|
3190
|
+
# @return [::Gapic::Config::Method]
|
3191
|
+
#
|
3192
|
+
attr_reader :get_evaluation_job
|
3193
|
+
##
|
3194
|
+
# RPC-specific configuration for `pause_evaluation_job`
|
3195
|
+
# @return [::Gapic::Config::Method]
|
3196
|
+
#
|
3197
|
+
attr_reader :pause_evaluation_job
|
3198
|
+
##
|
3199
|
+
# RPC-specific configuration for `resume_evaluation_job`
|
3200
|
+
# @return [::Gapic::Config::Method]
|
3201
|
+
#
|
3202
|
+
attr_reader :resume_evaluation_job
|
3203
|
+
##
|
3204
|
+
# RPC-specific configuration for `delete_evaluation_job`
|
3205
|
+
# @return [::Gapic::Config::Method]
|
3206
|
+
#
|
3207
|
+
attr_reader :delete_evaluation_job
|
3208
|
+
##
|
3209
|
+
# RPC-specific configuration for `list_evaluation_jobs`
|
3210
|
+
# @return [::Gapic::Config::Method]
|
3211
|
+
#
|
3212
|
+
attr_reader :list_evaluation_jobs
|
3213
|
+
|
3214
|
+
# @private
|
3215
|
+
def initialize parent_rpcs = nil
|
3216
|
+
create_dataset_config = parent_rpcs&.create_dataset if parent_rpcs&.respond_to? :create_dataset
|
3217
|
+
@create_dataset = ::Gapic::Config::Method.new create_dataset_config
|
3218
|
+
get_dataset_config = parent_rpcs&.get_dataset if parent_rpcs&.respond_to? :get_dataset
|
3219
|
+
@get_dataset = ::Gapic::Config::Method.new get_dataset_config
|
3220
|
+
list_datasets_config = parent_rpcs&.list_datasets if parent_rpcs&.respond_to? :list_datasets
|
3221
|
+
@list_datasets = ::Gapic::Config::Method.new list_datasets_config
|
3222
|
+
delete_dataset_config = parent_rpcs&.delete_dataset if parent_rpcs&.respond_to? :delete_dataset
|
3223
|
+
@delete_dataset = ::Gapic::Config::Method.new delete_dataset_config
|
3224
|
+
import_data_config = parent_rpcs&.import_data if parent_rpcs&.respond_to? :import_data
|
3225
|
+
@import_data = ::Gapic::Config::Method.new import_data_config
|
3226
|
+
export_data_config = parent_rpcs&.export_data if parent_rpcs&.respond_to? :export_data
|
3227
|
+
@export_data = ::Gapic::Config::Method.new export_data_config
|
3228
|
+
get_data_item_config = parent_rpcs&.get_data_item if parent_rpcs&.respond_to? :get_data_item
|
3229
|
+
@get_data_item = ::Gapic::Config::Method.new get_data_item_config
|
3230
|
+
list_data_items_config = parent_rpcs&.list_data_items if parent_rpcs&.respond_to? :list_data_items
|
3231
|
+
@list_data_items = ::Gapic::Config::Method.new list_data_items_config
|
3232
|
+
get_annotated_dataset_config = parent_rpcs&.get_annotated_dataset if parent_rpcs&.respond_to? :get_annotated_dataset
|
3233
|
+
@get_annotated_dataset = ::Gapic::Config::Method.new get_annotated_dataset_config
|
3234
|
+
list_annotated_datasets_config = parent_rpcs&.list_annotated_datasets if parent_rpcs&.respond_to? :list_annotated_datasets
|
3235
|
+
@list_annotated_datasets = ::Gapic::Config::Method.new list_annotated_datasets_config
|
3236
|
+
delete_annotated_dataset_config = parent_rpcs&.delete_annotated_dataset if parent_rpcs&.respond_to? :delete_annotated_dataset
|
3237
|
+
@delete_annotated_dataset = ::Gapic::Config::Method.new delete_annotated_dataset_config
|
3238
|
+
label_image_config = parent_rpcs&.label_image if parent_rpcs&.respond_to? :label_image
|
3239
|
+
@label_image = ::Gapic::Config::Method.new label_image_config
|
3240
|
+
label_video_config = parent_rpcs&.label_video if parent_rpcs&.respond_to? :label_video
|
3241
|
+
@label_video = ::Gapic::Config::Method.new label_video_config
|
3242
|
+
label_text_config = parent_rpcs&.label_text if parent_rpcs&.respond_to? :label_text
|
3243
|
+
@label_text = ::Gapic::Config::Method.new label_text_config
|
3244
|
+
get_example_config = parent_rpcs&.get_example if parent_rpcs&.respond_to? :get_example
|
3245
|
+
@get_example = ::Gapic::Config::Method.new get_example_config
|
3246
|
+
list_examples_config = parent_rpcs&.list_examples if parent_rpcs&.respond_to? :list_examples
|
3247
|
+
@list_examples = ::Gapic::Config::Method.new list_examples_config
|
3248
|
+
create_annotation_spec_set_config = parent_rpcs&.create_annotation_spec_set if parent_rpcs&.respond_to? :create_annotation_spec_set
|
3249
|
+
@create_annotation_spec_set = ::Gapic::Config::Method.new create_annotation_spec_set_config
|
3250
|
+
get_annotation_spec_set_config = parent_rpcs&.get_annotation_spec_set if parent_rpcs&.respond_to? :get_annotation_spec_set
|
3251
|
+
@get_annotation_spec_set = ::Gapic::Config::Method.new get_annotation_spec_set_config
|
3252
|
+
list_annotation_spec_sets_config = parent_rpcs&.list_annotation_spec_sets if parent_rpcs&.respond_to? :list_annotation_spec_sets
|
3253
|
+
@list_annotation_spec_sets = ::Gapic::Config::Method.new list_annotation_spec_sets_config
|
3254
|
+
delete_annotation_spec_set_config = parent_rpcs&.delete_annotation_spec_set if parent_rpcs&.respond_to? :delete_annotation_spec_set
|
3255
|
+
@delete_annotation_spec_set = ::Gapic::Config::Method.new delete_annotation_spec_set_config
|
3256
|
+
create_instruction_config = parent_rpcs&.create_instruction if parent_rpcs&.respond_to? :create_instruction
|
3257
|
+
@create_instruction = ::Gapic::Config::Method.new create_instruction_config
|
3258
|
+
get_instruction_config = parent_rpcs&.get_instruction if parent_rpcs&.respond_to? :get_instruction
|
3259
|
+
@get_instruction = ::Gapic::Config::Method.new get_instruction_config
|
3260
|
+
list_instructions_config = parent_rpcs&.list_instructions if parent_rpcs&.respond_to? :list_instructions
|
3261
|
+
@list_instructions = ::Gapic::Config::Method.new list_instructions_config
|
3262
|
+
delete_instruction_config = parent_rpcs&.delete_instruction if parent_rpcs&.respond_to? :delete_instruction
|
3263
|
+
@delete_instruction = ::Gapic::Config::Method.new delete_instruction_config
|
3264
|
+
get_evaluation_config = parent_rpcs&.get_evaluation if parent_rpcs&.respond_to? :get_evaluation
|
3265
|
+
@get_evaluation = ::Gapic::Config::Method.new get_evaluation_config
|
3266
|
+
search_evaluations_config = parent_rpcs&.search_evaluations if parent_rpcs&.respond_to? :search_evaluations
|
3267
|
+
@search_evaluations = ::Gapic::Config::Method.new search_evaluations_config
|
3268
|
+
search_example_comparisons_config = parent_rpcs&.search_example_comparisons if parent_rpcs&.respond_to? :search_example_comparisons
|
3269
|
+
@search_example_comparisons = ::Gapic::Config::Method.new search_example_comparisons_config
|
3270
|
+
create_evaluation_job_config = parent_rpcs&.create_evaluation_job if parent_rpcs&.respond_to? :create_evaluation_job
|
3271
|
+
@create_evaluation_job = ::Gapic::Config::Method.new create_evaluation_job_config
|
3272
|
+
update_evaluation_job_config = parent_rpcs&.update_evaluation_job if parent_rpcs&.respond_to? :update_evaluation_job
|
3273
|
+
@update_evaluation_job = ::Gapic::Config::Method.new update_evaluation_job_config
|
3274
|
+
get_evaluation_job_config = parent_rpcs&.get_evaluation_job if parent_rpcs&.respond_to? :get_evaluation_job
|
3275
|
+
@get_evaluation_job = ::Gapic::Config::Method.new get_evaluation_job_config
|
3276
|
+
pause_evaluation_job_config = parent_rpcs&.pause_evaluation_job if parent_rpcs&.respond_to? :pause_evaluation_job
|
3277
|
+
@pause_evaluation_job = ::Gapic::Config::Method.new pause_evaluation_job_config
|
3278
|
+
resume_evaluation_job_config = parent_rpcs&.resume_evaluation_job if parent_rpcs&.respond_to? :resume_evaluation_job
|
3279
|
+
@resume_evaluation_job = ::Gapic::Config::Method.new resume_evaluation_job_config
|
3280
|
+
delete_evaluation_job_config = parent_rpcs&.delete_evaluation_job if parent_rpcs&.respond_to? :delete_evaluation_job
|
3281
|
+
@delete_evaluation_job = ::Gapic::Config::Method.new delete_evaluation_job_config
|
3282
|
+
list_evaluation_jobs_config = parent_rpcs&.list_evaluation_jobs if parent_rpcs&.respond_to? :list_evaluation_jobs
|
3283
|
+
@list_evaluation_jobs = ::Gapic::Config::Method.new list_evaluation_jobs_config
|
3284
|
+
|
3285
|
+
yield self if block_given?
|
3286
|
+
end
|
3287
|
+
end
|
3288
|
+
end
|
3289
|
+
end
|
3290
|
+
end
|
3291
|
+
end
|
3292
|
+
end
|
3293
|
+
end
|
3294
|
+
end
|