Class: Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client
- Inherits:
-
Object
- Object
- Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb
Overview
Client for the DataLabelingService service.
Service for the AI Platform Data Labeling API.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#operations_client ⇒ ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the DataLabelingService Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the DataLabelingService Client instance.
-
#create_annotation_spec_set(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
Creates an annotation spec set by providing a set of labels.
-
#create_dataset(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::Dataset
Creates dataset.
-
#create_evaluation_job(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Creates an evaluation job.
-
#create_instruction(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates an instruction for how data should be labeled.
-
#delete_annotated_dataset(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes an annotated dataset by resource name.
-
#delete_annotation_spec_set(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes an annotation spec set by resource name.
-
#delete_dataset(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a dataset by resource name.
-
#delete_evaluation_job(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Stops and deletes an evaluation job.
-
#delete_instruction(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes an instruction object by resource name.
-
#export_data(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Exports data and annotations from dataset.
-
#get_annotated_dataset(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset
Gets an annotated dataset by resource name.
-
#get_annotation_spec_set(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
Gets an annotation spec set by resource name.
-
#get_data_item(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::DataItem
Gets a data item in a dataset by resource name.
-
#get_dataset(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::Dataset
Gets dataset by resource name.
-
#get_evaluation(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::Evaluation
Gets an evaluation by resource name (to search, use projects.evaluations.search).
-
#get_evaluation_job(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Gets an evaluation job by resource name.
-
#get_example(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::Example
Gets an example by resource name, including both data and annotation.
-
#get_instruction(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::Instruction
Gets an instruction by resource name.
-
#import_data(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Imports data into dataset based on source locations defined in request.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new DataLabelingService client object.
-
#label_image(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Starts a labeling task for image.
-
#label_text(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Starts a labeling task for text.
-
#label_video(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Starts a labeling task for video.
-
#list_annotated_datasets(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>
Lists annotated datasets for a dataset.
-
#list_annotation_spec_sets(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>
Lists annotation spec sets for a project.
-
#list_data_items(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>
Lists data items in a dataset.
-
#list_datasets(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>
Lists datasets under a project.
-
#list_evaluation_jobs(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>
Lists all evaluation jobs within a project with possible filters.
-
#list_examples(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>
Lists examples in an annotated dataset.
-
#list_instructions(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>
Lists instructions for a project.
-
#pause_evaluation_job(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Pauses an evaluation job.
-
#resume_evaluation_job(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Resumes a paused evaluation job.
-
#search_evaluations(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>
Searches evaluations within a project.
-
#search_example_comparisons(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>
Searches example comparisons from an evaluation.
-
#update_evaluation_job(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Updates an evaluation job.
Methods included from Paths
#annotated_dataset_path, #annotation_spec_set_path, #data_item_path, #dataset_path, #evaluation_job_path, #evaluation_path, #example_path, #instruction_path, #project_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new DataLabelingService client object.
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 238 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/datalabeling/v1beta1/data_labeling_service_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint && !@config.endpoint.split(".").first.include?("-") credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = Operations.new do |config| config.credentials = credentials config.endpoint = @config.endpoint end @data_labeling_service_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Stub, credentials: credentials, endpoint: @config.endpoint, channel_args: @config.channel_args, interceptors: @config.interceptors ) end |
Instance Attribute Details
#operations_client ⇒ ::Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Operations (readonly)
Get the associated client for long-running operations.
284 285 286 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 284 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the DataLabelingService Client class.
See Configuration for a description of the configuration fields.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 56 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "DataLabeling", "V1beta1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.create_dataset.timeout = 30.0 default_config.rpcs.get_dataset.timeout = 30.0 default_config.rpcs.get_dataset.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.list_datasets.timeout = 30.0 default_config.rpcs.list_datasets.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.delete_dataset.timeout = 30.0 default_config.rpcs.delete_dataset.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.import_data.timeout = 30.0 default_config.rpcs.export_data.timeout = 30.0 default_config.rpcs.export_data.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.get_data_item.timeout = 30.0 default_config.rpcs.get_data_item.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.list_data_items.timeout = 30.0 default_config.rpcs.list_data_items.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.get_annotated_dataset.timeout = 30.0 default_config.rpcs.get_annotated_dataset.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.list_annotated_datasets.timeout = 30.0 default_config.rpcs.list_annotated_datasets.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.label_image.timeout = 30.0 default_config.rpcs.label_video.timeout = 30.0 default_config.rpcs.label_text.timeout = 30.0 default_config.rpcs.get_example.timeout = 30.0 default_config.rpcs.get_example.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.list_examples.timeout = 30.0 default_config.rpcs.list_examples.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.create_annotation_spec_set.timeout = 30.0 default_config.rpcs.get_annotation_spec_set.timeout = 30.0 default_config.rpcs.get_annotation_spec_set.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.list_annotation_spec_sets.timeout = 30.0 default_config.rpcs.list_annotation_spec_sets.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.delete_annotation_spec_set.timeout = 30.0 default_config.rpcs.delete_annotation_spec_set.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.create_instruction.timeout = 30.0 default_config.rpcs.get_instruction.timeout = 30.0 default_config.rpcs.get_instruction.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.list_instructions.timeout = 30.0 default_config.rpcs.list_instructions.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.delete_instruction.timeout = 30.0 default_config.rpcs.delete_instruction.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.get_evaluation.timeout = 30.0 default_config.rpcs.get_evaluation.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.search_evaluations.timeout = 30.0 default_config.rpcs.search_evaluations.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.search_example_comparisons.timeout = 30.0 default_config.rpcs.create_evaluation_job.timeout = 30.0 default_config.rpcs.update_evaluation_job.timeout = 30.0 default_config.rpcs.get_evaluation_job.timeout = 30.0 default_config.rpcs.get_evaluation_job.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.pause_evaluation_job.timeout = 30.0 default_config.rpcs.resume_evaluation_job.timeout = 30.0 default_config.rpcs.delete_evaluation_job.timeout = 30.0 default_config.rpcs.delete_evaluation_job.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config.rpcs.list_evaluation_jobs.timeout = 30.0 default_config.rpcs.list_evaluation_jobs.retry_policy = { initial_delay: 0.1, max_delay: 30.0, multiplier: 1.3, retry_codes: [4, 14] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the DataLabelingService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
217 218 219 220 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 217 def configure yield @config if block_given? @config end |
#create_annotation_spec_set(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet #create_annotation_spec_set(parent: nil, annotation_spec_set: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
Creates an annotation spec set by providing a set of labels.
1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 1915 def create_annotation_spec_set request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::CreateAnnotationSpecSetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_annotation_spec_set..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_annotation_spec_set.timeout, metadata: , retry_policy: @config.rpcs.create_annotation_spec_set.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :create_annotation_spec_set, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_dataset(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::Dataset #create_dataset(parent: nil, dataset: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::Dataset
Creates dataset. If success return a Dataset resource.
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 335 def create_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::CreateDatasetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_dataset..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_dataset.timeout, metadata: , retry_policy: @config.rpcs.create_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :create_dataset, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_evaluation_job(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob #create_evaluation_job(parent: nil, job: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Creates an evaluation job.
2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2983 def create_evaluation_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::CreateEvaluationJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_evaluation_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_evaluation_job.timeout, metadata: , retry_policy: @config.rpcs.create_evaluation_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :create_evaluation_job, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_instruction(request, options = nil) ⇒ ::Gapic::Operation #create_instruction(parent: nil, instruction: nil) ⇒ ::Gapic::Operation
Creates an instruction for how data should be labeled.
2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2286 def create_instruction request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::CreateInstructionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_instruction..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_instruction.timeout, metadata: , retry_policy: @config.rpcs.create_instruction.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :create_instruction, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_annotated_dataset(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_annotated_dataset(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes an annotated dataset by resource name.
1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 1291 def delete_annotated_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_annotated_dataset..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_annotated_dataset.timeout, metadata: , retry_policy: @config.rpcs.delete_annotated_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :delete_annotated_dataset, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_annotation_spec_set(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_annotation_spec_set(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes an annotation spec set by resource name.
2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2191 def delete_annotation_spec_set request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_annotation_spec_set..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_annotation_spec_set.timeout, metadata: , retry_policy: @config.rpcs.delete_annotation_spec_set.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :delete_annotation_spec_set, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_dataset(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_dataset(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a dataset by resource name.
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 611 def delete_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::DeleteDatasetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_dataset..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_dataset.timeout, metadata: , retry_policy: @config.rpcs.delete_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :delete_dataset, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_evaluation_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_evaluation_job(name: nil) ⇒ ::Google::Protobuf::Empty
Stops and deletes an evaluation job.
3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 3433 def delete_evaluation_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_evaluation_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_evaluation_job.timeout, metadata: , retry_policy: @config.rpcs.delete_evaluation_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :delete_evaluation_job, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_instruction(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_instruction(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes an instruction object by resource name.
2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2563 def delete_instruction request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_instruction..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_instruction.timeout, metadata: , retry_policy: @config.rpcs.delete_instruction.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :delete_instruction, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#export_data(request, options = nil) ⇒ ::Gapic::Operation #export_data(name: nil, annotated_dataset: nil, filter: nil, output_config: nil, user_email_address: nil) ⇒ ::Gapic::Operation
Exports data and annotations from dataset.
820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 820 def export_data request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ExportDataRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.export_data..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.export_data.timeout, metadata: , retry_policy: @config.rpcs.export_data.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :export_data, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_annotated_dataset(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset #get_annotated_dataset(name: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset
Gets an annotated dataset by resource name.
1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 1100 def get_annotated_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetAnnotatedDatasetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_annotated_dataset..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_annotated_dataset.timeout, metadata: , retry_policy: @config.rpcs.get_annotated_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :get_annotated_dataset, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_annotation_spec_set(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet #get_annotation_spec_set(name: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet
Gets an annotation spec set by resource name.
2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2001 def get_annotation_spec_set request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetAnnotationSpecSetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_annotation_spec_set..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_annotation_spec_set.timeout, metadata: , retry_policy: @config.rpcs.get_annotation_spec_set.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :get_annotation_spec_set, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_data_item(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::DataItem #get_data_item(name: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::DataItem
Gets a data item in a dataset by resource name. This API can be called after data are imported into dataset.
908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 908 def get_data_item request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetDataItemRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_data_item..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_data_item.timeout, metadata: , retry_policy: @config.rpcs.get_data_item.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :get_data_item, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_dataset(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::Dataset #get_dataset(name: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::Dataset
Gets dataset by resource name.
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 421 def get_dataset request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetDatasetRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_dataset..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_dataset.timeout, metadata: , retry_policy: @config.rpcs.get_dataset.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :get_dataset, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_evaluation(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::Evaluation #get_evaluation(name: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::Evaluation
Gets an evaluation by resource name (to search, use projects.evaluations.search).
2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2651 def get_evaluation request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetEvaluationRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_evaluation..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_evaluation.timeout, metadata: , retry_policy: @config.rpcs.get_evaluation.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :get_evaluation, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_evaluation_job(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob #get_evaluation_job(name: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Gets an evaluation job by resource name.
3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 3170 def get_evaluation_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetEvaluationJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_evaluation_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_evaluation_job.timeout, metadata: , retry_policy: @config.rpcs.get_evaluation_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :get_evaluation_job, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_example(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::Example #get_example(name: nil, filter: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::Example
Gets an example by resource name, including both data and annotation.
1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 1719 def get_example request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetExampleRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_example..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_example.timeout, metadata: , retry_policy: @config.rpcs.get_example.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :get_example, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_instruction(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::Instruction #get_instruction(name: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::Instruction
Gets an instruction by resource name.
2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2373 def get_instruction request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::GetInstructionRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_instruction..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_instruction.timeout, metadata: , retry_policy: @config.rpcs.get_instruction.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :get_instruction, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#import_data(request, options = nil) ⇒ ::Gapic::Operation #import_data(name: nil, input_config: nil, user_email_address: nil) ⇒ ::Gapic::Operation
Imports data into dataset based on source locations defined in request. It can be called multiple times for the same dataset. Each dataset can only have one long running operation running on it. For example, no labeling task (also long running operation) can be started while importing is still ongoing. Vice versa.
713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 713 def import_data request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ImportDataRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.import_data..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.import_data.timeout, metadata: , retry_policy: @config.rpcs.import_data.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :import_data, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#label_image(request, options = nil) ⇒ ::Gapic::Operation #label_image(image_classification_config: nil, bounding_poly_config: nil, polyline_config: nil, segmentation_config: nil, parent: nil, basic_config: nil, feature: nil) ⇒ ::Gapic::Operation
Starts a labeling task for image. The type of image labeling task is configured by feature in the request.
1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 1405 def label_image request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::LabelImageRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.label_image..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.label_image.timeout, metadata: , retry_policy: @config.rpcs.label_image.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :label_image, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#label_text(request, options = nil) ⇒ ::Gapic::Operation #label_text(text_classification_config: nil, text_entity_extraction_config: nil, parent: nil, basic_config: nil, feature: nil) ⇒ ::Gapic::Operation
Starts a labeling task for text. The type of text labeling task is configured by feature in the request.
1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 1627 def label_text request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::LabelTextRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.label_text..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.label_text.timeout, metadata: , retry_policy: @config.rpcs.label_text.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :label_text, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#label_video(request, options = nil) ⇒ ::Gapic::Operation #label_video(video_classification_config: nil, object_detection_config: nil, object_tracking_config: nil, event_config: nil, parent: nil, basic_config: nil, feature: nil) ⇒ ::Gapic::Operation
Starts a labeling task for video. The type of video labeling task is configured by feature in the request.
1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 1520 def label_video request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.label_video..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.label_video.timeout, metadata: , retry_policy: @config.rpcs.label_video.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :label_video, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_annotated_datasets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset> #list_annotated_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset>
Lists annotated datasets for a dataset. Pagination is supported.
1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 1203 def list_annotated_datasets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListAnnotatedDatasetsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_annotated_datasets..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_annotated_datasets.timeout, metadata: , retry_policy: @config.rpcs.list_annotated_datasets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :list_annotated_datasets, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_annotated_datasets, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_annotation_spec_sets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet> #list_annotation_spec_sets(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet>
Lists annotation spec sets for a project. Pagination is supported.
2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2104 def list_annotation_spec_sets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListAnnotationSpecSetsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_annotation_spec_sets..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_annotation_spec_sets.timeout, metadata: , retry_policy: @config.rpcs.list_annotation_spec_sets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :list_annotation_spec_sets, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_annotation_spec_sets, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_data_items(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem> #list_data_items(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::DataItem>
Lists data items in a dataset. This API can be called after data are imported into dataset. Pagination is supported.
1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 1012 def list_data_items request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListDataItemsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_data_items..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_data_items.timeout, metadata: , retry_policy: @config.rpcs.list_data_items.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :list_data_items, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_data_items, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_datasets(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset> #list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Dataset>
Lists datasets under a project. Pagination is supported.
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 524 def list_datasets request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListDatasetsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_datasets..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_datasets.timeout, metadata: , retry_policy: @config.rpcs.list_datasets.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :list_datasets, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_datasets, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_evaluation_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob> #list_evaluation_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::EvaluationJob>
Lists all evaluation jobs within a project with possible filters. Pagination is supported.
3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 3544 def list_evaluation_jobs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListEvaluationJobsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_evaluation_jobs..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_evaluation_jobs.timeout, metadata: , retry_policy: @config.rpcs.list_evaluation_jobs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :list_evaluation_jobs, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_evaluation_jobs, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_examples(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example> #list_examples(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Example>
Lists examples in an annotated dataset. Pagination is supported.
1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 1824 def list_examples request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListExamplesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_examples..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_examples.timeout, metadata: , retry_policy: @config.rpcs.list_examples.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :list_examples, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_examples, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_instructions(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction> #list_instructions(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Instruction>
Lists instructions for a project. Pagination is supported.
2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2476 def list_instructions request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ListInstructionsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_instructions..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_instructions.timeout, metadata: , retry_policy: @config.rpcs.list_instructions.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :list_instructions, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :list_instructions, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#pause_evaluation_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #pause_evaluation_job(name: nil) ⇒ ::Google::Protobuf::Empty
Pauses an evaluation job. Pausing an evaluation job that is already in a
PAUSED state is a no-op.
3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 3258 def pause_evaluation_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::PauseEvaluationJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.pause_evaluation_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.pause_evaluation_job.timeout, metadata: , retry_policy: @config.rpcs.pause_evaluation_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :pause_evaluation_job, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#resume_evaluation_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #resume_evaluation_job(name: nil) ⇒ ::Google::Protobuf::Empty
Resumes a paused evaluation job. A deleted evaluation job can't be resumed. Resuming a running or scheduled evaluation job is a no-op.
3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 3346 def resume_evaluation_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::ResumeEvaluationJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.resume_evaluation_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.resume_evaluation_job.timeout, metadata: , retry_policy: @config.rpcs.resume_evaluation_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :resume_evaluation_job, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#search_evaluations(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation> #search_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::Evaluation>
Searches evaluations within a project.
2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2786 def search_evaluations request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::SearchEvaluationsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.search_evaluations..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.search_evaluations.timeout, metadata: , retry_policy: @config.rpcs.search_evaluations.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :search_evaluations, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :search_evaluations, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#search_example_comparisons(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison> #search_example_comparisons(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison>
Searches example comparisons from an evaluation. The return format is a list of example comparisons that show ground truth and prediction(s) for a single input. Search by providing an evaluation ID.
2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 2894 def search_example_comparisons request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.search_example_comparisons..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.search_example_comparisons.timeout, metadata: , retry_policy: @config.rpcs.search_example_comparisons.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :search_example_comparisons, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_labeling_service_stub, :search_example_comparisons, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_evaluation_job(request, options = nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob #update_evaluation_job(evaluation_job: nil, update_mask: nil) ⇒ ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob
Updates an evaluation job. You can only update certain fields of the job's
EvaluationJobConfig: humanAnnotationConfig.instruction,
exampleCount, and exampleSamplePercentage.
If you want to change any other aspect of the evaluation job, you must delete the job and create a new one.
3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 |
# File 'lib/google/cloud/data_labeling/v1beta1/data_labeling_service/client.rb', line 3083 def update_evaluation_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataLabeling::V1beta1::UpdateEvaluationJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_evaluation_job..to_h # Set x-goog-api-client and x-goog-user-project headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.evaluation_job&.name header_params["evaluation_job.name"] = request.evaluation_job.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_evaluation_job.timeout, metadata: , retry_policy: @config.rpcs.update_evaluation_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_labeling_service_stub.call_rpc :update_evaluation_job, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |