From f83cf6638ea5d325b433216adda3976ab5485db4 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Fri, 18 Sep 2026 16:37:28 -0400 Subject: [PATCH 1/3] feat!: Replace google-cloud-automl-v1beta1 with a tombstone --- google-cloud-automl-v1beta1/.gitignore | 20 - .../.repo-metadata.json | 20 - google-cloud-automl-v1beta1/.rubocop.yml | 33 - google-cloud-automl-v1beta1/.toys.rb | 28 - google-cloud-automl-v1beta1/.yardopts | 5 +- google-cloud-automl-v1beta1/AUTHENTICATION.md | 122 - google-cloud-automl-v1beta1/CHANGELOG.md | 263 -- google-cloud-automl-v1beta1/Gemfile | 15 - google-cloud-automl-v1beta1/Gemfile.lock | 300 -- google-cloud-automl-v1beta1/LICENSE.md | 4 +- google-cloud-automl-v1beta1/README.md | 152 +- google-cloud-automl-v1beta1/Rakefile | 151 - .../gapic_metadata.json | 157 - .../google-cloud-automl-v1beta1.gemspec | 41 +- .../lib/google-cloud-automl-v1beta1.rb | 21 - .../lib/google/cloud/automl/v1beta1.rb | 46 - .../google/cloud/automl/v1beta1/_helpers.rb | 26 - .../automl/v1beta1/annotation_payload_pb.rb | 28 - .../automl/v1beta1/annotation_spec_pb.rb | 23 - .../lib/google/cloud/automl/v1beta1/automl.rb | 69 - .../cloud/automl/v1beta1/automl/client.rb | 2985 ----------------- .../automl/v1beta1/automl/credentials.rb | 51 - .../cloud/automl/v1beta1/automl/operations.rb | 851 ----- .../cloud/automl/v1beta1/automl/paths.rb | 174 - .../cloud/automl/v1beta1/automl/rest.rb | 66 - .../automl/v1beta1/automl/rest/client.rb | 2774 --------------- .../automl/v1beta1/automl/rest/operations.rb | 1095 ------ .../v1beta1/automl/rest/service_stub.rb | 1556 --------- .../cloud/automl/v1beta1/classification_pb.rb | 29 - .../cloud/automl/v1beta1/column_spec_pb.rb | 26 - .../cloud/automl/v1beta1/data_items_pb.rb | 35 - .../cloud/automl/v1beta1/data_stats_pb.rb | 32 - .../cloud/automl/v1beta1/data_types_pb.rb | 23 - .../google/cloud/automl/v1beta1/dataset_pb.rb | 29 - .../cloud/automl/v1beta1/detection_pb.rb | 29 - .../cloud/automl/v1beta1/geometry_pb.rb | 22 - .../google/cloud/automl/v1beta1/image_pb.rb | 29 - .../lib/google/cloud/automl/v1beta1/io_pb.rb | 32 - .../automl/v1beta1/model_evaluation_pb.rb | 31 - .../google/cloud/automl/v1beta1/model_pb.rb | 30 - .../cloud/automl/v1beta1/operations_pb.rb | 40 - .../automl/v1beta1/prediction_service.rb | 59 - .../v1beta1/prediction_service/client.rb | 727 ---- .../v1beta1/prediction_service/credentials.rb | 51 - .../v1beta1/prediction_service/operations.rb | 851 ----- .../v1beta1/prediction_service/paths.rb | 52 - .../automl/v1beta1/prediction_service/rest.rb | 56 - .../v1beta1/prediction_service/rest/client.rb | 670 ---- .../prediction_service/rest/operations.rb | 1095 ------ .../prediction_service/rest/service_stub.rb | 205 -- .../automl/v1beta1/prediction_service_pb.rb | 34 - .../v1beta1/prediction_service_services_pb.rb | 79 - .../google/cloud/automl/v1beta1/ranges_pb.rb | 21 - .../cloud/automl/v1beta1/regression_pb.rb | 21 - .../lib/google/cloud/automl/v1beta1/rest.rb | 38 - .../google/cloud/automl/v1beta1/service_pb.rb | 66 - .../automl/v1beta1/service_services_pb.rb | 163 - .../cloud/automl/v1beta1/table_spec_pb.rb | 24 - .../google/cloud/automl/v1beta1/tables_pb.rb | 34 - .../cloud/automl/v1beta1/temporal_pb.rb | 23 - .../automl/v1beta1/text_extraction_pb.rb | 25 - .../google/cloud/automl/v1beta1/text_pb.rb | 28 - .../cloud/automl/v1beta1/text_segment_pb.rb | 21 - .../cloud/automl/v1beta1/text_sentiment_pb.rb | 24 - .../cloud/automl/v1beta1/translation_pb.rb | 27 - .../google/cloud/automl/v1beta1/version.rb | 28 - .../google/cloud/automl/v1beta1/video_pb.rb | 26 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../automl/v1beta1/annotation_payload.rb | 86 - .../cloud/automl/v1beta1/annotation_spec.rb | 46 - .../cloud/automl/v1beta1/classification.rb | 235 -- .../cloud/automl/v1beta1/column_spec.rb | 77 - .../google/cloud/automl/v1beta1/data_items.rb | 239 -- .../google/cloud/automl/v1beta1/data_stats.rb | 239 -- .../google/cloud/automl/v1beta1/data_types.rb | 124 - .../google/cloud/automl/v1beta1/dataset.rb | 102 - .../google/cloud/automl/v1beta1/detection.rb | 152 - .../google/cloud/automl/v1beta1/geometry.rb | 53 - .../google/cloud/automl/v1beta1/image.rb | 205 -- .../google/cloud/automl/v1beta1/io.rb | 1205 ------- .../google/cloud/automl/v1beta1/model.rb | 113 - .../cloud/automl/v1beta1/model_evaluation.rb | 117 - .../google/cloud/automl/v1beta1/operations.rb | 232 -- .../automl/v1beta1/prediction_service.rb | 238 -- .../google/cloud/automl/v1beta1/ranges.rb | 38 - .../google/cloud/automl/v1beta1/regression.rb | 48 - .../google/cloud/automl/v1beta1/service.rb | 452 --- .../google/cloud/automl/v1beta1/table_spec.rb | 75 - .../google/cloud/automl/v1beta1/tables.rb | 304 -- .../google/cloud/automl/v1beta1/temporal.rb | 40 - .../google/cloud/automl/v1beta1/text.rb | 84 - .../cloud/automl/v1beta1/text_extraction.rb | 73 - .../cloud/automl/v1beta1/text_segment.rb | 44 - .../cloud/automl/v1beta1/text_sentiment.rb | 87 - .../cloud/automl/v1beta1/translation.rb | 79 - .../google/cloud/automl/v1beta1/video.rb | 51 - .../google/longrunning/operations.rb | 191 -- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 128 - .../proto_docs/google/rpc/status.rb | 48 - google-cloud-automl-v1beta1/snippets/Gemfile | 32 - .../snippets/automl/create_dataset.rb | 47 - .../snippets/automl/create_model.rb | 54 - .../snippets/automl/delete_dataset.rb | 54 - .../snippets/automl/delete_model.rb | 54 - .../snippets/automl/deploy_model.rb | 54 - .../snippets/automl/export_data.rb | 54 - .../automl/export_evaluated_examples.rb | 54 - .../snippets/automl/export_model.rb | 54 - .../snippets/automl/get_annotation_spec.rb | 47 - .../snippets/automl/get_column_spec.rb | 47 - .../snippets/automl/get_dataset.rb | 47 - .../snippets/automl/get_model.rb | 47 - .../snippets/automl/get_model_evaluation.rb | 47 - .../snippets/automl/get_table_spec.rb | 47 - .../snippets/automl/import_data.rb | 54 - .../snippets/automl/list_column_specs.rb | 51 - .../snippets/automl/list_datasets.rb | 51 - .../snippets/automl/list_model_evaluations.rb | 51 - .../snippets/automl/list_models.rb | 51 - .../snippets/automl/list_table_specs.rb | 51 - .../snippets/automl/undeploy_model.rb | 54 - .../snippets/automl/update_column_spec.rb | 47 - .../snippets/automl/update_dataset.rb | 47 - .../snippets/automl/update_table_spec.rb | 47 - .../prediction_service/batch_predict.rb | 54 - .../snippets/prediction_service/predict.rb | 47 - ..._metadata_google.cloud.automl.v1beta1.json | 1055 ------ .../automl/v1beta1/automl_operations_test.rb | 400 --- .../cloud/automl/v1beta1/automl_paths_test.rb | 127 - .../cloud/automl/v1beta1/automl_rest_test.rb | 1424 -------- .../cloud/automl/v1beta1/automl_test.rb | 1639 --------- .../prediction_service_operations_test.rb | 400 --- .../v1beta1/prediction_service_paths_test.rb | 55 - .../v1beta1/prediction_service_rest_test.rb | 212 -- .../automl/v1beta1/prediction_service_test.rb | 249 -- google-cloud-automl-v1beta1/test/helper.rb | 35 - librarian.yaml | 11 - 146 files changed, 26 insertions(+), 29635 deletions(-) delete mode 100644 google-cloud-automl-v1beta1/.gitignore delete mode 100644 google-cloud-automl-v1beta1/.repo-metadata.json delete mode 100644 google-cloud-automl-v1beta1/.rubocop.yml delete mode 100644 google-cloud-automl-v1beta1/.toys.rb delete mode 100644 google-cloud-automl-v1beta1/AUTHENTICATION.md delete mode 100644 google-cloud-automl-v1beta1/CHANGELOG.md delete mode 100644 google-cloud-automl-v1beta1/Gemfile delete mode 100644 google-cloud-automl-v1beta1/Gemfile.lock delete mode 100644 google-cloud-automl-v1beta1/gapic_metadata.json delete mode 100644 google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/_helpers.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_services_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/ranges_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/regression_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/rest.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb delete mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/README.md delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/api/client.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/Gemfile delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/create_model.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/delete_model.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/export_data.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/export_model.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/get_model.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/import_data.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/list_models.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb delete mode 100644 google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json delete mode 100644 google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb delete mode 100644 google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb delete mode 100644 google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb delete mode 100644 google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb delete mode 100644 google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb delete mode 100644 google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb delete mode 100644 google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb delete mode 100644 google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb delete mode 100644 google-cloud-automl-v1beta1/test/helper.rb diff --git a/google-cloud-automl-v1beta1/.gitignore b/google-cloud-automl-v1beta1/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/google-cloud-automl-v1beta1/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/google-cloud-automl-v1beta1/.repo-metadata.json b/google-cloud-automl-v1beta1/.repo-metadata.json deleted file mode 100644 index c54ad874f00c..000000000000 --- a/google-cloud-automl-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "api_id": "automl.googleapis.com", - "api_shortname": "automl", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest", - "distribution_name": "google-cloud-automl-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "automl", - "name_pretty": "Cloud AutoML V1beta1 API", - "product_documentation": "https://cloud.google.com/automl", - "release_level": "preview", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "AutoML makes the power of machine learning available to you even if you have limited knowledge of machine learning. You can use AutoML to build on Google's machine learning capabilities to create your own custom machine learning models that are tailored to your business needs, and then integrate those models into your applications and web sites. Note that google-cloud-automl-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details.", - "ruby-cloud-env-prefix": "AUTOML", - "ruby-cloud-product-url": "https://cloud.google.com/automl", - "ruby-cloud-path-override": "auto_ml=automl", - "ruby-cloud-namespace-override": "AutoMl=AutoML;Automl=AutoML", - "library_type": "GAPIC_COMBO" -} diff --git a/google-cloud-automl-v1beta1/.rubocop.yml b/google-cloud-automl-v1beta1/.rubocop.yml deleted file mode 100644 index bf48a3e31581..000000000000 --- a/google-cloud-automl-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-automl-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-automl-v1beta1.rb" diff --git a/google-cloud-automl-v1beta1/.toys.rb b/google-cloud-automl-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/google-cloud-automl-v1beta1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/google-cloud-automl-v1beta1/.yardopts b/google-cloud-automl-v1beta1/.yardopts index 73cadc8fa75a..d44c99ad0dfc 100644 --- a/google-cloud-automl-v1beta1/.yardopts +++ b/google-cloud-automl-v1beta1/.yardopts @@ -1,12 +1,9 @@ --no-private ---title="Cloud AutoML V1BETA1 API" ---exclude _pb\.rb$ +--title="Obsolete Gem google-cloud-automl-v1beta1" --markup markdown --markup-provider redcarpet ./lib/**/*.rb -./proto_docs/**/*.rb - README.md LICENSE.md -AUTHENTICATION.md diff --git a/google-cloud-automl-v1beta1/AUTHENTICATION.md b/google-cloud-automl-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 038f994f5360..000000000000 --- a/google-cloud-automl-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-automl-v1beta1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-automl-v1beta1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/automl/v1beta1" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/automl/v1beta1" - -::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-automl-v1beta1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/automl/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/google-cloud-automl-v1beta1/CHANGELOG.md b/google-cloud-automl-v1beta1/CHANGELOG.md deleted file mode 100644 index 46f98d138192..000000000000 --- a/google-cloud-automl-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,263 +0,0 @@ -# Release History - -### 0.19.1 (2026-08-05) - -#### Bug Fixes - -* generate double-wildcard path patterns with capture groups ([#35045](https://github.com/googleapis/google-cloud-ruby/issues/35045)) - -### 0.19.0 (2026-06-11) - -#### Features - -* update gapic-common dependency to 1.3 and document retry jitter ([#34039](https://github.com/googleapis/google-cloud-ruby/issues/34039)) - -### 0.18.0 (2026-04-02) - -#### Features - -* publish client batch config schema ([#33430](https://github.com/googleapis/google-cloud-ruby/issues/33430)) - -### 0.17.0 (2026-03-19) - -#### Features - -* Upgrade dependencies for Ruby v4.0 and drop Ruby v3.1 support - -### 0.16.1 (2025-10-27) - -#### Documentation - -* add warning about loading unvalidated credentials - -### 0.16.0 (2025-10-08) - -#### Features - -* add ListOperations partial success flag ([#31575](https://github.com/googleapis/google-cloud-ruby/issues/31575)) -* add ListOperations unreachable resources - -### 0.15.0 (2025-09-11) - -#### Features - -* update gapic-common dependency for generated libraries to 1.2 which requires google-protobuf v4.26+ - -### 0.14.1 (2025-07-15) - -#### Documentation - -* clarify documentation for cases when multiple parameters are mutually exclusive for an RPC method ([#30623](https://github.com/googleapis/google-cloud-ruby/issues/30623)) - -### 0.14.0 (2025-05-12) - -#### Features - -* Updated core dependencies including gapic-common -* Updated required Ruby version to 3.1 - -### 0.13.1 (2025-04-29) - -#### Bug Fixes - -* Fixed several issues with validating credential configs - -### 0.13.0 (2025-01-28) - -#### Features - -* Update Ruby version requirement to 3.0 -#### Documentation - -* Clarify behavior of protobuf message fields that are part of mutually-exclusive sets -* Include note about validating externally-provided credentials - -### 0.12.0 (2024-12-10) - -#### Features - -* Provide opt-in debug logging - -### 0.11.1 (2024-08-30) - -#### Documentation - -* Add field `experimental_features` to message `PythonSettings` - -### 0.11.0 (2024-02-26) - -#### Features - -* Updated minimum Ruby version to 2.7 ([#24863](https://github.com/googleapis/google-cloud-ruby/issues/24863)) - -### 0.10.2 (2024-02-01) - -#### Bug Fixes - -* Eliminated a harmless but annoying warning in the protobuf class files - -### 0.10.1 (2024-01-12) - -#### Bug Fixes - -* Ensure endpoints are correct for mixin clients ([#24032](https://github.com/googleapis/google-cloud-ruby/issues/24032)) - -### 0.10.0 (2024-01-11) - -#### Features - -* Support for universe_domain ([#23773](https://github.com/googleapis/google-cloud-ruby/issues/23773)) - -### 0.9.0 (2023-09-12) - -#### Features - -* Support for channel pool configuration ([#22917](https://github.com/googleapis/google-cloud-ruby/issues/22917)) - -### 0.8.0 (2023-06-06) - -#### Features - -* Uses binary protobuf definitions for better forward compatibility ([#21671](https://github.com/googleapis/google-cloud-ruby/issues/21671)) -#### Bug Fixes - -* Don't use self-signed JWT credentials if the global configuration endpoint has been modified - -### 0.7.0 (2023-03-08) - -#### Features - -* Support REST transport ([#20624](https://github.com/googleapis/google-cloud-ruby/issues/20624)) - -### 0.6.1 (2023-02-17) - -#### Bug Fixes - -* Fixed routing header sent with long-running operation calls ([#20448](https://github.com/googleapis/google-cloud-ruby/issues/20448)) - -### 0.6.0 (2022-07-01) - -#### Features - -* Updated minimum Ruby version to 2.6 ([#18443](https://github.com/googleapis/google-cloud-ruby/issues/18443)) -#### Bug Fixes - -* Fixed a crash when making certain long-running-operations status calls ([#18441](https://github.com/googleapis/google-cloud-ruby/issues/18441)) - -### 0.5.5 / 2022-01-11 - -#### Bug Fixes - -* Honor quota project in auxiliary operations clients - -#### Documentation - -* Fix titles of documentation pages -* Remove some broken images and fix outdated content in authentication documentation - -### 0.5.4 / 2021-11-08 - -#### Documentation - -* Added simple code snippets to RPC method documentation - -### 0.5.3 / 2021-08-11 - -#### Bug Fixes - -* Honor client-level timeout configuration - -### 0.5.2 / 2021-07-12 - -#### Documentation - -* Clarify some language around authentication configuration - -### 0.5.1 / 2021-06-17 - -#### Bug Fixes - -* Support future 1.x versions of gapic-common - -### 0.5.0 / 2021-03-08 - -#### Features - -* Drop support for Ruby 2.4 and add support for Ruby 3.0 - -### 0.4.0 / 2021-02-02 - -#### Features - -* Use self-signed JWT credentials when possible - -### 0.3.2 / 2021-01-19 - -#### Documentation - -* Timeout config description correctly gives the units as seconds. - -### 0.3.1 / 2020-12-08 - -#### Bug Fixes - -* Set version constants in the correct modules - -### 0.3.0 / 2020-10-14 - -#### Features - -* Added text extraction health care option in create model - -### 0.2.6 / 2020-08-10 - -#### Bug Fixes - -* Allow special symbolic credentials in client configs - -### 0.2.5 / 2020-08-06 - -#### Bug Fixes - -* Fix retry logic by checking the correct numeric error codes - -### 0.2.4 / 2020-06-18 - -#### Documentation - -* Add documentation and API enablement links to the readme - -### 0.2.3 / 2020-06-05 - -#### Bug Fixes - -* Eliminate a Ruby warning that appeared in some cases when accessing rpc-scoped configs - -### 0.2.2 / 2020-05-28 - -#### Documentation - -* Fix a few broken links - -### 0.2.1 / 2020-05-26 - -#### Bug Fixes - -* Removed unused google/cloud/common_resources_pb file -* The long-running operations client honors the quota_project config - -### 0.2.0 / 2020-05-20 - -#### Features - -* The quota_project can be set via configuration - -### 0.1.1 / 2020-05-05 - -#### Documentation - -* Clarify that timeouts are in seconds. - -### 0.1.0 / 2020-04-24 - -Initial release. diff --git a/google-cloud-automl-v1beta1/Gemfile b/google-cloud-automl-v1beta1/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/google-cloud-automl-v1beta1/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/google-cloud-automl-v1beta1/Gemfile.lock b/google-cloud-automl-v1beta1/Gemfile.lock deleted file mode 100644 index 31d1d7b34463..000000000000 --- a/google-cloud-automl-v1beta1/Gemfile.lock +++ /dev/null @@ -1,300 +0,0 @@ -PATH - remote: . - specs: - google-cloud-automl-v1beta1 (0.19.0) - gapic-common (~> 1.3) - google-cloud-errors (~> 1.0) - -GEM - remote: https://rubygems.org/ - specs: - addressable (2.9.0) - public_suffix (>= 2.0.2, < 8.0) - ansi (1.6.0) - ast (2.4.3) - base64 (0.3.0) - bigdecimal (4.1.2) - builder (3.3.0) - drb (2.2.3) - erb (6.0.6) - faraday (2.14.3) - faraday-net_http (>= 2.0, < 3.5) - json - logger - faraday-net_http (3.4.4) - net-http (~> 0.5) - faraday-retry (2.4.0) - faraday (~> 2.0) - gapic-common (1.3.0) - faraday (>= 1.9, < 3.a) - faraday-retry (>= 1.0, < 3.a) - google-cloud-env (~> 2.2) - google-logging-utils (~> 0.1) - google-protobuf (~> 4.26) - googleapis-common-protos (~> 1.6) - googleapis-common-protos-types (~> 1.15) - googleauth (~> 1.12) - grpc (~> 1.66) - google-cloud-env (2.4.0) - base64 (~> 0.2) - faraday (>= 1.0, < 3.a) - google-cloud-errors (1.7.0) - google-logging-utils (0.2.0) - google-protobuf (4.35.1) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-aarch64-linux-gnu) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-aarch64-linux-musl) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-arm64-darwin) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-x86-linux-gnu) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-x86-linux-musl) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-x86_64-darwin) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-x86_64-linux-gnu) - bigdecimal - rake (~> 13.3) - google-protobuf (4.35.1-x86_64-linux-musl) - bigdecimal - rake (~> 13.3) - google-style (1.32.0) - rubocop (~> 1.76) - googleapis-common-protos (1.10.0) - google-protobuf (~> 4.26) - googleapis-common-protos-types (~> 1.21) - grpc (~> 1.41) - googleapis-common-protos-types (1.23.0) - google-protobuf (~> 4.26) - googleauth (1.17.3) - faraday (>= 1.0, < 3.a) - google-cloud-env (~> 2.2) - google-logging-utils (~> 0.1) - jwt (>= 1.4, < 4.0) - os (>= 0.9, < 2.0) - pstore (~> 0.1) - signet (>= 0.16, < 2.a) - grpc (1.83.0) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-aarch64-linux-gnu) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-aarch64-linux-musl) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-arm64-darwin) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-x86-linux-gnu) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-x86-linux-musl) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-x86_64-darwin) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-x86_64-linux-gnu) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - grpc (1.83.0-x86_64-linux-musl) - google-protobuf (>= 3.25, < 5.0) - googleapis-common-protos-types (~> 1.0) - io-console (0.8.2) - irb (1.18.0) - pp (>= 0.6.0) - prism (>= 1.3.0) - rdoc (>= 4.0.0) - reline (>= 0.4.2) - json (2.21.2) - jwt (3.2.0) - base64 - language_server-protocol (3.17.0.6) - lint_roller (1.1.0) - logger (1.7.0) - minitest (6.0.6) - drb (~> 2.0) - prism (~> 1.5) - minitest-focus (1.4.1) - minitest (> 5.0) - minitest-mock (5.27.0) - minitest-reporters (1.8.0) - ansi - builder - minitest (>= 5.0, < 7) - ruby-progressbar - minitest-rg (5.4.0) - minitest (>= 5.0, < 7) - net-http (0.9.1) - uri (>= 0.11.1) - os (1.1.4) - ostruct (0.5.5) - parallel (2.1.0) - parser (3.3.12.0) - ast (~> 2.4.1) - racc - pp (0.6.4) - prettyprint - prettyprint (0.2.0) - prism (1.9.0) - pstore (0.2.1) - public_suffix (7.0.5) - racc (1.8.1) - rainbow (3.1.1) - rake (13.4.2) - rbs (4.1.1) - logger - prism (>= 1.6.0) - tsort - rdoc (8.0.0) - erb - prism (>= 1.6.0) - rbs (>= 4.0.0) - tsort - redcarpet (3.6.1) - regexp_parser (2.12.0) - reline (0.6.3) - io-console (~> 0.5) - rubocop (1.88.2) - json (~> 2.3) - language_server-protocol (~> 3.17.0.2) - lint_roller (~> 1.1.0) - parallel (>= 1.10) - parser (>= 3.3.0.2) - rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.49.0, < 2.0) - ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.50.0) - parser (>= 3.3.7.2) - prism (~> 1.7) - ruby-progressbar (1.13.0) - signet (0.22.0) - addressable (~> 2.8) - faraday (>= 0.17.5, < 3.a) - jwt (>= 1.5, < 4.0) - tsort (0.2.0) - unicode-display_width (3.2.0) - unicode-emoji (~> 4.1) - unicode-emoji (4.2.0) - uri (1.1.1) - yard (0.9.45) - -PLATFORMS - aarch64-linux-gnu - aarch64-linux-musl - arm64-darwin - ruby - x86-linux-gnu - x86-linux-musl - x86_64-darwin - x86_64-linux-gnu - x86_64-linux-musl - -DEPENDENCIES - google-cloud-automl-v1beta1! - google-style (~> 1.32.0) - irb (~> 1.17) - minitest (~> 6.0.2) - minitest-focus (~> 1.4) - minitest-mock (~> 5.27) - minitest-reporters (~> 1.8.0) - minitest-rg (~> 5.3) - ostruct (~> 0.5.5) - rake (>= 13.0) - redcarpet (~> 3.6) - yard (~> 0.9) - -CHECKSUMS - addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af - ansi (1.6.0) sha256=ac9ea0c0ea8d32fb4e271348e609963ac78882f34b73836c2a02b3622e666658 - ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383 - base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b - bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd - builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f - bundler (4.0.14) sha256=d09a0a965cf772266a7e49e83610be7c2f4e49e61134c42a56804bb383cc24b8 - drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373 - erb (6.0.6) sha256=a9b24986700f5bf127c4f297c5403c3ca41b83b0a316c0cd09a096b56e644ae5 - faraday (2.14.3) sha256=1882247e6766615c8220b4392bf1d27f6ebb63d8e28267587cef1fb0bf37f278 - faraday-net_http (3.4.4) sha256=0e78af151747ed1b00f33e25973b4bc220d7f16c00c39676817c8b12331eb588 - faraday-retry (2.4.0) sha256=7b79c48fb7e56526faf247b12d94a680071ff40c9fda7cf1ec1549439ad11ebe - gapic-common (1.3.0) sha256=4e5d9be1effb7366e2cda13c0f44922285d5613ac8de8b9b18c2c835fe4faa91 - google-cloud-automl-v1beta1 (0.19.0) - google-cloud-env (2.4.0) sha256=01cb35ecee5d1c4d1cd4deaed8bb5bddc838e296bcc2a35c5d1ddd07ce40d28d - google-cloud-errors (1.7.0) sha256=6e682f42d89aae08689f36f28495de629d756da076bafff0003bac7f8042ebb3 - google-logging-utils (0.2.0) sha256=675462b4ea5affa825a3442694ca2d75d0069455a1d0956127207498fca3df7b - google-protobuf (4.35.1) sha256=a3a6471331d918f58dfa4d014a8f6286f0af2cf4840216bde52fcf2ea3fe3726 - google-protobuf (4.35.1-aarch64-linux-gnu) sha256=50ca44d0eeff3f8475e630a1accdd974256f3510694d574e2c9d6119ea8bc9e1 - google-protobuf (4.35.1-aarch64-linux-musl) sha256=d5c65cef6bd6498a9e5ed5f88cf6cf7e341c10b0a005e32137d5d1a2b6e8c18a - google-protobuf (4.35.1-arm64-darwin) sha256=d9c957df04fa89c749fa9a72a7b383eb4296efc9b2303dc6fd6fbe39c698ad6b - google-protobuf (4.35.1-x86-linux-gnu) sha256=cc7492566b27ad8b5dfa3a7b6f9b11e905050cc53c2fa8ff22de375a9e7a70fb - google-protobuf (4.35.1-x86-linux-musl) sha256=ab403790b59e4dc588ffbed1eaacf05d4ca2f0d12ac9c13d6c64e69380d8c99e - google-protobuf (4.35.1-x86_64-darwin) sha256=66b62b4df00931018a692806df66393efa960d6d2b7da69735187249f950d3ee - google-protobuf (4.35.1-x86_64-linux-gnu) sha256=c786439087512a3fbd199e9897d265b855f951d4027e218ea55e858d45969edd - google-protobuf (4.35.1-x86_64-linux-musl) sha256=91890eb0002934a339fdb7d77a147c46b7474b6799db27872b747b905837f744 - google-style (1.32.0) sha256=3b13068979e5b8caa067ecce9bf818b6cf0e5eb706ead41c5b905f237d9bfb01 - googleapis-common-protos (1.10.0) sha256=13e47ad0ce85d3d30065c03863efd302a82b0e08ba576f2a9b9dbbfeecb57ee0 - googleapis-common-protos-types (1.23.0) sha256=992e740a523794d9fc5f29a504465d8fc737aaa16c930fe7228e3346860faf0a - googleauth (1.17.3) sha256=9a655455885c0c17a8b70537acd2a992a7c7842c43c06c6612dfb0d93e755d58 - grpc (1.83.0) sha256=38119e7f9f7cbc98e79145201da4be470a7542b0befad454651d35015ea55c59 - grpc (1.83.0-aarch64-linux-gnu) sha256=11562efdded494b2277fd9c3c530dfdf90177faa111526ae9e748d0be29f1a9d - grpc (1.83.0-aarch64-linux-musl) sha256=ee745eab4f3922ed27d379cbc4bc0a99e58db367fa96312e9fe258aafd3afeb2 - grpc (1.83.0-arm64-darwin) sha256=25dd772aa80529f014d70da069787cd39b469c9edacbe493da4ff19952a147e2 - grpc (1.83.0-x86-linux-gnu) sha256=e9b20f54b8e8915f3921f12b266742e79da2c31d60e88295e15d0d16ea3cfd55 - grpc (1.83.0-x86-linux-musl) sha256=868e66d9c2a77eca1a93292fd879565219821fb5888673aedd08154303c9520c - grpc (1.83.0-x86_64-darwin) sha256=cfad91d559d1907159a5247fb12dc112a8ea0ebe2027ca7f5ab648d01a645716 - grpc (1.83.0-x86_64-linux-gnu) sha256=25d66bfa3cb1b05258b3f9632478c7e7ceb52cb16ccc0b4b26d7df36be7158b1 - grpc (1.83.0-x86_64-linux-musl) sha256=a5023264dbb8038c23b147bbf80adb06932ef11b5ab493412e9e37a43114fa8c - io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc - irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3 - json (2.21.2) sha256=1f1d3b7cf2b3ba1a69beca0bb6db13d5438b80bff3cd54cdaaa620b9b07c1c6a - jwt (3.2.0) sha256=5419b1fe37b1da0982bd07051f573a8b8789ab724c2aa7e785e4784a3ed217d7 - language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0 - lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87 - logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 - minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1 - minitest-focus (1.4.1) sha256=394517cbe2dcb2d992d8ffc41a3b2b6315777a4daa69239de4fefe7110dd810e - minitest-mock (5.27.0) sha256=7040ed7185417a966920987eaa6eaf1be4ea1fc5b25bb03ff4703f98564a55b0 - minitest-reporters (1.8.0) sha256=8ce5280fb73ad3178ae525454df169b6f28c1b38b1d088ea91815d3a370ba384 - minitest-rg (5.4.0) sha256=54d42bb8ce876381245be5866f3c1dd704ef79c06ba5c9ff280c0aa28c56effb - net-http (0.9.1) sha256=25ba0b67c63e89df626ed8fac771d0ad24ad151a858af2cc8e6a716ca4336996 - os (1.1.4) sha256=57816d6a334e7bd6aed048f4b0308226c5fb027433b67d90a9ab435f35108d3f - ostruct (0.5.5) sha256=bc73d0e10f85ca2afdddc7eb79b3132bee622e2281db4e6e033a4cbf7d845efb - parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356 - parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828 - pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570 - prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193 - prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85 - pstore (0.2.1) sha256=03904d0f2c66579e96d1e6704cdabc0c88df7ea8ed8782d9f3569f6f6c702c1a - public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623 - racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f - rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a - rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701 - rbs (4.1.1) sha256=1bf118f2f95d1cd3956357645d495152b661e0257e57781d18ceecd461622b9e - rdoc (8.0.0) sha256=03bf8c08a9639658855a0cfd77c0abca8325c227693f7f33f82957811348c469 - redcarpet (3.6.1) sha256=d444910e6aa55480c6bcdc0cdb057626e8a32c054c29e793fa642ba2f155f445 - regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb - reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 - rubocop (1.88.2) sha256=8def251c90cd955feb4daa3edc0ab56893250c4ce90ef81e6c80c03f9a939bbf - rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db - ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 - signet (0.22.0) sha256=b76d495ccb07ad35dbc89f3e920665a9d8ed717141955034005d7843dcfe4780 - tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f - unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42 - unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f - uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 - yard (0.9.45) sha256=52e211493f7cb8a3ebf7e104a25a1e73937a3103092545d34cb88fafebb3dc51 - -BUNDLED WITH - 4.0.14 diff --git a/google-cloud-automl-v1beta1/LICENSE.md b/google-cloud-automl-v1beta1/LICENSE.md index c261857ba6ad..60673914fcc1 100644 --- a/google-cloud-automl-v1beta1/LICENSE.md +++ b/google-cloud-automl-v1beta1/LICENSE.md @@ -1,6 +1,6 @@ Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -192,7 +192,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/google-cloud-automl-v1beta1/README.md b/google-cloud-automl-v1beta1/README.md index 0cba37a7c001..0f7f5b9c37ea 100644 --- a/google-cloud-automl-v1beta1/README.md +++ b/google-cloud-automl-v1beta1/README.md @@ -1,150 +1,4 @@ -# Ruby Client for the Cloud AutoML V1BETA1 API +# Tombstone for Ruby gem google-cloud-automl-v1beta1 -Train high-quality custom machine learning models with minimum effort and machine learning expertise. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud AutoML V1BETA1 API. Most users should consider using -the main client gem, -[google-cloud-automl](https://rubygems.org/gems/google-cloud-automl). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-automl-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/automl.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/automl/v1beta1" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new -request = ::Google::Cloud::AutoML::V1beta1::PredictRequest.new # (request fields as keyword arguments...) -response = client.predict request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-automl-v1beta1/latest) -for class and method documentation. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/automl/v1beta1" -require "logger" - -client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-automl`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-automl-v1beta1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-automl`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-automl-v1beta1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. +This gem is obsolete because the related Google backend is turned down. +For more information, see https://cloud.google.com/terms/deprecation. diff --git a/google-cloud-automl-v1beta1/Rakefile b/google-cloud-automl-v1beta1/Rakefile index 0809ccb14b35..bbfd2ee3d1fb 100644 --- a/google-cloud-automl-v1beta1/Rakefile +++ b/google-cloud-automl-v1beta1/Rakefile @@ -14,156 +14,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - require "bundler/setup" require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-automl-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["AUTOML_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["AUTOML_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["AUTOML_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or AUTOML_TEST_PROJECT=test123 AUTOML_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/automl/v1beta1/prediction_service/credentials" - ::Google::Cloud::AutoML::V1beta1::PredictionService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["AUTOML_PROJECT"] = project - ENV["AUTOML_TEST_PROJECT"] = project - ENV["AUTOML_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-automl-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-automl-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-automl-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-automl-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-automl-v1beta1" - header "google-cloud-automl-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-automl-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-automl-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-automl-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-automl-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/google-cloud-automl-v1beta1/gapic_metadata.json b/google-cloud-automl-v1beta1/gapic_metadata.json deleted file mode 100644 index ebf069d33f8d..000000000000 --- a/google-cloud-automl-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.automl.v1beta1", - "libraryPackage": "::Google::Cloud::AutoML::V1beta1", - "services": { - "PredictionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client", - "rpcs": { - "Predict": { - "methods": [ - "predict" - ] - }, - "BatchPredict": { - "methods": [ - "batch_predict" - ] - } - } - } - } - }, - "AutoMl": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::AutoML::V1beta1::AutoML::Client", - "rpcs": { - "CreateDataset": { - "methods": [ - "create_dataset" - ] - }, - "GetDataset": { - "methods": [ - "get_dataset" - ] - }, - "ListDatasets": { - "methods": [ - "list_datasets" - ] - }, - "UpdateDataset": { - "methods": [ - "update_dataset" - ] - }, - "DeleteDataset": { - "methods": [ - "delete_dataset" - ] - }, - "ImportData": { - "methods": [ - "import_data" - ] - }, - "ExportData": { - "methods": [ - "export_data" - ] - }, - "GetAnnotationSpec": { - "methods": [ - "get_annotation_spec" - ] - }, - "GetTableSpec": { - "methods": [ - "get_table_spec" - ] - }, - "ListTableSpecs": { - "methods": [ - "list_table_specs" - ] - }, - "UpdateTableSpec": { - "methods": [ - "update_table_spec" - ] - }, - "GetColumnSpec": { - "methods": [ - "get_column_spec" - ] - }, - "ListColumnSpecs": { - "methods": [ - "list_column_specs" - ] - }, - "UpdateColumnSpec": { - "methods": [ - "update_column_spec" - ] - }, - "CreateModel": { - "methods": [ - "create_model" - ] - }, - "GetModel": { - "methods": [ - "get_model" - ] - }, - "ListModels": { - "methods": [ - "list_models" - ] - }, - "DeleteModel": { - "methods": [ - "delete_model" - ] - }, - "DeployModel": { - "methods": [ - "deploy_model" - ] - }, - "UndeployModel": { - "methods": [ - "undeploy_model" - ] - }, - "ExportModel": { - "methods": [ - "export_model" - ] - }, - "ExportEvaluatedExamples": { - "methods": [ - "export_evaluated_examples" - ] - }, - "GetModelEvaluation": { - "methods": [ - "get_model_evaluation" - ] - }, - "ListModelEvaluations": { - "methods": [ - "list_model_evaluations" - ] - } - } - } - } - } - } -} diff --git a/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec b/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec index 35280ba17d0c..68dda49046a3 100644 --- a/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec +++ b/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec @@ -1,28 +1,27 @@ -# -*- ruby -*- -# encoding: utf-8 - require File.expand_path("lib/google/cloud/automl/v1beta1/version", __dir__) Gem::Specification.new do |gem| - gem.name = "google-cloud-automl-v1beta1" - gem.version = Google::Cloud::AutoML::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Train high-quality custom machine learning models with minimum effort and machine learning expertise. Note that google-cloud-automl-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-automl instead. See the readme for more details." - gem.summary = "Train high-quality custom machine learning models with minimum effort and machine learning expertise." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" + gem.name = "google-cloud-automl-v1beta1" + gem.version = Google::Cloud::Automl::V1beta1::VERSION + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = + "This gem is obsolete because the related Google backend is turned down. " \ + "For more information, see https://cloud.google.com/terms/deprecation." + gem.summary = "This gem is obsolete because the related backend is turned down." + gem.post_install_message = <<~MESSAGE - gem.platform = Gem::Platform::RUBY + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + The google-cloud-automl-v1beta1 gem is OBSOLETE. + For more information, see: + https://cloud.google.com/terms/deprecation + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + MESSAGE + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + gem.platform = Gem::Platform::RUBY + gem.files = ["README.md", "LICENSE.md", ".yardopts", "lib/google/cloud/automl/v1beta1/version.rb"] gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.required_ruby_version = ">= 3.0" end diff --git a/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb b/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb deleted file mode 100644 index ac7d092bf31e..000000000000 --- a/google-cloud-automl-v1beta1/lib/google-cloud-automl-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/automl/v1beta1" diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb deleted file mode 100644 index 78a600ce0c87..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1beta1/prediction_service" -require "google/cloud/automl/v1beta1/automl" -require "google/cloud/automl/v1beta1/version" - -module Google - module Cloud - module AutoML - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/automl/v1beta1" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/automl/v1beta1" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/automl/v1beta1/_helpers" if ::File.file? helper_path diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/_helpers.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/_helpers.rb deleted file mode 100644 index 1edb70713a84..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/_helpers.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -module Google - module Cloud - module Automl - module V1beta1 - VERSION = ::Google::Cloud::AutoML::V1beta1::VERSION - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb deleted file mode 100644 index c031b6200be1..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_payload_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/annotation_payload.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' -require 'google/cloud/automl/v1beta1/detection_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_extraction_pb' -require 'google/cloud/automl/v1beta1/text_sentiment_pb' -require 'google/cloud/automl/v1beta1/translation_pb' - - -descriptor_data = "\n4google/cloud/automl/v1beta1/annotation_payload.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\"\xe6\x05\n\x11\x41nnotationPayload\x12I\n\x0btranslation\x18\x02 \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TranslationAnnotationH\x00\x12O\n\x0e\x63lassification\x18\x03 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotationH\x00\x12]\n\x16image_object_detection\x18\x04 \x01(\x0b\x32;.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationH\x00\x12Z\n\x14video_classification\x18\t \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoClassificationAnnotationH\x00\x12[\n\x15video_object_tracking\x18\x08 \x01(\x0b\x32:.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationH\x00\x12P\n\x0ftext_extraction\x18\x06 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TextExtractionAnnotationH\x00\x12N\n\x0etext_sentiment\x18\x07 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.TextSentimentAnnotationH\x00\x12?\n\x06tables\x18\n \x01(\x0b\x32-.google.cloud.automl.v1beta1.TablesAnnotationH\x00\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x08\n\x06\x64\x65tailB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - AnnotationPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.AnnotationPayload").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb deleted file mode 100644 index 85b08ebdfc7b..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/annotation_spec_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/annotation_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' - - -descriptor_data = "\n1google/cloud/automl/v1beta1/annotation_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\"\xd6\x01\n\x0e\x41nnotationSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x15\n\rexample_count\x18\t \x01(\x05:\x88\x01\xea\x41\x84\x01\n$automl.googleapis.com/AnnotationSpec\x12\\projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - AnnotationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.AnnotationSpec").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb deleted file mode 100644 index 3e41d90e7a98..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/automl/credentials" -require "google/cloud/automl/v1beta1/automl/paths" -require "google/cloud/automl/v1beta1/automl/operations" -require "google/cloud/automl/v1beta1/automl/client" -require "google/cloud/automl/v1beta1/automl/rest" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/automl/v1beta1/automl" - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/automl/v1beta1/automl/rest" - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - module AutoML - end - end - end - end -end - -helper_path = ::File.join __dir__, "automl", "helpers.rb" -require "google/cloud/automl/v1beta1/automl/helpers" if ::File.file? helper_path diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb deleted file mode 100644 index 9c7504318c76..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/client.rb +++ /dev/null @@ -1,2985 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1beta1/service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - ## - # Client for the AutoMl service. - # - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :auto_ml_stub - - ## - # Configure the AutoMl Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutoMl clients - # ::Google::Cloud::AutoML::V1beta1::AutoML::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "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 = 5.0 - - default_config.rpcs.get_dataset.timeout = 5.0 - default_config.rpcs.get_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_datasets.timeout = 5.0 - default_config.rpcs.list_datasets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_dataset.timeout = 5.0 - - default_config.rpcs.delete_dataset.timeout = 5.0 - default_config.rpcs.delete_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.import_data.timeout = 5.0 - - default_config.rpcs.export_data.timeout = 5.0 - - default_config.rpcs.get_annotation_spec.timeout = 5.0 - default_config.rpcs.get_annotation_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_table_spec.timeout = 5.0 - default_config.rpcs.get_table_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_table_specs.timeout = 5.0 - default_config.rpcs.list_table_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_table_spec.timeout = 5.0 - - default_config.rpcs.get_column_spec.timeout = 5.0 - default_config.rpcs.get_column_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_column_specs.timeout = 5.0 - default_config.rpcs.list_column_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_column_spec.timeout = 5.0 - - default_config.rpcs.create_model.timeout = 5.0 - - default_config.rpcs.get_model.timeout = 5.0 - default_config.rpcs.get_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_models.timeout = 5.0 - default_config.rpcs.list_models.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_model.timeout = 5.0 - default_config.rpcs.delete_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.deploy_model.timeout = 5.0 - - default_config.rpcs.undeploy_model.timeout = 5.0 - - default_config.rpcs.export_model.timeout = 5.0 - - default_config.rpcs.export_evaluated_examples.timeout = 5.0 - - default_config.rpcs.get_model_evaluation.timeout = 5.0 - default_config.rpcs.get_model_evaluation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_model_evaluations.timeout = 5.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl 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 {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @auto_ml_stub.universe_domain - end - - ## - # Create a new AutoMl client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutoMl client. - # @yieldparam config [Client::Configuration] - # - 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/automl/v1beta1/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.nil? || - (@config.endpoint == Configuration::DEFAULT_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.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @auto_ml_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AutoML::V1beta1::AutoMl::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @auto_ml_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1beta1::AutoML::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @auto_ml_stub.logger - end - - # Service calls - - ## - # Creates a dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_dataset(parent: nil, dataset: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project to create the dataset for. - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def create_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :create_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists datasets in a project. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project from which to list datasets. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of - # using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_datasets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_datasets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_dataset(dataset: nil, update_mask: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def update_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.dataset&.name - header_params["dataset.name"] = request.dataset.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_dataset, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a dataset and all of its contents. - # Returns empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_dataset(name: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :delete_dataset, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version} - # parameter must be explicitly set. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_data(name: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash] - # Required. The desired input location and its domain specific semantics, - # if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.import_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :import_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_data(name: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset. - # @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash] - # Required. The desired output location. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_data.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_data, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an annotation spec. - # - # @overload get_annotation_spec(request, options = nil) - # Pass arguments to `get_annotation_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_annotation_spec(name: nil) - # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the annotation spec to retrieve. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new - # - # # Call the get_annotation_spec method. - # result = client.get_annotation_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. - # p result - # - def get_annotation_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_annotation_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_annotation_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_annotation_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a table spec. - # - # @overload get_table_spec(request, options = nil) - # Pass arguments to `get_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_table_spec(name: nil, field_mask: nil) - # Pass arguments to `get_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the table spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new - # - # # Call the get_table_spec method. - # result = client.get_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def get_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_table_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_table_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists table specs in a dataset. - # - # @overload list_table_specs(request, options = nil) - # Pass arguments to `list_table_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_table_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the dataset to list table specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new - # - # # Call the list_table_specs method. - # result = client.list_table_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. - # p item - # end - # - def list_table_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_table_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_table_specs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_table_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_table_specs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_table_specs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a table spec. - # - # @overload update_table_spec(request, options = nil) - # Pass arguments to `update_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_table_spec(table_spec: nil, update_mask: nil) - # Pass arguments to `update_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash] - # Required. The table spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new - # - # # Call the update_table_spec method. - # result = client.update_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def update_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.table_spec&.name - header_params["table_spec.name"] = request.table_spec.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_table_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_table_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a column spec. - # - # @overload get_column_spec(request, options = nil) - # Pass arguments to `get_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_column_spec(name: nil, field_mask: nil) - # Pass arguments to `get_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the column spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new - # - # # Call the get_column_spec method. - # result = client.get_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def get_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_column_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_column_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists column specs in a table spec. - # - # @overload list_column_specs(request, options = nil) - # Pass arguments to `list_column_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_column_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the table spec to list column specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new - # - # # Call the list_column_specs method. - # result = client.list_column_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p item - # end - # - def list_column_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_column_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_column_specs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_column_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_column_specs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_column_specs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a column spec. - # - # @overload update_column_spec(request, options = nil) - # Pass arguments to `update_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_column_spec(column_spec: nil, update_mask: nil) - # Pass arguments to `update_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash] - # Required. The column spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new - # - # # Call the update_column_spec method. - # result = client.update_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def update_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.column_spec&.name - header_params["column_spec.name"] = request.column_spec.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_column_spec.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :update_column_spec, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a model. - # Returns a Model in the {::Google::Longrunning::Operation#response response} - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_model(parent: nil, model: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent project where the model is being created. - # @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash] - # Required. The model to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :create_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::Model] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_model, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project, from which to list the models. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_models.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_models, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_models, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_model(name: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model being deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :delete_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # - # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload deploy_model(request, options = nil) - # Pass arguments to `deploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) - # Pass arguments to `deploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Classification. - # - # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param name [::String] - # Required. Resource name of the model to deploy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new - # - # # Call the deploy_model method. - # result = client.deploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def deploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.deploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.deploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :deploy_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload undeploy_model(request, options = nil) - # Pass arguments to `undeploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload undeploy_model(name: nil) - # Pass arguments to `undeploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model to undeploy. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new - # - # # Call the undeploy_model method. - # result = client.undeploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undeploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.undeploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.undeploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :undeploy_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # - # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_model(request, options = nil) - # Pass arguments to `export_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_model(name: nil, output_config: nil) - # Pass arguments to `export_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the model to export. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new - # - # # Call the export_model method. - # result = client.export_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_model, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports examples on which the model was evaluated (i.e. which were in the - # TEST set of the dataset the model was created from), together with their - # ground truth annotations and the annotations created (predicted) by the - # model. - # The examples, ground truth and predictions are exported in the state - # they were at the moment the model was evaluated. - # - # This export is available only for 30 days since the model evaluation is - # created. - # - # Currently only available for Tables. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_evaluated_examples(request, options = nil) - # Pass arguments to `export_evaluated_examples` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_evaluated_examples(name: nil, output_config: nil) - # Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the model whose evaluated examples are to - # be exported. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new - # - # # Call the export_evaluated_examples method. - # result = client.export_evaluated_examples request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluated_examples request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_evaluated_examples.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_evaluated_examples.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_evaluated_examples.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :export_evaluated_examples, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model evaluation. - # - # @overload get_model_evaluation(request, options = nil) - # Pass arguments to `get_model_evaluation` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model_evaluation(name: nil) - # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the model evaluation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new - # - # # Call the get_model_evaluation method. - # result = client.get_model_evaluation request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p result - # - def get_model_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_model_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :get_model_evaluation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists model evaluations. - # - # @overload list_model_evaluations(request, options = nil) - # Pass arguments to `list_model_evaluations` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new - # - # # Call the list_model_evaluations method. - # result = client.list_model_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p item - # end - # - def list_model_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_model_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_model_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AutoMl API. - # - # This class represents the configuration for AutoMl, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_dataset to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::AutoML::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the AutoMl API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `get_annotation_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_annotation_spec - ## - # RPC-specific configuration for `get_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_table_spec - ## - # RPC-specific configuration for `list_table_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_table_specs - ## - # RPC-specific configuration for `update_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_table_spec - ## - # RPC-specific configuration for `get_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_column_spec - ## - # RPC-specific configuration for `list_column_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_column_specs - ## - # RPC-specific configuration for `update_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_column_spec - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `deploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :deploy_model - ## - # RPC-specific configuration for `undeploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :undeploy_model - ## - # RPC-specific configuration for `export_model` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model - ## - # RPC-specific configuration for `export_evaluated_examples` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluated_examples - ## - # RPC-specific configuration for `get_model_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model_evaluation - ## - # RPC-specific configuration for `list_model_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_model_evaluations - - # @private - def initialize parent_rpcs = nil - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec - @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config - get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec - @get_table_spec = ::Gapic::Config::Method.new get_table_spec_config - list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs - @list_table_specs = ::Gapic::Config::Method.new list_table_specs_config - update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec - @update_table_spec = ::Gapic::Config::Method.new update_table_spec_config - get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec - @get_column_spec = ::Gapic::Config::Method.new get_column_spec_config - list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs - @list_column_specs = ::Gapic::Config::Method.new list_column_specs_config - update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec - @update_column_spec = ::Gapic::Config::Method.new update_column_spec_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model - @deploy_model = ::Gapic::Config::Method.new deploy_model_config - undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model - @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config - export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model - @export_model = ::Gapic::Config::Method.new export_model_config - export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples - @export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config - get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation - @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config - list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations - @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb deleted file mode 100644 index 59c4eb1fb2be..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - # Credentials for the AutoMl API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "AUTOML_CREDENTIALS", - "AUTOML_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "AUTOML_CREDENTIALS_JSON", - "AUTOML_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb deleted file mode 100644 index b166dda91efe..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/operations.rb +++ /dev/null @@ -1,851 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AutoMl Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl Operations 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 {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - 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/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - 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_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb deleted file mode 100644 index f9a7d5efd31e..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/paths.rb +++ /dev/null @@ -1,174 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - # Path helper methods for the AutoMl API. - module Paths - ## - # Create a fully-qualified AnnotationSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param annotation_spec [String] - # - # @return [::String] - def annotation_spec_path project:, location:, dataset:, annotation_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/annotationSpecs/#{annotation_spec}" - end - - ## - # Create a fully-qualified ColumnSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param table_spec [String] - # @param column_spec [String] - # - # @return [::String] - def column_spec_path project:, location:, dataset:, table_spec:, column_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - raise ::ArgumentError, "table_spec cannot contain /" if table_spec.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/tableSpecs/#{table_spec}/columnSpecs/#{column_spec}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, location:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - ## - # Create a fully-qualified ModelEvaluation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # @param model_evaluation [String] - # - # @return [::String] - def model_evaluation_path project:, location:, model:, model_evaluation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "model cannot contain /" if model.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}/modelEvaluations/#{model_evaluation}" - end - - ## - # Create a fully-qualified TableSpec resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}` - # - # @param project [String] - # @param location [String] - # @param dataset [String] - # @param table_spec [String] - # - # @return [::String] - def table_spec_path project:, location:, dataset:, table_spec: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/locations/#{location}/datasets/#{dataset}/tableSpecs/#{table_spec}" - end - - extend self - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb deleted file mode 100644 index da55991d354b..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/automl/credentials" -require "google/cloud/automl/v1beta1/automl/paths" -require "google/cloud/automl/v1beta1/automl/rest/operations" -require "google/cloud/automl/v1beta1/automl/rest/client" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/automl/v1beta1/automl/rest" - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - module AutoML - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/automl/v1beta1/automl/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb deleted file mode 100644 index 2d1ec590f207..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/client.rb +++ /dev/null @@ -1,2774 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/automl/rest/service_stub" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - module Rest - ## - # REST client for the AutoMl service. - # - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :auto_ml_stub - - ## - # Configure the AutoMl Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AutoMl clients - # ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "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 = 5.0 - - default_config.rpcs.get_dataset.timeout = 5.0 - default_config.rpcs.get_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_datasets.timeout = 5.0 - default_config.rpcs.list_datasets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_dataset.timeout = 5.0 - - default_config.rpcs.delete_dataset.timeout = 5.0 - default_config.rpcs.delete_dataset.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.import_data.timeout = 5.0 - - default_config.rpcs.export_data.timeout = 5.0 - - default_config.rpcs.get_annotation_spec.timeout = 5.0 - default_config.rpcs.get_annotation_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_table_spec.timeout = 5.0 - default_config.rpcs.get_table_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_table_specs.timeout = 5.0 - default_config.rpcs.list_table_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_table_spec.timeout = 5.0 - - default_config.rpcs.get_column_spec.timeout = 5.0 - default_config.rpcs.get_column_spec.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_column_specs.timeout = 5.0 - default_config.rpcs.list_column_specs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_column_spec.timeout = 5.0 - - default_config.rpcs.create_model.timeout = 5.0 - - default_config.rpcs.get_model.timeout = 5.0 - default_config.rpcs.get_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_models.timeout = 5.0 - default_config.rpcs.list_models.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_model.timeout = 5.0 - default_config.rpcs.delete_model.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.deploy_model.timeout = 5.0 - - default_config.rpcs.undeploy_model.timeout = 5.0 - - default_config.rpcs.export_model.timeout = 5.0 - - default_config.rpcs.export_evaluated_examples.timeout = 5.0 - - default_config.rpcs.get_model_evaluation.timeout = 5.0 - default_config.rpcs.get_model_evaluation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_model_evaluations.timeout = 5.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl 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 {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @auto_ml_stub.universe_domain - end - - ## - # Create a new AutoMl REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AutoMl client. - # @yieldparam config [Client::Configuration] - # - def initialize - # 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.nil? || - (@config.endpoint == Configuration::DEFAULT_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 = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @auto_ml_stub = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @auto_ml_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @auto_ml_stub.logger - end - - # Service calls - - ## - # Creates a dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_dataset(parent: nil, dataset: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project to create the dataset for. - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def create_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.create_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists datasets in a project. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project from which to list datasets. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of - # using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @param page_size [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_datasets AutoMl.ListDatasets} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_datasets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_datasets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_datasets, "datasets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_dataset(dataset: nil, update_mask: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dataset [::Google::Cloud::AutoML::V1beta1::Dataset, ::Hash] - # Required. The dataset which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - # p result - # - def update_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_dataset request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a dataset and all of its contents. - # Returns empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_dataset(name: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.delete_dataset request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # {::Google::Cloud::AutoML::V1beta1::InputConfig#params schema_inference_version} - # parameter must be explicitly set. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload import_data(request, options = nil) - # Pass arguments to `import_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ImportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_data(name: nil, input_config: nil) - # Pass arguments to `import_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @param input_config [::Google::Cloud::AutoML::V1beta1::InputConfig, ::Hash] - # Required. The desired input location and its domain specific semantics, - # if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new - # - # # Call the import_data method. - # result = client.import_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ImportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.import_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_data(request, options = nil) - # Pass arguments to `export_data` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportDataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_data(name: nil, output_config: nil) - # Pass arguments to `export_data` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the dataset. - # @param output_config [::Google::Cloud::AutoML::V1beta1::OutputConfig, ::Hash] - # Required. The desired output location. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new - # - # # Call the export_data method. - # result = client.export_data request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_data request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportDataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_data.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_data.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_data.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_data request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an annotation spec. - # - # @overload get_annotation_spec(request, options = nil) - # Pass arguments to `get_annotation_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_annotation_spec(name: nil) - # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the annotation spec to retrieve. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new - # - # # Call the get_annotation_spec method. - # result = client.get_annotation_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. - # p result - # - def get_annotation_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_annotation_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_annotation_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a table spec. - # - # @overload get_table_spec(request, options = nil) - # Pass arguments to `get_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_table_spec(name: nil, field_mask: nil) - # Pass arguments to `get_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the table spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new - # - # # Call the get_table_spec method. - # result = client.get_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def get_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_table_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_table_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists table specs in a dataset. - # - # @overload list_table_specs(request, options = nil) - # Pass arguments to `list_table_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_table_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_table_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the dataset to list table specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_table_specs AutoMl.ListTableSpecs} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new - # - # # Call the list_table_specs method. - # result = client.list_table_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. - # p item - # end - # - def list_table_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_table_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_table_specs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_table_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_table_specs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_table_specs, "table_specs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a table spec. - # - # @overload update_table_spec(request, options = nil) - # Pass arguments to `update_table_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_table_spec(table_spec: nil, update_mask: nil) - # Pass arguments to `update_table_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_spec [::Google::Cloud::AutoML::V1beta1::TableSpec, ::Hash] - # Required. The table spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new - # - # # Call the update_table_spec method. - # result = client.update_table_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - # p result - # - def update_table_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_table_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_table_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_table_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_table_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a column spec. - # - # @overload get_column_spec(request, options = nil) - # Pass arguments to `get_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_column_spec(name: nil, field_mask: nil) - # Pass arguments to `get_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the column spec to retrieve. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new - # - # # Call the get_column_spec method. - # result = client.get_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def get_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_column_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_column_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists column specs in a table spec. - # - # @overload list_column_specs(request, options = nil) - # Pass arguments to `list_column_specs` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_column_specs(parent: nil, field_mask: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_column_specs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the table spec to list column specs from. - # @param field_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask specifying which fields to read. - # @param filter [::String] - # Filter expression, see go/filtering. - # @param page_size [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_column_specs AutoMl.ListColumnSpecs} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new - # - # # Call the list_column_specs method. - # result = client.list_column_specs request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p item - # end - # - def list_column_specs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_column_specs.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_column_specs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_column_specs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_column_specs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_column_specs, "column_specs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a column spec. - # - # @overload update_column_spec(request, options = nil) - # Pass arguments to `update_column_spec` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_column_spec(column_spec: nil, update_mask: nil) - # Pass arguments to `update_column_spec` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param column_spec [::Google::Cloud::AutoML::V1beta1::ColumnSpec, ::Hash] - # Required. The column spec which replaces the resource on the server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new - # - # # Call the update_column_spec method. - # result = client.update_column_spec request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - # p result - # - def update_column_spec request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_column_spec.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_column_spec.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_column_spec.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.update_column_spec request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a model. - # Returns a Model in the {::Google::Longrunning::Operation#response response} - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_model(parent: nil, model: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the parent project where the model is being created. - # @param model [::Google::Cloud::AutoML::V1beta1::Model, ::Hash] - # Required. The model to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::CreateModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.create_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_model request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project, from which to list the models. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_models AutoMl.ListModels} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::Model>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_models.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_models request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_models, "model", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # {::Google::Longrunning::Operation#response response} field when it completes, - # and `delete_details` in the - # {::Google::Longrunning::Operation#metadata metadata} field. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_model(name: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model being deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.delete_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # - # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload deploy_model(request, options = nil) - # Pass arguments to `deploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::DeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload deploy_model(image_object_detection_model_deployment_metadata: nil, image_classification_model_deployment_metadata: nil, name: nil) - # Pass arguments to `deploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param image_object_detection_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following parameters are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param image_classification_model_deployment_metadata [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata, ::Hash] - # Model deployment metadata specific to Image Classification. - # - # Note: The following parameters are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param name [::String] - # Required. Resource name of the model to deploy. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new - # - # # Call the deploy_model method. - # result = client.deploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def deploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::DeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.deploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.deploy_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.deploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.deploy_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload undeploy_model(request, options = nil) - # Pass arguments to `undeploy_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::UndeployModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload undeploy_model(name: nil) - # Pass arguments to `undeploy_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the model to undeploy. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new - # - # # Call the undeploy_model method. - # result = client.undeploy_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def undeploy_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.undeploy_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.undeploy_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.undeploy_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # - # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_model(request, options = nil) - # Pass arguments to `export_model` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_model(name: nil, output_config: nil) - # Pass arguments to `export_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the model to export. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new - # - # # Call the export_model method. - # result = client.export_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportModelRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_model request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Exports examples on which the model was evaluated (i.e. which were in the - # TEST set of the dataset the model was created from), together with their - # ground truth annotations and the annotations created (predicted) by the - # model. - # The examples, ground truth and predictions are exported in the state - # they were at the moment the model was evaluated. - # - # This export is available only for 30 days since the model evaluation is - # created. - # - # Currently only available for Tables. - # - # Returns an empty response in the - # {::Google::Longrunning::Operation#response response} field when it completes. - # - # @overload export_evaluated_examples(request, options = nil) - # Pass arguments to `export_evaluated_examples` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_evaluated_examples(name: nil, output_config: nil) - # Pass arguments to `export_evaluated_examples` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the model whose evaluated examples are to - # be exported. - # @param output_config [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig, ::Hash] - # Required. The desired output location and configuration. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new - # - # # Call the export_evaluated_examples method. - # result = client.export_evaluated_examples request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_evaluated_examples request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_evaluated_examples.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_evaluated_examples.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_evaluated_examples.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.export_evaluated_examples request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a model evaluation. - # - # @overload get_model_evaluation(request, options = nil) - # Pass arguments to `get_model_evaluation` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model_evaluation(name: nil) - # Pass arguments to `get_model_evaluation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name for the model evaluation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new - # - # # Call the get_model_evaluation method. - # result = client.get_model_evaluation request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p result - # - def get_model_evaluation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_model_evaluation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model_evaluation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.get_model_evaluation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists model evaluations. - # - # @overload list_model_evaluations(request, options = nil) - # Pass arguments to `list_model_evaluations` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_model_evaluations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @param filter [::String] - # An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @param page_size [::Integer] - # Requested page size. - # @param page_token [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new - # - # # Call the list_model_evaluations method. - # result = client.list_model_evaluations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. - # p item - # end - # - def list_model_evaluations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_model_evaluations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_model_evaluations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @auto_ml_stub.list_model_evaluations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @auto_ml_stub, :list_model_evaluations, "model_evaluation", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the AutoMl REST API. - # - # This class represents the configuration for AutoMl REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # create_dataset to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_dataset.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the AutoMl API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `import_data` - # @return [::Gapic::Config::Method] - # - attr_reader :import_data - ## - # RPC-specific configuration for `export_data` - # @return [::Gapic::Config::Method] - # - attr_reader :export_data - ## - # RPC-specific configuration for `get_annotation_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_annotation_spec - ## - # RPC-specific configuration for `get_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_table_spec - ## - # RPC-specific configuration for `list_table_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_table_specs - ## - # RPC-specific configuration for `update_table_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_table_spec - ## - # RPC-specific configuration for `get_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :get_column_spec - ## - # RPC-specific configuration for `list_column_specs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_column_specs - ## - # RPC-specific configuration for `update_column_spec` - # @return [::Gapic::Config::Method] - # - attr_reader :update_column_spec - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `deploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :deploy_model - ## - # RPC-specific configuration for `undeploy_model` - # @return [::Gapic::Config::Method] - # - attr_reader :undeploy_model - ## - # RPC-specific configuration for `export_model` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model - ## - # RPC-specific configuration for `export_evaluated_examples` - # @return [::Gapic::Config::Method] - # - attr_reader :export_evaluated_examples - ## - # RPC-specific configuration for `get_model_evaluation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model_evaluation - ## - # RPC-specific configuration for `list_model_evaluations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_model_evaluations - - # @private - def initialize parent_rpcs = nil - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data - @import_data = ::Gapic::Config::Method.new import_data_config - export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data - @export_data = ::Gapic::Config::Method.new export_data_config - get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec - @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config - get_table_spec_config = parent_rpcs.get_table_spec if parent_rpcs.respond_to? :get_table_spec - @get_table_spec = ::Gapic::Config::Method.new get_table_spec_config - list_table_specs_config = parent_rpcs.list_table_specs if parent_rpcs.respond_to? :list_table_specs - @list_table_specs = ::Gapic::Config::Method.new list_table_specs_config - update_table_spec_config = parent_rpcs.update_table_spec if parent_rpcs.respond_to? :update_table_spec - @update_table_spec = ::Gapic::Config::Method.new update_table_spec_config - get_column_spec_config = parent_rpcs.get_column_spec if parent_rpcs.respond_to? :get_column_spec - @get_column_spec = ::Gapic::Config::Method.new get_column_spec_config - list_column_specs_config = parent_rpcs.list_column_specs if parent_rpcs.respond_to? :list_column_specs - @list_column_specs = ::Gapic::Config::Method.new list_column_specs_config - update_column_spec_config = parent_rpcs.update_column_spec if parent_rpcs.respond_to? :update_column_spec - @update_column_spec = ::Gapic::Config::Method.new update_column_spec_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model - @deploy_model = ::Gapic::Config::Method.new deploy_model_config - undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model - @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config - export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model - @export_model = ::Gapic::Config::Method.new export_model_config - export_evaluated_examples_config = parent_rpcs.export_evaluated_examples if parent_rpcs.respond_to? :export_evaluated_examples - @export_evaluated_examples = ::Gapic::Config::Method.new export_evaluated_examples_config - get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation - @get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config - list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations - @list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb deleted file mode 100644 index 8722d3172d66..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/operations.rb +++ /dev/null @@ -1,1095 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AutoMl Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the AutoMl Operations 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 {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - 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_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.wait_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "wait_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:wait", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb deleted file mode 100644 index 774d061a2484..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/automl/rest/service_stub.rb +++ /dev/null @@ -1,1556 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1beta1/service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoML - module Rest - ## - # REST service stub for the AutoMl service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the create_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # A result object deserialized from the server's reply - def create_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # A result object deserialized from the server's reply - def get_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_datasets REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse] - # A result object deserialized from the server's reply - def list_datasets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_datasets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # A result object deserialized from the server's reply - def update_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Dataset.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the import_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ImportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportDataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_data request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_data_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_data", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_annotation_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::AnnotationSpec] - # A result object deserialized from the server's reply - def get_annotation_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_annotation_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_annotation_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # A result object deserialized from the server's reply - def get_table_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_table_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_table_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::TableSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_table_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse] - # A result object deserialized from the server's reply - def list_table_specs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_table_specs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_table_specs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::TableSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # A result object deserialized from the server's reply - def update_table_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_table_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_table_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::TableSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # A result object deserialized from the server's reply - def get_column_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_column_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_column_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_column_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse] - # A result object deserialized from the server's reply - def list_column_specs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_column_specs_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_column_specs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # A result object deserialized from the server's reply - def update_column_spec request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_column_spec_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_column_spec", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # A result object deserialized from the server's reply - def get_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::Model.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_models REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListModelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListModelsResponse] - # A result object deserialized from the server's reply - def list_models request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_models", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the deploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeployModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def deploy_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_deploy_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "deploy_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the undeploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def undeploy_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_undeploy_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "undeploy_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_evaluated_examples REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_evaluated_examples request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_evaluated_examples_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_evaluated_examples", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_model_evaluation REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ModelEvaluation] - # A result object deserialized from the server's reply - def get_model_evaluation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_evaluation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_model_evaluation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_model_evaluations REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse] - # A result object deserialized from the server's reply - def list_model_evaluations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_model_evaluations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_model_evaluations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/datasets", - body: "dataset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_datasets REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_datasets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/datasets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{dataset.name}", - body: "dataset", - matches: [ - ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_dataset REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ImportDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:importData", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_data REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportDataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_data_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:exportData", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_annotation_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_annotation_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_table_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_table_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_table_specs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/tableSpecs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_table_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_table_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{table_spec.name}", - body: "table_spec", - matches: [ - ["table_spec.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_column_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/columnSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_column_specs REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_column_specs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/columnSpecs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_column_spec REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_column_spec_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta1/{column_spec.name}", - body: "column_spec", - matches: [ - ["column_spec.name", %r{^projects/[^/]+/locations/[^/]+/datasets/[^/]+/tableSpecs/[^/]+/columnSpecs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::CreateModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/models", - body: "model", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_models REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_models_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/models", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeleteModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the deploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::DeployModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_deploy_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:deploy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the undeploy_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::UndeployModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_undeploy_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:undeploy", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_model REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportModelRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:export", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_evaluated_examples REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_evaluated_examples_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:exportEvaluatedExamples", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model_evaluation REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_model_evaluation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/modelEvaluations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_model_evaluations REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_model_evaluations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/modelEvaluations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb deleted file mode 100644 index e1ade31b5e08..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/classification_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/classification.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/temporal_pb' - - -descriptor_data = "\n0google/cloud/automl/v1beta1/classification.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/temporal.proto\")\n\x18\x43lassificationAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\"\xc7\x01\n\x1dVideoClassificationAnnotation\x12\x0c\n\x04type\x18\x01 \x01(\t\x12X\n\x19\x63lassification_annotation\x18\x02 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.ClassificationAnnotation\x12>\n\x0ctime_segment\x18\x03 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TimeSegment\"\xa9\x07\n\x1f\x43lassificationEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12\x17\n\x0b\x62\x61se_au_prc\x18\x02 \x01(\x02\x42\x02\x18\x01\x12\x0e\n\x06\x61u_roc\x18\x06 \x01(\x02\x12\x10\n\x08log_loss\x18\x07 \x01(\x02\x12u\n\x18\x63onfidence_metrics_entry\x18\x03 \x03(\x0b\x32S.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry\x12\x66\n\x10\x63onfusion_matrix\x18\x04 \x01(\x0b\x32L.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x05 \x03(\t\x1a\xfc\x02\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x1a\n\x12position_threshold\x18\x0e \x01(\x05\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x1b\n\x13\x66\x61lse_positive_rate\x18\x08 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\x12\x12\n\nrecall_at1\x18\x05 \x01(\x02\x12\x15\n\rprecision_at1\x18\x06 \x01(\x02\x12\x1f\n\x17\x66\x61lse_positive_rate_at1\x18\t \x01(\x02\x12\x14\n\x0c\x66\x31_score_at1\x18\x07 \x01(\x02\x12\x1b\n\x13true_positive_count\x18\n \x01(\x03\x12\x1c\n\x14\x66\x61lse_positive_count\x18\x0b \x01(\x03\x12\x1c\n\x14\x66\x61lse_negative_count\x18\x0c \x01(\x03\x12\x1b\n\x13true_negative_count\x18\r \x01(\x03\x1a\xc0\x01\n\x0f\x43onfusionMatrix\x12\x1a\n\x12\x61nnotation_spec_id\x18\x01 \x03(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x03(\t\x12]\n\x03row\x18\x02 \x03(\x0b\x32P.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row\x1a\x1c\n\x03Row\x12\x15\n\rexample_count\x18\x01 \x03(\x05*Y\n\x12\x43lassificationType\x12#\n\x1f\x43LASSIFICATION_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nMULTICLASS\x10\x01\x12\x0e\n\nMULTILABEL\x10\x02\x42\xae\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x13\x43lassificationProtoZ7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationAnnotation").msgclass - VideoClassificationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationAnnotation").msgclass - ClassificationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics").msgclass - ClassificationEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry").msgclass - ClassificationEvaluationMetrics::ConfusionMatrix = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix").msgclass - ClassificationEvaluationMetrics::ConfusionMatrix::Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row").msgclass - ClassificationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ClassificationType").enummodule - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb deleted file mode 100644 index 631c71630e0e..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/column_spec_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/column_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/data_stats_pb' -require 'google/cloud/automl/v1beta1/data_types_pb' - - -descriptor_data = "\n-google/cloud/automl/v1beta1/column_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a,google/cloud/automl/v1beta1/data_stats.proto\x1a,google/cloud/automl/v1beta1/data_types.proto\"\x9b\x04\n\nColumnSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\tdata_type\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataType\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12:\n\ndata_stats\x18\x04 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats\x12X\n\x16top_correlated_columns\x18\x05 \x03(\x0b\x32\x38.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x1at\n\x10\x43orrelatedColumn\x12\x16\n\x0e\x63olumn_spec_id\x18\x01 \x01(\t\x12H\n\x11\x63orrelation_stats\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1beta1.CorrelationStats:\x94\x01\xea\x41\x90\x01\n automl.googleapis.com/ColumnSpec\x12lprojects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ColumnSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ColumnSpec").msgclass - ColumnSpec::CorrelatedColumn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb deleted file mode 100644 index 1a0c06144eb3..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_items_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/data_items.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/geometry_pb' -require 'google/cloud/automl/v1beta1/io_pb' -require 'google/cloud/automl/v1beta1/temporal_pb' -require 'google/cloud/automl/v1beta1/text_segment_pb' -require 'google/protobuf/struct_pb' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/data_items.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/geometry.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a*google/cloud/automl/v1beta1/temporal.proto\x1a.google/cloud/automl/v1beta1/text_segment.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x7f\n\x05Image\x12\x15\n\x0bimage_bytes\x18\x01 \x01(\x0cH\x00\x12@\n\x0cinput_config\x18\x06 \x01(\x0b\x32(.google.cloud.automl.v1beta1.InputConfigH\x00\x12\x15\n\rthumbnail_uri\x18\x04 \x01(\tB\x06\n\x04\x64\x61ta\"F\n\x0bTextSnippet\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\t\x12\x11\n\tmime_type\x18\x02 \x01(\t\x12\x13\n\x0b\x63ontent_uri\x18\x04 \x01(\t\"\xef\x01\n\x12\x44ocumentDimensions\x12S\n\x04unit\x18\x01 \x01(\x0e\x32\x45.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit\x12\r\n\x05width\x18\x02 \x01(\x02\x12\x0e\n\x06height\x18\x03 \x01(\x02\"e\n\x15\x44ocumentDimensionUnit\x12\'\n#DOCUMENT_DIMENSION_UNIT_UNSPECIFIED\x10\x00\x12\x08\n\x04INCH\x10\x01\x12\x0e\n\nCENTIMETER\x10\x02\x12\t\n\x05POINT\x10\x03\"\xf9\x05\n\x08\x44ocument\x12\x46\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.DocumentInputConfig\x12?\n\rdocument_text\x18\x02 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippet\x12<\n\x06layout\x18\x03 \x03(\x0b\x32,.google.cloud.automl.v1beta1.Document.Layout\x12L\n\x13\x64ocument_dimensions\x18\x04 \x01(\x0b\x32/.google.cloud.automl.v1beta1.DocumentDimensions\x12\x12\n\npage_count\x18\x05 \x01(\x05\x1a\xc3\x03\n\x06Layout\x12>\n\x0ctext_segment\x18\x01 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSegment\x12\x13\n\x0bpage_number\x18\x02 \x01(\x05\x12@\n\rbounding_poly\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12W\n\x11text_segment_type\x18\x04 \x01(\x0e\x32<.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType\"\xc8\x01\n\x0fTextSegmentType\x12!\n\x1dTEXT_SEGMENT_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05TOKEN\x10\x01\x12\r\n\tPARAGRAPH\x10\x02\x12\x0e\n\nFORM_FIELD\x10\x03\x12\x13\n\x0f\x46ORM_FIELD_NAME\x10\x04\x12\x17\n\x13\x46ORM_FIELD_CONTENTS\x10\x05\x12\t\n\x05TABLE\x10\x06\x12\x10\n\x0cTABLE_HEADER\x10\x07\x12\r\n\tTABLE_ROW\x10\x08\x12\x0e\n\nTABLE_CELL\x10\t\"F\n\x03Row\x12\x17\n\x0f\x63olumn_spec_ids\x18\x02 \x03(\t\x12&\n\x06values\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value\"\xfe\x01\n\x0e\x45xamplePayload\x12\x33\n\x05image\x18\x01 \x01(\x0b\x32\".google.cloud.automl.v1beta1.ImageH\x00\x12@\n\x0ctext_snippet\x18\x02 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippetH\x00\x12\x39\n\x08\x64ocument\x18\x04 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DocumentH\x00\x12/\n\x03row\x18\x03 \x01(\x0b\x32 .google.cloud.automl.v1beta1.RowH\x00\x42\t\n\x07payloadB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - Image = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Image").msgclass - TextSnippet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSnippet").msgclass - DocumentDimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentDimensions").msgclass - DocumentDimensions::DocumentDimensionUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit").enummodule - Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document").msgclass - Document::Layout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document.Layout").msgclass - Document::Layout::TextSegmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Document.Layout.TextSegmentType").enummodule - Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Row").msgclass - ExamplePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExamplePayload").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb deleted file mode 100644 index becbd202cf0c..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_stats_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/data_stats.proto - -require 'google/protobuf' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/data_stats.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\xfd\x03\n\tDataStats\x12\x42\n\rfloat64_stats\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.Float64StatsH\x00\x12@\n\x0cstring_stats\x18\x04 \x01(\x0b\x32(.google.cloud.automl.v1beta1.StringStatsH\x00\x12\x46\n\x0ftimestamp_stats\x18\x05 \x01(\x0b\x32+.google.cloud.automl.v1beta1.TimestampStatsH\x00\x12>\n\x0b\x61rray_stats\x18\x06 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.ArrayStatsH\x00\x12@\n\x0cstruct_stats\x18\x07 \x01(\x0b\x32(.google.cloud.automl.v1beta1.StructStatsH\x00\x12\x44\n\x0e\x63\x61tegory_stats\x18\x08 \x01(\x0b\x32*.google.cloud.automl.v1beta1.CategoryStatsH\x00\x12\x1c\n\x14\x64istinct_value_count\x18\x01 \x01(\x03\x12\x18\n\x10null_value_count\x18\x02 \x01(\x03\x12\x19\n\x11valid_value_count\x18\t \x01(\x03\x42\x07\n\x05stats\"\xdd\x01\n\x0c\x46loat64Stats\x12\x0c\n\x04mean\x18\x01 \x01(\x01\x12\x1a\n\x12standard_deviation\x18\x02 \x01(\x01\x12\x11\n\tquantiles\x18\x03 \x03(\x01\x12T\n\x11histogram_buckets\x18\x04 \x03(\x0b\x32\x39.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket\x1a:\n\x0fHistogramBucket\x12\x0b\n\x03min\x18\x01 \x01(\x01\x12\x0b\n\x03max\x18\x02 \x01(\x01\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\"\x8d\x01\n\x0bStringStats\x12P\n\x11top_unigram_stats\x18\x01 \x03(\x0b\x32\x35.google.cloud.automl.v1beta1.StringStats.UnigramStats\x1a,\n\x0cUnigramStats\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"\xf4\x02\n\x0eTimestampStats\x12V\n\x0egranular_stats\x18\x01 \x03(\x0b\x32>.google.cloud.automl.v1beta1.TimestampStats.GranularStatsEntry\x1a\x98\x01\n\rGranularStats\x12W\n\x07\x62uckets\x18\x01 \x03(\x0b\x32\x46.google.cloud.automl.v1beta1.TimestampStats.GranularStats.BucketsEntry\x1a.\n\x0c\x42ucketsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01\x1ao\n\x12GranularStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12H\n\x05value\x18\x02 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TimestampStats.GranularStats:\x02\x38\x01\"J\n\nArrayStats\x12<\n\x0cmember_stats\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats\"\xb7\x01\n\x0bStructStats\x12M\n\x0b\x66ield_stats\x18\x01 \x03(\x0b\x32\x38.google.cloud.automl.v1beta1.StructStats.FieldStatsEntry\x1aY\n\x0f\x46ieldStatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x35\n\x05value\x18\x02 \x01(\x0b\x32&.google.cloud.automl.v1beta1.DataStats:\x02\x38\x01\"\xa0\x01\n\rCategoryStats\x12Z\n\x12top_category_stats\x18\x01 \x03(\x0b\x32>.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats\x1a\x33\n\x13SingleCategoryStats\x12\r\n\x05value\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\"%\n\x10\x43orrelationStats\x12\x11\n\tcramers_v\x18\x01 \x01(\x01\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - DataStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DataStats").msgclass - Float64Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Float64Stats").msgclass - Float64Stats::HistogramBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Float64Stats.HistogramBucket").msgclass - StringStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StringStats").msgclass - StringStats::UnigramStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StringStats.UnigramStats").msgclass - TimestampStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimestampStats").msgclass - TimestampStats::GranularStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimestampStats.GranularStats").msgclass - ArrayStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ArrayStats").msgclass - StructStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StructStats").msgclass - CategoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CategoryStats").msgclass - CategoryStats::SingleCategoryStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats").msgclass - CorrelationStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CorrelationStats").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb deleted file mode 100644 index e1edf66dbe0d..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/data_types_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/data_types.proto - -require 'google/protobuf' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/data_types.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\xfc\x01\n\x08\x44\x61taType\x12\x42\n\x11list_element_type\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataTypeH\x00\x12>\n\x0bstruct_type\x18\x03 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.StructTypeH\x00\x12\x15\n\x0btime_format\x18\x05 \x01(\tH\x00\x12\x38\n\ttype_code\x18\x01 \x01(\x0e\x32%.google.cloud.automl.v1beta1.TypeCode\x12\x10\n\x08nullable\x18\x04 \x01(\x08\x42\t\n\x07\x64\x65tails\"\xa7\x01\n\nStructType\x12\x43\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x33.google.cloud.automl.v1beta1.StructType.FieldsEntry\x1aT\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x34\n\x05value\x18\x02 \x01(\x0b\x32%.google.cloud.automl.v1beta1.DataType:\x02\x38\x01*r\n\x08TypeCode\x12\x19\n\x15TYPE_CODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x46LOAT64\x10\x03\x12\r\n\tTIMESTAMP\x10\x04\x12\n\n\x06STRING\x10\x06\x12\t\n\x05\x41RRAY\x10\x08\x12\n\n\x06STRUCT\x10\t\x12\x0c\n\x08\x43\x41TEGORY\x10\nB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - DataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DataType").msgclass - StructType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.StructType").msgclass - TypeCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TypeCode").enummodule - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb deleted file mode 100644 index 3135034e2cdc..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/dataset_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/dataset.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/image_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_pb' -require 'google/cloud/automl/v1beta1/translation_pb' -require 'google/cloud/automl/v1beta1/video_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/cloud/automl/v1beta1/dataset.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\t\n\x07\x44\x61taset\x12_\n\x1ctranslation_dataset_metadata\x18\x17 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TranslationDatasetMetadataH\x00\x12p\n%image_classification_dataset_metadata\x18\x18 \x01(\x0b\x32?.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataH\x00\x12n\n$text_classification_dataset_metadata\x18\x19 \x01(\x0b\x32>.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataH\x00\x12s\n\'image_object_detection_dataset_metadata\x18\x1a \x01(\x0b\x32@.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataH\x00\x12p\n%video_classification_dataset_metadata\x18\x1f \x01(\x0b\x32?.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataH\x00\x12q\n&video_object_tracking_dataset_metadata\x18\x1d \x01(\x0b\x32?.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataH\x00\x12\x66\n text_extraction_dataset_metadata\x18\x1c \x01(\x0b\x32:.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataH\x00\x12\x64\n\x1ftext_sentiment_dataset_metadata\x18\x1e \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataH\x00\x12U\n\x17tables_dataset_metadata\x18! \x01(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesDatasetMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x15\n\rexample_count\x18\x15 \x01(\x05\x12/\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04\x65tag\x18\x11 \x01(\t:^\xea\x41[\n\x1d\x61utoml.googleapis.com/Dataset\x12:projects/{project}/locations/{location}/datasets/{dataset}B\x12\n\x10\x64\x61taset_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Dataset").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb deleted file mode 100644 index 2e9510dd00d8..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/detection_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/detection.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/geometry_pb' -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n+google/cloud/automl/v1beta1/detection.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a*google/cloud/automl/v1beta1/geometry.proto\x1a\x1egoogle/protobuf/duration.proto\"p\n\x1eImageObjectDetectionAnnotation\x12?\n\x0c\x62ounding_box\x18\x01 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12\r\n\x05score\x18\x02 \x01(\x02\"\xb4\x01\n\x1dVideoObjectTrackingAnnotation\x12\x13\n\x0binstance_id\x18\x01 \x01(\t\x12.\n\x0btime_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12?\n\x0c\x62ounding_box\x18\x03 \x01(\x0b\x32).google.cloud.automl.v1beta1.BoundingPoly\x12\r\n\x05score\x18\x04 \x01(\x02\"\xae\x02\n\x17\x42oundingBoxMetricsEntry\x12\x15\n\riou_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16mean_average_precision\x18\x02 \x01(\x02\x12o\n\x1a\x63onfidence_metrics_entries\x18\x03 \x03(\x0b\x32K.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x11\n\tprecision\x18\x03 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x04 \x01(\x02\"\xd6\x01\n%ImageObjectDetectionEvaluationMetrics\x12$\n\x1c\x65valuated_bounding_box_count\x18\x01 \x01(\x05\x12Z\n\x1c\x62ounding_box_metrics_entries\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x03 \x01(\x02\"\xf4\x01\n$VideoObjectTrackingEvaluationMetrics\x12\x1d\n\x15\x65valuated_frame_count\x18\x01 \x01(\x05\x12$\n\x1c\x65valuated_bounding_box_count\x18\x02 \x01(\x05\x12Z\n\x1c\x62ounding_box_metrics_entries\x18\x04 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry\x12+\n#bounding_box_mean_average_precision\x18\x06 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ImageObjectDetectionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation").msgclass - VideoObjectTrackingAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation").msgclass - BoundingBoxMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingBoxMetricsEntry").msgclass - BoundingBoxMetricsEntry::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry").msgclass - ImageObjectDetectionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics").msgclass - VideoObjectTrackingEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb deleted file mode 100644 index 4a92f0a318eb..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/geometry_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/geometry.proto - -require 'google/protobuf' - - -descriptor_data = "\n*google/cloud/automl/v1beta1/geometry.proto\x12\x1bgoogle.cloud.automl.v1beta1\"(\n\x10NormalizedVertex\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\"Z\n\x0c\x42oundingPoly\x12J\n\x13normalized_vertices\x18\x02 \x03(\x0b\x32-.google.cloud.automl.v1beta1.NormalizedVertexB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - NormalizedVertex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.NormalizedVertex").msgclass - BoundingPoly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BoundingPoly").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb deleted file mode 100644 index 8631c4f1de2e..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/image_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/image.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/annotation_spec_pb' -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1beta1/image.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x31google/cloud/automl/v1beta1/annotation_spec.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\"r\n\"ImageClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"%\n#ImageObjectDetectionDatasetMetadata\"\xb2\x01\n ImageClassificationModelMetadata\x12\x15\n\rbase_model_id\x18\x01 \x01(\t\x12\x14\n\x0ctrain_budget\x18\x02 \x01(\x03\x12\x12\n\ntrain_cost\x18\x03 \x01(\x03\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12\x12\n\nmodel_type\x18\x07 \x01(\t\x12\x10\n\x08node_qps\x18\r \x01(\x01\x12\x12\n\nnode_count\x18\x0e \x01(\x03\"\xbe\x01\n!ImageObjectDetectionModelMetadata\x12\x12\n\nmodel_type\x18\x01 \x01(\t\x12\x12\n\nnode_count\x18\x03 \x01(\x03\x12\x10\n\x08node_qps\x18\x04 \x01(\x01\x12\x13\n\x0bstop_reason\x18\x05 \x01(\t\x12%\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x12#\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\"@\n*ImageClassificationModelDeploymentMetadata\x12\x12\n\nnode_count\x18\x01 \x01(\x03\"A\n+ImageObjectDetectionModelDeploymentMetadata\x12\x12\n\nnode_count\x18\x01 \x01(\x03\x42\xa7\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\nImageProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ImageClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata").msgclass - ImageObjectDetectionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata").msgclass - ImageClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationModelMetadata").msgclass - ImageObjectDetectionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata").msgclass - ImageClassificationModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata").msgclass - ImageObjectDetectionModelDeploymentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb deleted file mode 100644 index 0ae4984c691f..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/io_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/io.proto - -require 'google/protobuf' - - -descriptor_data = "\n$google/cloud/automl/v1beta1/io.proto\x12\x1bgoogle.cloud.automl.v1beta1\"\x92\x02\n\x0bInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x12\x44\n\x06params\x18\x02 \x03(\x0b\x32\x34.google.cloud.automl.v1beta1.InputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x08\n\x06source\"\xa9\x01\n\x17\x42\x61tchPredictInputConfig\x12<\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSourceH\x00\x12\x46\n\x0f\x62igquery_source\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.BigQuerySourceH\x00\x42\x08\n\x06source\"Q\n\x13\x44ocumentInputConfig\x12:\n\ngcs_source\x18\x01 \x01(\x0b\x32&.google.cloud.automl.v1beta1.GcsSource\"\xb7\x01\n\x0cOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xc3\x01\n\x18\x42\x61tchPredictOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\xcf\x02\n\x17ModelExportOutputConfig\x12\x46\n\x0fgcs_destination\x18\x01 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcsDestinationH\x00\x12\x46\n\x0fgcr_destination\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.GcrDestinationH\x00\x12\x14\n\x0cmodel_format\x18\x04 \x01(\t\x12P\n\x06params\x18\x02 \x03(\x0b\x32@.google.cloud.automl.v1beta1.ModelExportOutputConfig.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\r\n\x0b\x64\x65stination\"\x86\x01\n#ExportEvaluatedExamplesOutputConfig\x12P\n\x14\x62igquery_destination\x18\x02 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.BigQueryDestinationH\x00\x42\r\n\x0b\x64\x65stination\"\x1f\n\tGcsSource\x12\x12\n\ninput_uris\x18\x01 \x03(\t\"#\n\x0e\x42igQuerySource\x12\x11\n\tinput_uri\x18\x01 \x01(\t\"+\n\x0eGcsDestination\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\")\n\x13\x42igQueryDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\t\"$\n\x0eGcrDestination\x12\x12\n\noutput_uri\x18\x01 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.InputConfig").msgclass - BatchPredictInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictInputConfig").msgclass - DocumentInputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DocumentInputConfig").msgclass - OutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.OutputConfig").msgclass - BatchPredictOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOutputConfig").msgclass - ModelExportOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ModelExportOutputConfig").msgclass - ExportEvaluatedExamplesOutputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig").msgclass - GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcsSource").msgclass - BigQuerySource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BigQuerySource").msgclass - GcsDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcsDestination").msgclass - BigQueryDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BigQueryDestination").msgclass - GcrDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GcrDestination").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb deleted file mode 100644 index 0b5f16c6bf27..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_evaluation_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/model_evaluation.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/classification_pb' -require 'google/cloud/automl/v1beta1/detection_pb' -require 'google/cloud/automl/v1beta1/regression_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_extraction_pb' -require 'google/cloud/automl/v1beta1/text_sentiment_pb' -require 'google/cloud/automl/v1beta1/translation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n2google/cloud/automl/v1beta1/model_evaluation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a+google/cloud/automl/v1beta1/detection.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a\x31google/cloud/automl/v1beta1/text_extraction.proto\x1a\x30google/cloud/automl/v1beta1/text_sentiment.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\x08\n\x0fModelEvaluation\x12i\n!classification_evaluation_metrics\x18\x08 \x01(\x0b\x32<.google.cloud.automl.v1beta1.ClassificationEvaluationMetricsH\x00\x12\x61\n\x1dregression_evaluation_metrics\x18\x18 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.RegressionEvaluationMetricsH\x00\x12\x63\n\x1etranslation_evaluation_metrics\x18\t \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.TranslationEvaluationMetricsH\x00\x12w\n)image_object_detection_evaluation_metrics\x18\x0c \x01(\x0b\x32\x42.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsH\x00\x12u\n(video_object_tracking_evaluation_metrics\x18\x0e \x01(\x0b\x32\x41.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsH\x00\x12h\n!text_sentiment_evaluation_metrics\x18\x0b \x01(\x0b\x32;.google.cloud.automl.v1beta1.TextSentimentEvaluationMetricsH\x00\x12j\n\"text_extraction_evaluation_metrics\x18\r \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1a\n\x12\x61nnotation_spec_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x0f \x01(\t\x12/\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1f\n\x17\x65valuated_example_count\x18\x06 \x01(\x05:\x87\x01\xea\x41\x83\x01\n%automl.googleapis.com/ModelEvaluation\x12Zprojects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}B\t\n\x07metricsB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - ModelEvaluation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ModelEvaluation").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb deleted file mode 100644 index 5e4ceb1dd794..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/model_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/model.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/image_pb' -require 'google/cloud/automl/v1beta1/tables_pb' -require 'google/cloud/automl/v1beta1/text_pb' -require 'google/cloud/automl/v1beta1/translation_pb' -require 'google/cloud/automl/v1beta1/video_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1beta1/model.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a\'google/cloud/automl/v1beta1/image.proto\x1a(google/cloud/automl/v1beta1/tables.proto\x1a&google/cloud/automl/v1beta1/text.proto\x1a-google/cloud/automl/v1beta1/translation.proto\x1a\'google/cloud/automl/v1beta1/video.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcc\n\n\x05Model\x12[\n\x1atranslation_model_metadata\x18\x0f \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.TranslationModelMetadataH\x00\x12l\n#image_classification_model_metadata\x18\r \x01(\x0b\x32=.google.cloud.automl.v1beta1.ImageClassificationModelMetadataH\x00\x12j\n\"text_classification_model_metadata\x18\x0e \x01(\x0b\x32<.google.cloud.automl.v1beta1.TextClassificationModelMetadataH\x00\x12o\n%image_object_detection_model_metadata\x18\x14 \x01(\x0b\x32>.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataH\x00\x12l\n#video_classification_model_metadata\x18\x17 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoClassificationModelMetadataH\x00\x12m\n$video_object_tracking_model_metadata\x18\x15 \x01(\x0b\x32=.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataH\x00\x12\x62\n\x1etext_extraction_model_metadata\x18\x13 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.TextExtractionModelMetadataH\x00\x12Q\n\x15tables_model_metadata\x18\x18 \x01(\x0b\x32\x30.google.cloud.automl.v1beta1.TablesModelMetadataH\x00\x12`\n\x1dtext_sentiment_model_metadata\x18\x16 \x01(\x0b\x32\x37.google.cloud.automl.v1beta1.TextSentimentModelMetadataH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\ndataset_id\x18\x03 \x01(\t\x12/\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\x10\x64\x65ployment_state\x18\x08 \x01(\x0e\x32\x32.google.cloud.automl.v1beta1.Model.DeploymentState\"Q\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x45PLOYED\x10\x01\x12\x0e\n\nUNDEPLOYED\x10\x02:X\xea\x41U\n\x1b\x61utoml.googleapis.com/Model\x12\x36projects/{project}/locations/{location}/models/{model}B\x10\n\x0emodel_metadataB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - Model = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Model").msgclass - Model::DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.Model.DeploymentState").enummodule - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb deleted file mode 100644 index 651d885fc239..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/operations_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/operations.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/io_pb' -require 'google/cloud/automl/v1beta1/model_pb' -require 'google/cloud/automl/v1beta1/model_evaluation_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/operations.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a$google/cloud/automl/v1beta1/io.proto\x1a\'google/cloud/automl/v1beta1/model.proto\x1a\x32google/cloud/automl/v1beta1/model_evaluation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x8b\x08\n\x11OperationMetadata\x12N\n\x0e\x64\x65lete_details\x18\x08 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.DeleteOperationMetadataH\x00\x12Y\n\x14\x64\x65ploy_model_details\x18\x18 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.DeployModelOperationMetadataH\x00\x12]\n\x16undeploy_model_details\x18\x19 \x01(\x0b\x32;.google.cloud.automl.v1beta1.UndeployModelOperationMetadataH\x00\x12Y\n\x14\x63reate_model_details\x18\n \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.CreateModelOperationMetadataH\x00\x12W\n\x13import_data_details\x18\x0f \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ImportDataOperationMetadataH\x00\x12[\n\x15\x62\x61tch_predict_details\x18\x10 \x01(\x0b\x32:.google.cloud.automl.v1beta1.BatchPredictOperationMetadataH\x00\x12W\n\x13\x65xport_data_details\x18\x15 \x01(\x0b\x32\x38.google.cloud.automl.v1beta1.ExportDataOperationMetadataH\x00\x12Y\n\x14\x65xport_model_details\x18\x16 \x01(\x0b\x32\x39.google.cloud.automl.v1beta1.ExportModelOperationMetadataH\x00\x12r\n!export_evaluated_examples_details\x18\x1a \x01(\x0b\x32\x45.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataH\x00\x12\x18\n\x10progress_percent\x18\r \x01(\x05\x12,\n\x10partial_failures\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\t\n\x07\x64\x65tails\"\x19\n\x17\x44\x65leteOperationMetadata\"\x1e\n\x1c\x44\x65ployModelOperationMetadata\" \n\x1eUndeployModelOperationMetadata\"\x1e\n\x1c\x43reateModelOperationMetadata\"\x1d\n\x1bImportDataOperationMetadata\"\xef\x01\n\x1b\x45xportDataOperationMetadata\x12\x62\n\x0boutput_info\x18\x01 \x01(\x0b\x32M.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo\x1al\n\x14\x45xportDataOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xc3\x02\n\x1d\x42\x61tchPredictOperationMetadata\x12J\n\x0cinput_config\x18\x01 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfig\x12\x66\n\x0boutput_info\x18\x02 \x01(\x0b\x32Q.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo\x1an\n\x16\x42\x61tchPredictOutputInfo\x12\x1e\n\x14gcs_output_directory\x18\x01 \x01(\tH\x00\x12!\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tH\x00\x42\x11\n\x0foutput_location\"\xbb\x01\n\x1c\x45xportModelOperationMetadata\x12\x64\n\x0boutput_info\x18\x02 \x01(\x0b\x32O.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo\x1a\x35\n\x15\x45xportModelOutputInfo\x12\x1c\n\x14gcs_output_directory\x18\x01 \x01(\t\"\xee\x01\n(ExportEvaluatedExamplesOperationMetadata\x12|\n\x0boutput_info\x18\x02 \x01(\x0b\x32g.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo\x1a\x44\n!ExportEvaluatedExamplesOutputInfo\x12\x1f\n\x17\x62igquery_output_dataset\x18\x02 \x01(\tB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.OperationMetadata").msgclass - DeleteOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteOperationMetadata").msgclass - DeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeployModelOperationMetadata").msgclass - UndeployModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UndeployModelOperationMetadata").msgclass - CreateModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateModelOperationMetadata").msgclass - ImportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImportDataOperationMetadata").msgclass - ExportDataOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataOperationMetadata").msgclass - ExportDataOperationMetadata::ExportDataOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo").msgclass - BatchPredictOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOperationMetadata").msgclass - BatchPredictOperationMetadata::BatchPredictOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo").msgclass - ExportModelOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelOperationMetadata").msgclass - ExportModelOperationMetadata::ExportModelOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo").msgclass - ExportEvaluatedExamplesOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata").msgclass - ExportEvaluatedExamplesOperationMetadata::ExportEvaluatedExamplesOutputInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb deleted file mode 100644 index 3ef3fce3b376..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/prediction_service/credentials" -require "google/cloud/automl/v1beta1/prediction_service/paths" -require "google/cloud/automl/v1beta1/prediction_service/operations" -require "google/cloud/automl/v1beta1/prediction_service/client" -require "google/cloud/automl/v1beta1/prediction_service/rest" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/automl/v1beta1/prediction_service" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/automl/v1beta1/prediction_service/rest" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - module PredictionService - end - end - end - end -end - -helper_path = ::File.join __dir__, "prediction_service", "helpers.rb" -require "google/cloud/automl/v1beta1/prediction_service/helpers" if ::File.file? helper_path diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb deleted file mode 100644 index a82dd9c0abbb..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/client.rb +++ /dev/null @@ -1,727 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1beta1/prediction_service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - ## - # Client for the PredictionService service. - # - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :prediction_service_stub - - ## - # Configure the PredictionService Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PredictionService clients - # ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "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.predict.timeout = 60.0 - - default_config.rpcs.batch_predict.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService 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 {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @prediction_service_stub.universe_domain - end - - ## - # Create a new PredictionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PredictionService client. - # @yieldparam config [Client::Configuration] - # - 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/automl/v1beta1/prediction_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.nil? || - (@config.endpoint == Configuration::DEFAULT_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.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @prediction_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::AutoML::V1beta1::PredictionService::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @prediction_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictionService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @prediction_service_stub.logger - end - - # Service calls - - ## - # Perform an online prediction. The prediction result will be directly - # returned in the response. - # Available for following ML problems, and their expected request payloads: - # * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Text Classification - TextSnippet, content up to 60,000 characters, - # UTF-8 encoded. - # * Text Extraction - TextSnippet, content up to 30,000 characters, - # UTF-8 NFC encoded. - # * Translation - TextSnippet, content up to 25,000 characters, UTF-8 - # encoded. - # * Tables - Row, with column values matching the columns of the model, - # up to 5MB. Not available for FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. - # * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 - # encoded. - # - # @overload predict(request, options = nil) - # Pass arguments to `predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::PredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::PredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload predict(name: nil, payload: nil, params: nil) - # Pass arguments to `predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the prediction. - # @param payload [::Google::Cloud::AutoML::V1beta1::ExamplePayload, ::Hash] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned in the response. Default is 100, the - # requested value may be limited by server. - # * For Tables: - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotation. - # The default is false. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::PredictRequest.new - # - # # Call the predict method. - # result = client.predict request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. - # p result - # - def predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::PredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.predict.timeout, - metadata: metadata, - retry_policy: @config.rpcs.predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.call_rpc :predict, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict Predict}, batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via GetOperation - # method. Once the operation is done, {::Google::Cloud::AutoML::V1beta1::BatchPredictResult BatchPredictResult} is returned in - # the {::Google::Longrunning::Operation#response response} field. - # Available for following ML problems: - # * Image Classification - # * Image Object Detection - # * Video Classification - # * Video Object Tracking * Text Extraction - # * Tables - # - # @overload batch_predict(request, options = nil) - # Pass arguments to `batch_predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::BatchPredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil) - # Pass arguments to `batch_predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the batch prediction. - # @param input_config [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig, ::Hash] - # Required. The input configuration for batch prediction. - # @param output_config [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig, ::Hash] - # Required. The Configuration specifying where output predictions should - # be written. - # @param params [::Hash{::String => ::String}] - # Required. Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # * For Text Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be produced per image. Default is 100, the - # requested value may be limited by server. - # - # * For Video Classification : - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # `segment_classification` - (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is "true". - # `shot_classification` - (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. The default is "false". - # `1s_interval_classification` - (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. The default is - # "false". - # - # * For Tables: - # - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotations. The - # default is false. - # - # * For Video Object Tracking: - # - # `score_threshold` - (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned per frame. Default is 100, the requested - # value may be limited by server. - # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size will be - # returned. Value in 0 to 1 range. Default is 0. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new - # - # # Call the batch_predict method. - # result = client.batch_predict request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_predict.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.call_rpc :batch_predict, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PredictionService API. - # - # This class represents the configuration for PredictionService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # predict to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the PredictionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `predict` - # @return [::Gapic::Config::Method] - # - attr_reader :predict - ## - # RPC-specific configuration for `batch_predict` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_predict - - # @private - def initialize parent_rpcs = nil - predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict - @predict = ::Gapic::Config::Method.new predict_config - batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict - @batch_predict = ::Gapic::Config::Method.new batch_predict_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb deleted file mode 100644 index a5db32e08e4d..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - # Credentials for the PredictionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "AUTOML_CREDENTIALS", - "AUTOML_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "AUTOML_CREDENTIALS_JSON", - "AUTOML_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb deleted file mode 100644 index fc03f007a693..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/operations.rb +++ /dev/null @@ -1,851 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PredictionService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService Operations 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 {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - 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/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - 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_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"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("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb deleted file mode 100644 index a43bf51c919f..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/paths.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - # Path helper methods for the PredictionService API. - module Paths - ## - # Create a fully-qualified Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/models/{model}` - # - # @param project [String] - # @param location [String] - # @param model [String] - # - # @return [::String] - def model_path project:, location:, model: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/models/#{model}" - end - - extend self - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb deleted file mode 100644 index 7d3604f143b4..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/automl/v1beta1/version" - -require "google/cloud/automl/v1beta1/prediction_service/credentials" -require "google/cloud/automl/v1beta1/prediction_service/paths" -require "google/cloud/automl/v1beta1/prediction_service/rest/operations" -require "google/cloud/automl/v1beta1/prediction_service/rest/client" - -module Google - module Cloud - module AutoML - module V1beta1 - ## - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/automl/v1beta1/prediction_service/rest" - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - module PredictionService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/automl/v1beta1/prediction_service/rest/helpers" if ::File.file? helper_path diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb deleted file mode 100644 index 43ddbdebe172..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/client.rb +++ /dev/null @@ -1,670 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service/rest/service_stub" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - module Rest - ## - # REST client for the PredictionService service. - # - # AutoML Prediction API. - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :prediction_service_stub - - ## - # Configure the PredictionService Client class. - # - # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all PredictionService clients - # ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "AutoML", "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.predict.timeout = 60.0 - - default_config.rpcs.batch_predict.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService 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 {Client.configure}. - # - # See {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @prediction_service_stub.universe_domain - end - - ## - # Create a new PredictionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the PredictionService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # 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.nil? || - (@config.endpoint == Configuration::DEFAULT_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 = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @prediction_service_stub = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @prediction_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @prediction_service_stub.logger - end - - # Service calls - - ## - # Perform an online prediction. The prediction result will be directly - # returned in the response. - # Available for following ML problems, and their expected request payloads: - # * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes - # up to 30MB. - # * Text Classification - TextSnippet, content up to 60,000 characters, - # UTF-8 encoded. - # * Text Extraction - TextSnippet, content up to 30,000 characters, - # UTF-8 NFC encoded. - # * Translation - TextSnippet, content up to 25,000 characters, UTF-8 - # encoded. - # * Tables - Row, with column values matching the columns of the model, - # up to 5MB. Not available for FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. - # * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 - # encoded. - # - # @overload predict(request, options = nil) - # Pass arguments to `predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::PredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::PredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload predict(name: nil, payload: nil, params: nil) - # Pass arguments to `predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the prediction. - # @param payload [::Google::Cloud::AutoML::V1beta1::ExamplePayload, ::Hash] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @param params [::Hash{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned in the response. Default is 100, the - # requested value may be limited by server. - # * For Tables: - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotation. - # The default is false. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::PredictRequest.new - # - # # Call the predict method. - # result = client.predict request - # - # # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. - # p result - # - def predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::PredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.predict.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.predict request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Perform a batch prediction. Unlike the online {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client#predict Predict}, batch - # prediction result won't be immediately available in the response. Instead, - # a long running operation object is returned. User can poll the operation - # result via GetOperation - # method. Once the operation is done, {::Google::Cloud::AutoML::V1beta1::BatchPredictResult BatchPredictResult} is returned in - # the {::Google::Longrunning::Operation#response response} field. - # Available for following ML problems: - # * Image Classification - # * Image Object Detection - # * Video Classification - # * Video Object Tracking * Text Extraction - # * Tables - # - # @overload batch_predict(request, options = nil) - # Pass arguments to `batch_predict` via a request object, either of type - # {::Google::Cloud::AutoML::V1beta1::BatchPredictRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_predict(name: nil, input_config: nil, output_config: nil, params: nil) - # Pass arguments to `batch_predict` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the model requested to serve the batch prediction. - # @param input_config [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig, ::Hash] - # Required. The input configuration for batch prediction. - # @param output_config [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig, ::Hash] - # Required. The Configuration specifying where output predictions should - # be written. - # @param params [::Hash{::String => ::String}] - # Required. Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # * For Text Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be produced per image. Default is 100, the - # requested value may be limited by server. - # - # * For Video Classification : - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # `segment_classification` - (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is "true". - # `shot_classification` - (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. The default is "false". - # `1s_interval_classification` - (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. The default is - # "false". - # - # * For Tables: - # - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotations. The - # default is false. - # - # * For Video Object Tracking: - # - # `score_threshold` - (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned per frame. Default is 100, the requested - # value may be limited by server. - # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size will be - # returned. Value in 0 to 1 range. Default is 0. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/automl/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new - # - # # Call the batch_predict method. - # result = client.batch_predict request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def batch_predict request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_predict.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_predict.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_predict.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @prediction_service_stub.batch_predict request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the PredictionService REST API. - # - # This class represents the configuration for PredictionService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # predict to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.predict.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the PredictionService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `predict` - # @return [::Gapic::Config::Method] - # - attr_reader :predict - ## - # RPC-specific configuration for `batch_predict` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_predict - - # @private - def initialize parent_rpcs = nil - predict_config = parent_rpcs.predict if parent_rpcs.respond_to? :predict - @predict = ::Gapic::Config::Method.new predict_config - batch_predict_config = parent_rpcs.batch_predict if parent_rpcs.respond_to? :batch_predict - @batch_predict = ::Gapic::Config::Method.new batch_predict_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb deleted file mode 100644 index f5e618e44755..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/operations.rb +++ /dev/null @@ -1,1095 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "automl.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the PredictionService Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the PredictionService Operations 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 {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - 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_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_operations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_operation(name: nil) - # Pass arguments to `get_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_operation(name: nil) - # Pass arguments to `delete_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to be cancelled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.wait_operation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::AutoML::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.wait_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "automl.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def wait_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_wait_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "wait_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the wait_operation REST call - # - # @param request_pb [::Google::Longrunning::WaitOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_wait_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:wait", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb deleted file mode 100644 index 4d4927cfe5ad..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service/rest/service_stub.rb +++ /dev/null @@ -1,205 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/automl/v1beta1/prediction_service_pb" - -module Google - module Cloud - module AutoML - module V1beta1 - module PredictionService - module Rest - ## - # REST service stub for the PredictionService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::PredictRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::AutoML::V1beta1::PredictResponse] - # A result object deserialized from the server's reply - def predict request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_predict_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "predict", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::AutoML::V1beta1::PredictResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def batch_predict request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_predict_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_predict", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::PredictRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_predict_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:predict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_predict REST call - # - # @param request_pb [::Google::Cloud::AutoML::V1beta1::BatchPredictRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_predict_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{name}:batchPredict", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb deleted file mode 100644 index 1d749800e047..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/prediction_service_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/prediction_service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/annotation_payload_pb' -require 'google/cloud/automl/v1beta1/data_items_pb' -require 'google/cloud/automl/v1beta1/io_pb' -require 'google/cloud/automl/v1beta1/operations_pb' -require 'google/longrunning/operations_pb' - - -descriptor_data = "\n4google/cloud/automl/v1beta1/prediction_service.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/automl/v1beta1/annotation_payload.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a$google/cloud/automl/v1beta1/io.proto\x1a,google/cloud/automl/v1beta1/operations.proto\x1a#google/longrunning/operations.proto\"\xfe\x01\n\x0ePredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12\x41\n\x07payload\x18\x02 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayloadB\x03\xe0\x41\x02\x12G\n\x06params\x18\x03 \x03(\x0b\x32\x37.google.cloud.automl.v1beta1.PredictRequest.ParamsEntry\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x9a\x02\n\x0fPredictResponse\x12?\n\x07payload\x18\x01 \x03(\x0b\x32..google.cloud.automl.v1beta1.AnnotationPayload\x12G\n\x12preprocessed_input\x18\x03 \x01(\x0b\x32+.google.cloud.automl.v1beta1.ExamplePayload\x12L\n\x08metadata\x18\x02 \x03(\x0b\x32:.google.cloud.automl.v1beta1.PredictResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xee\x02\n\x13\x42\x61tchPredictRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x61utoml.googleapis.com/Model\x12O\n\x0cinput_config\x18\x03 \x01(\x0b\x32\x34.google.cloud.automl.v1beta1.BatchPredictInputConfigB\x03\xe0\x41\x02\x12Q\n\routput_config\x18\x04 \x01(\x0b\x32\x35.google.cloud.automl.v1beta1.BatchPredictOutputConfigB\x03\xe0\x41\x02\x12Q\n\x06params\x18\x05 \x03(\x0b\x32<.google.cloud.automl.v1beta1.BatchPredictRequest.ParamsEntryB\x03\xe0\x41\x02\x1a-\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x96\x01\n\x12\x42\x61tchPredictResult\x12O\n\x08metadata\x18\x01 \x03(\x0b\x32=.google.cloud.automl.v1beta1.BatchPredictResult.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\x9e\x04\n\x11PredictionService\x12\xbe\x01\n\x07Predict\x12+.google.cloud.automl.v1beta1.PredictRequest\x1a,.google.cloud.automl.v1beta1.PredictResponse\"X\xda\x41\x13name,payload,params\x82\xd3\xe4\x93\x02<\"7/v1beta1/{name=projects/*/locations/*/models/*}:predict:\x01*\x12\xfc\x01\n\x0c\x42\x61tchPredict\x12\x30.google.cloud.automl.v1beta1.BatchPredictRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41\'\n\x12\x42\x61tchPredictResult\x12\x11OperationMetadata\xda\x41&name,input_config,output_config,params\x82\xd3\xe4\x93\x02\x41\"/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}\x12\xca\x01\n\x0eListTableSpecs\x12\x32.google.cloud.automl.v1beta1.ListTableSpecsRequest\x1a\x33.google.cloud.automl.v1beta1.ListTableSpecsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs\x12\xda\x01\n\x0fUpdateTableSpec\x12\x33.google.cloud.automl.v1beta1.UpdateTableSpecRequest\x1a&.google.cloud.automl.v1beta1.TableSpec\"j\xda\x41\ntable_spec\x82\xd3\xe4\x93\x02W2I/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}:\ntable_spec\x12\xc8\x01\n\rGetColumnSpec\x12\x31.google.cloud.automl.v1beta1.GetColumnSpecRequest\x1a\'.google.cloud.automl.v1beta1.ColumnSpec\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}\x12\xdb\x01\n\x0fListColumnSpecs\x12\x33.google.cloud.automl.v1beta1.ListColumnSpecsRequest\x1a\x34.google.cloud.automl.v1beta1.ListColumnSpecsResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs\x12\xee\x01\n\x10UpdateColumnSpec\x12\x34.google.cloud.automl.v1beta1.UpdateColumnSpecRequest\x1a\'.google.cloud.automl.v1beta1.ColumnSpec\"{\xda\x41\x0b\x63olumn_spec\x82\xd3\xe4\x93\x02g2X/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}:\x0b\x63olumn_spec\x12\xc9\x01\n\x0b\x43reateModel\x12/.google.cloud.automl.v1beta1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x38\"//v1beta1/{parent=projects/*/locations/*}/models:\x05model\x12\x9c\x01\n\x08GetModel\x12,.google.cloud.automl.v1beta1.GetModelRequest\x1a\".google.cloud.automl.v1beta1.Model\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{name=projects/*/locations/*/models/*}\x12\xaf\x01\n\nListModels\x12..google.cloud.automl.v1beta1.ListModelsRequest\x1a/.google.cloud.automl.v1beta1.ListModelsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1beta1/{parent=projects/*/locations/*}/models\x12\xca\x01\n\x0b\x44\x65leteModel\x12/.google.cloud.automl.v1beta1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1beta1/{name=projects/*/locations/*/models/*}\x12\xd4\x01\n\x0b\x44\x65ployModel\x12/.google.cloud.automl.v1beta1.DeployModelRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/locations/*/models/*}:deploy:\x01*\x12\xda\x01\n\rUndeployModel\x12\x31.google.cloud.automl.v1beta1.UndeployModelRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=\"8/v1beta1/{name=projects/*/locations/*/models/*}:undeploy:\x01*\x12\xe3\x01\n\x0b\x45xportModel\x12/.google.cloud.automl.v1beta1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02;\"6/v1beta1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\x8c\x02\n\x17\x45xportEvaluatedExamples\x12;.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest\x1a\x1d.google.longrunning.Operation\"\x94\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02L\"G/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples:\x01*\x12\xcd\x01\n\x12GetModelEvaluation\x12\x36.google.cloud.automl.v1beta1.GetModelEvaluationRequest\x1a,.google.cloud.automl.v1beta1.ModelEvaluation\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}\x12\xe0\x01\n\x14ListModelEvaluations\x12\x38.google.cloud.automl.v1beta1.ListModelEvaluationsRequest\x1a\x39.google.cloud.automl.v1beta1.ListModelEvaluationsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations\x1aI\xca\x41\x15\x61utoml.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa8\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x0b\x41utoMlProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateDatasetRequest").msgclass - GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetDatasetRequest").msgclass - ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListDatasetsRequest").msgclass - ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListDatasetsResponse").msgclass - UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateDatasetRequest").msgclass - DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteDatasetRequest").msgclass - ImportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ImportDataRequest").msgclass - ExportDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportDataRequest").msgclass - GetAnnotationSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetAnnotationSpecRequest").msgclass - GetTableSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetTableSpecRequest").msgclass - ListTableSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListTableSpecsRequest").msgclass - ListTableSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListTableSpecsResponse").msgclass - UpdateTableSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateTableSpecRequest").msgclass - GetColumnSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetColumnSpecRequest").msgclass - ListColumnSpecsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListColumnSpecsRequest").msgclass - ListColumnSpecsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListColumnSpecsResponse").msgclass - UpdateColumnSpecRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UpdateColumnSpecRequest").msgclass - CreateModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.CreateModelRequest").msgclass - GetModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetModelRequest").msgclass - ListModelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelsRequest").msgclass - ListModelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelsResponse").msgclass - DeleteModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeleteModelRequest").msgclass - DeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.DeployModelRequest").msgclass - UndeployModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.UndeployModelRequest").msgclass - ExportModelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportModelRequest").msgclass - ExportEvaluatedExamplesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest").msgclass - GetModelEvaluationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.GetModelEvaluationRequest").msgclass - ListModelEvaluationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelEvaluationsRequest").msgclass - ListModelEvaluationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.ListModelEvaluationsResponse").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb deleted file mode 100644 index 3058d28ba237..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/service_services_pb.rb +++ /dev/null @@ -1,163 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/automl/v1beta1/service.proto for package 'Google.Cloud.AutoML.V1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/automl/v1beta1/service_pb' - -module Google - module Cloud - module AutoML - module V1beta1 - module AutoMl - # AutoML Server API. - # - # The resource names are assigned by the server. - # The server never reuses names that it has created after the resources with - # those names are deleted. - # - # An ID of a resource is the last element of the item's resource name. For - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then - # the id for the item is `{dataset_id}`. - # - # Currently the only supported `location_id` is "us-central1". - # - # On any input that is documented to expect a string parameter in - # snake_case or kebab-case, either of those cases is accepted. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.automl.v1beta1.AutoMl' - - # Creates a dataset. - rpc :CreateDataset, ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset - # Gets a dataset. - rpc :GetDataset, ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset - # Lists datasets in a project. - rpc :ListDatasets, ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse - # Updates a dataset. - rpc :UpdateDataset, ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, ::Google::Cloud::AutoML::V1beta1::Dataset - # Deletes a dataset and all of its contents. - # Returns empty response in the - # [response][google.longrunning.Operation.response] field when it completes, - # and `delete_details` in the - # [metadata][google.longrunning.Operation.metadata] field. - rpc :DeleteDataset, ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, ::Google::Longrunning::Operation - # Imports data into a dataset. - # For Tables this method can only be called on an empty Dataset. - # - # For Tables: - # * A - # [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] - # parameter must be explicitly set. - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ImportData, ::Google::Cloud::AutoML::V1beta1::ImportDataRequest, ::Google::Longrunning::Operation - # Exports dataset's data to the provided output location. - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportData, ::Google::Cloud::AutoML::V1beta1::ExportDataRequest, ::Google::Longrunning::Operation - # Gets an annotation spec. - rpc :GetAnnotationSpec, ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, ::Google::Cloud::AutoML::V1beta1::AnnotationSpec - # Gets a table spec. - rpc :GetTableSpec, ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, ::Google::Cloud::AutoML::V1beta1::TableSpec - # Lists table specs in a dataset. - rpc :ListTableSpecs, ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse - # Updates a table spec. - rpc :UpdateTableSpec, ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, ::Google::Cloud::AutoML::V1beta1::TableSpec - # Gets a column spec. - rpc :GetColumnSpec, ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, ::Google::Cloud::AutoML::V1beta1::ColumnSpec - # Lists column specs in a table spec. - rpc :ListColumnSpecs, ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse - # Updates a column spec. - rpc :UpdateColumnSpec, ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, ::Google::Cloud::AutoML::V1beta1::ColumnSpec - # Creates a model. - # Returns a Model in the [response][google.longrunning.Operation.response] - # field when it completes. - # When you create a model, several model evaluations are created for it: - # a global evaluation, and one evaluation for each annotation spec. - rpc :CreateModel, ::Google::Cloud::AutoML::V1beta1::CreateModelRequest, ::Google::Longrunning::Operation - # Gets a model. - rpc :GetModel, ::Google::Cloud::AutoML::V1beta1::GetModelRequest, ::Google::Cloud::AutoML::V1beta1::Model - # Lists models. - rpc :ListModels, ::Google::Cloud::AutoML::V1beta1::ListModelsRequest, ::Google::Cloud::AutoML::V1beta1::ListModelsResponse - # Deletes a model. - # Returns `google.protobuf.Empty` in the - # [response][google.longrunning.Operation.response] field when it completes, - # and `delete_details` in the - # [metadata][google.longrunning.Operation.metadata] field. - rpc :DeleteModel, ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, ::Google::Longrunning::Operation - # Deploys a model. If a model is already deployed, deploying it with the - # same parameters has no effect. Deploying with different parametrs - # (as e.g. changing - # - # [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - # will reset the deployment state without pausing the model's availability. - # - # Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - # deployment automatically. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :DeployModel, ::Google::Cloud::AutoML::V1beta1::DeployModelRequest, ::Google::Longrunning::Operation - # Undeploys a model. If the model is not deployed this method has no effect. - # - # Only applicable for Text Classification, Image Object Detection and Tables; - # all other domains manage deployment automatically. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :UndeployModel, ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, ::Google::Longrunning::Operation - # Exports a trained, "export-able", model to a user specified Google Cloud - # Storage location. A model is considered export-able if and only if it has - # an export format defined for it in - # - # [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportModel, ::Google::Cloud::AutoML::V1beta1::ExportModelRequest, ::Google::Longrunning::Operation - # Exports examples on which the model was evaluated (i.e. which were in the - # TEST set of the dataset the model was created from), together with their - # ground truth annotations and the annotations created (predicted) by the - # model. - # The examples, ground truth and predictions are exported in the state - # they were at the moment the model was evaluated. - # - # This export is available only for 30 days since the model evaluation is - # created. - # - # Currently only available for Tables. - # - # Returns an empty response in the - # [response][google.longrunning.Operation.response] field when it completes. - rpc :ExportEvaluatedExamples, ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, ::Google::Longrunning::Operation - # Gets a model evaluation. - rpc :GetModelEvaluation, ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, ::Google::Cloud::AutoML::V1beta1::ModelEvaluation - # Lists model evaluations. - rpc :ListModelEvaluations, ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb deleted file mode 100644 index 160d97c9614a..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/table_spec_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/table_spec.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/automl/v1beta1/io_pb' - - -descriptor_data = "\n,google/cloud/automl/v1beta1/table_spec.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x19google/api/resource.proto\x1a$google/cloud/automl/v1beta1/io.proto\"\xc1\x02\n\tTableSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1b\n\x13time_column_spec_id\x18\x02 \x01(\t\x12\x11\n\trow_count\x18\x03 \x01(\x03\x12\x17\n\x0fvalid_row_count\x18\x04 \x01(\x03\x12\x14\n\x0c\x63olumn_count\x18\x07 \x01(\x03\x12?\n\rinput_configs\x18\x05 \x03(\x0b\x32(.google.cloud.automl.v1beta1.InputConfig\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t:x\xea\x41u\n\x1f\x61utoml.googleapis.com/TableSpec\x12Rprojects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}B\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TableSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TableSpec").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb deleted file mode 100644 index f6d3ca925dc9..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/tables_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/tables.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' -require 'google/cloud/automl/v1beta1/column_spec_pb' -require 'google/cloud/automl/v1beta1/data_items_pb' -require 'google/cloud/automl/v1beta1/data_stats_pb' -require 'google/cloud/automl/v1beta1/ranges_pb' -require 'google/cloud/automl/v1beta1/regression_pb' -require 'google/cloud/automl/v1beta1/temporal_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/cloud/automl/v1beta1/tables.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\x1a-google/cloud/automl/v1beta1/column_spec.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\x1a,google/cloud/automl/v1beta1/data_stats.proto\x1a(google/cloud/automl/v1beta1/ranges.proto\x1a,google/cloud/automl/v1beta1/regression.proto\x1a*google/cloud/automl/v1beta1/temporal.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x03\n\x15TablesDatasetMetadata\x12\x1d\n\x15primary_table_spec_id\x18\x01 \x01(\t\x12\x1d\n\x15target_column_spec_id\x18\x02 \x01(\t\x12\x1d\n\x15weight_column_spec_id\x18\x03 \x01(\t\x12\x1d\n\x15ml_use_column_spec_id\x18\x04 \x01(\t\x12t\n\x1atarget_column_correlations\x18\x06 \x03(\x0b\x32P.google.cloud.automl.v1beta1.TablesDatasetMetadata.TargetColumnCorrelationsEntry\x12\x35\n\x11stats_update_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1an\n\x1dTargetColumnCorrelationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.automl.v1beta1.CorrelationStats:\x02\x38\x01\"\x96\x04\n\x13TablesModelMetadata\x12-\n#optimization_objective_recall_value\x18\x11 \x01(\x02H\x00\x12\x30\n&optimization_objective_precision_value\x18\x12 \x01(\x02H\x00\x12\x43\n\x12target_column_spec\x18\x02 \x01(\x0b\x32\'.google.cloud.automl.v1beta1.ColumnSpec\x12K\n\x1ainput_feature_column_specs\x18\x03 \x03(\x0b\x32\'.google.cloud.automl.v1beta1.ColumnSpec\x12\x1e\n\x16optimization_objective\x18\x04 \x01(\t\x12T\n\x18tables_model_column_info\x18\x05 \x03(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesModelColumnInfo\x12%\n\x1dtrain_budget_milli_node_hours\x18\x06 \x01(\x03\x12#\n\x1btrain_cost_milli_node_hours\x18\x07 \x01(\x03\x12\x1e\n\x16\x64isable_early_stopping\x18\x0c \x01(\x08\x42*\n(additional_optimization_objective_config\"\xfd\x01\n\x10TablesAnnotation\x12\r\n\x05score\x18\x01 \x01(\x02\x12\x45\n\x13prediction_interval\x18\x04 \x01(\x0b\x32(.google.cloud.automl.v1beta1.DoubleRange\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x12T\n\x18tables_model_column_info\x18\x03 \x03(\x0b\x32\x32.google.cloud.automl.v1beta1.TablesModelColumnInfo\x12\x16\n\x0e\x62\x61seline_score\x18\x05 \x01(\x02\"j\n\x15TablesModelColumnInfo\x12\x18\n\x10\x63olumn_spec_name\x18\x01 \x01(\t\x12\x1b\n\x13\x63olumn_display_name\x18\x02 \x01(\t\x12\x1a\n\x12\x66\x65\x61ture_importance\x18\x03 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TablesDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesDatasetMetadata").msgclass - TablesModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesModelMetadata").msgclass - TablesAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesAnnotation").msgclass - TablesModelColumnInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TablesModelColumnInfo").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb deleted file mode 100644 index 396cc6fd35e0..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/temporal_pb.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/temporal.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n*google/cloud/automl/v1beta1/temporal.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1egoogle/protobuf/duration.proto\"w\n\x0bTimeSegment\x12\x34\n\x11start_time_offset\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0f\x65nd_time_offset\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TimeSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TimeSegment").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb deleted file mode 100644 index d6721fb18c95..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_extraction_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text_extraction.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/text_segment_pb' - - -descriptor_data = "\n1google/cloud/automl/v1beta1/text_extraction.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a.google/cloud/automl/v1beta1/text_segment.proto\"y\n\x18TextExtractionAnnotation\x12@\n\x0ctext_segment\x18\x03 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSegmentH\x00\x12\r\n\x05score\x18\x01 \x01(\x02\x42\x0c\n\nannotation\"\x97\x02\n\x1fTextExtractionEvaluationMetrics\x12\x0e\n\x06\x61u_prc\x18\x01 \x01(\x02\x12w\n\x1a\x63onfidence_metrics_entries\x18\x02 \x03(\x0b\x32S.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry\x1ak\n\x16\x43onfidenceMetricsEntry\x12\x1c\n\x14\x63onfidence_threshold\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x03 \x01(\x02\x12\x11\n\tprecision\x18\x04 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x05 \x01(\x02\x42\x9b\x01\n\x1f\x63om.google.cloud.automl.v1beta1P\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextExtractionAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionAnnotation").msgclass - TextExtractionEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics").msgclass - TextExtractionEvaluationMetrics::ConfidenceMetricsEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb deleted file mode 100644 index ff6b1ba5b994..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n&google/cloud/automl/v1beta1/text.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\"q\n!TextClassificationDatasetMetadata\x12L\n\x13\x63lassification_type\x18\x01 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"o\n\x1fTextClassificationModelMetadata\x12L\n\x13\x63lassification_type\x18\x03 \x01(\x0e\x32/.google.cloud.automl.v1beta1.ClassificationType\"\x1f\n\x1dTextExtractionDatasetMetadata\"1\n\x1bTextExtractionModelMetadata\x12\x12\n\nmodel_hint\x18\x03 \x01(\t\"5\n\x1cTextSentimentDatasetMetadata\x12\x15\n\rsentiment_max\x18\x01 \x01(\x05\"\x1c\n\x1aTextSentimentModelMetadataB\xa6\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\tTextProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextClassificationDatasetMetadata").msgclass - TextClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextClassificationModelMetadata").msgclass - TextExtractionDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionDatasetMetadata").msgclass - TextExtractionModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextExtractionModelMetadata").msgclass - TextSentimentDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentDatasetMetadata").msgclass - TextSentimentModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentModelMetadata").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb deleted file mode 100644 index 33f9468c557a..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_segment_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text_segment.proto - -require 'google/protobuf' - - -descriptor_data = "\n.google/cloud/automl/v1beta1/text_segment.proto\x12\x1bgoogle.cloud.automl.v1beta1\"H\n\x0bTextSegment\x12\x0f\n\x07\x63ontent\x18\x03 \x01(\t\x12\x14\n\x0cstart_offset\x18\x01 \x01(\x03\x12\x12\n\nend_offset\x18\x02 \x01(\x03\x42\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x10TextSegmentProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSegment").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb deleted file mode 100644 index 0b206376a98e..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/text_sentiment_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/text_sentiment.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n0google/cloud/automl/v1beta1/text_sentiment.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\",\n\x17TextSentimentAnnotation\x12\x11\n\tsentiment\x18\x01 \x01(\x05\"\xc5\x02\n\x1eTextSentimentEvaluationMetrics\x12\x11\n\tprecision\x18\x01 \x01(\x02\x12\x0e\n\x06recall\x18\x02 \x01(\x02\x12\x10\n\x08\x66\x31_score\x18\x03 \x01(\x02\x12\x1b\n\x13mean_absolute_error\x18\x04 \x01(\x02\x12\x1a\n\x12mean_squared_error\x18\x05 \x01(\x02\x12\x14\n\x0clinear_kappa\x18\x06 \x01(\x02\x12\x17\n\x0fquadratic_kappa\x18\x07 \x01(\x02\x12\x66\n\x10\x63onfusion_matrix\x18\x08 \x01(\x0b\x32L.google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix\x12\x1e\n\x12\x61nnotation_spec_id\x18\t \x03(\tB\x02\x18\x01\x42\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x12TextSentimentProtoZ7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TextSentimentAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentAnnotation").msgclass - TextSentimentEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb deleted file mode 100644 index cbd8923df2c9..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/translation_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/translation.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/cloud/automl/v1beta1/data_items_pb' - - -descriptor_data = "\n-google/cloud/automl/v1beta1/translation.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a,google/cloud/automl/v1beta1/data_items.proto\"b\n\x1aTranslationDatasetMetadata\x12!\n\x14source_language_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12!\n\x14target_language_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"K\n\x1cTranslationEvaluationMetrics\x12\x12\n\nbleu_score\x18\x01 \x01(\x01\x12\x17\n\x0f\x62\x61se_bleu_score\x18\x02 \x01(\x01\"j\n\x18TranslationModelMetadata\x12\x12\n\nbase_model\x18\x01 \x01(\t\x12\x1c\n\x14source_language_code\x18\x02 \x01(\t\x12\x1c\n\x14target_language_code\x18\x03 \x01(\t\"]\n\x15TranslationAnnotation\x12\x44\n\x12translated_content\x18\x01 \x01(\x0b\x32(.google.cloud.automl.v1beta1.TextSnippetB\xad\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\x10TranslationProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - TranslationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationDatasetMetadata").msgclass - TranslationEvaluationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationEvaluationMetrics").msgclass - TranslationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationModelMetadata").msgclass - TranslationAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.TranslationAnnotation").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb deleted file mode 100644 index ec6471cf7a72..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - VERSION = "0.19.1" - end - end - end -end diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb deleted file mode 100644 index 0cde809f1c74..000000000000 --- a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/video_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/automl/v1beta1/video.proto - -require 'google/protobuf' - -require 'google/cloud/automl/v1beta1/classification_pb' - - -descriptor_data = "\n\'google/cloud/automl/v1beta1/video.proto\x12\x1bgoogle.cloud.automl.v1beta1\x1a\x30google/cloud/automl/v1beta1/classification.proto\"$\n\"VideoClassificationDatasetMetadata\"$\n\"VideoObjectTrackingDatasetMetadata\"\"\n VideoClassificationModelMetadata\"\"\n VideoObjectTrackingModelMetadataB\xa7\x01\n\x1f\x63om.google.cloud.automl.v1beta1B\nVideoProtoP\x01Z7cloud.google.com/go/automl/apiv1beta1/automlpb;automlpb\xca\x02\x1bGoogle\\Cloud\\AutoMl\\V1beta1\xea\x02\x1eGoogle::Cloud::AutoML::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module AutoML - module V1beta1 - VideoClassificationDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata").msgclass - VideoObjectTrackingDatasetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata").msgclass - VideoClassificationModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoClassificationModelMetadata").msgclass - VideoObjectTrackingModelMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata").msgclass - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/README.md b/google-cloud-automl-v1beta1/proto_docs/README.md deleted file mode 100644 index 85daf383958a..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud AutoML V1BETA1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb b/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb b/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb b/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb b/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb deleted file mode 100644 index a5d64336682a..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_payload.rb +++ /dev/null @@ -1,86 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Contains annotation information that is relevant to AutoML. - # @!attribute [rw] translation - # @return [::Google::Cloud::AutoML::V1beta1::TranslationAnnotation] - # Annotation details for translation. - # - # Note: The following fields are mutually exclusive: `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] classification - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationAnnotation] - # Annotation details for content or image classification. - # - # Note: The following fields are mutually exclusive: `classification`, `translation`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionAnnotation] - # Annotation details for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection`, `translation`, `classification`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_classification - # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationAnnotation] - # Annotation details for video classification. - # Returned for Video Classification predictions. - # - # Note: The following fields are mutually exclusive: `video_classification`, `translation`, `classification`, `image_object_detection`, `video_object_tracking`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingAnnotation] - # Annotation details for video object tracking. - # - # Note: The following fields are mutually exclusive: `video_object_tracking`, `translation`, `classification`, `image_object_detection`, `video_classification`, `text_extraction`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionAnnotation] - # Annotation details for text extraction. - # - # Note: The following fields are mutually exclusive: `text_extraction`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_sentiment`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentAnnotation] - # Annotation details for text sentiment. - # - # Note: The following fields are mutually exclusive: `text_sentiment`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `tables`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tables - # @return [::Google::Cloud::AutoML::V1beta1::TablesAnnotation] - # Annotation details for Tables. - # - # Note: The following fields are mutually exclusive: `tables`, `translation`, `classification`, `image_object_detection`, `video_classification`, `video_object_tracking`, `text_extraction`, `text_sentiment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] annotation_spec_id - # @return [::String] - # Output only . The resource ID of the annotation spec that - # this annotation pertains to. The annotation spec comes from either an - # ancestor dataset, or the dataset that was used to train the model in use. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The value of - # {::Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name} - # when the model was trained. Because this field returns a value at model - # training time, for different models trained using the same dataset, the - # returned value could be different as model owner could update the - # `display_name` between any two model training. - class AnnotationPayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb deleted file mode 100644 index fef4ea17d2ba..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/annotation_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A definition of an annotation spec. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the annotation spec. - # Form: - # - # 'projects/\\{project_id}/locations/\\{location_id}/datasets/\\{dataset_id}/annotationSpecs/\\{annotation_spec_id}' - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the annotation spec to show in the interface. The name can be - # up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. - # @!attribute [rw] example_count - # @return [::Integer] - # Output only. The number of examples in the parent dataset - # labeled by the annotation spec. - class AnnotationSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb deleted file mode 100644 index ddcb7dbb8d85..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/classification.rb +++ /dev/null @@ -1,235 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Contains annotation details specific to classification. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0. A higher value - # means greater confidence that the annotation is positive. If a user - # approves an annotation as negative or positive, the score value remains - # unchanged. If a user creates an annotation, the score is 0 for negative or - # 1 for positive. - class ClassificationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains annotation details specific to video classification. - # @!attribute [rw] type - # @return [::String] - # Output only. Expresses the type of video classification. Possible values: - # - # * `segment` - Classification done on a specified by user - # time segment of a video. AnnotationSpec is answered to be present - # in that time segment, if it is present in any part of it. The video - # ML model evaluations are done only for this type of classification. - # - # * `shot`- Shot-level classification. - # AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # - # * `1s_interval` - AutoML Video Intelligence returns labels and their - # confidence scores for each second of the entire segment of the video - # that user specified in the request configuration. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no - # metrics provided to describe that quality. - # @!attribute [rw] classification_annotation - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationAnnotation] - # Output only . The classification details of this annotation. - # @!attribute [rw] time_segment - # @return [::Google::Cloud::AutoML::V1beta1::TimeSegment] - # Output only . The time segment of the video to which the - # annotation applies. - class VideoClassificationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for classification problems. - # Note: For Video Classification this metrics only describe quality of the - # Video Classification predictions of "segment_classification" type. - # @!attribute [rw] au_prc - # @return [::Float] - # Output only. The Area Under Precision-Recall Curve metric. Micro-averaged - # for the overall evaluation. - # @!attribute [rw] base_au_prc - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Float] - # Output only. The Area Under Precision-Recall Curve metric based on priors. - # Micro-averaged for the overall evaluation. - # Deprecated. - # @!attribute [rw] au_roc - # @return [::Float] - # Output only. The Area Under Receiver Operating Characteristic curve metric. - # Micro-averaged for the overall evaluation. - # @!attribute [rw] log_loss - # @return [::Float] - # Output only. The Log Loss metric. - # @!attribute [rw] confidence_metrics_entry - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry>] - # Output only. Metrics for each confidence_threshold in - # 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and - # position_threshold = INT32_MAX_VALUE. - # ROC and precision-recall curves, and other aggregated metrics are derived - # from them. The confidence metrics entries may also be supplied for - # additional values of position_threshold, but from these no aggregated - # metrics are computed. - # @!attribute [rw] confusion_matrix - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix] - # Output only. Confusion matrix of the evaluation. - # Only set for MULTICLASS classification problems where number - # of labels is no more than 10. - # Only set for model level evaluation, not for evaluation per label. - # @!attribute [rw] annotation_spec_id - # @return [::Array<::String>] - # Output only. The annotation spec ids used for this evaluation. - class ClassificationEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. Metrics are computed with an assumption that the model - # never returns predictions with score lower than this value. - # @!attribute [rw] position_threshold - # @return [::Integer] - # Output only. Metrics are computed with an assumption that the model - # always returns at most this many predictions (ordered by their score, - # descendingly), but they all still need to meet the confidence_threshold. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall (True Positive Rate) for the given confidence - # threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision for the given confidence threshold. - # @!attribute [rw] false_positive_rate - # @return [::Float] - # Output only. False Positive Rate for the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - # @!attribute [rw] recall_at1 - # @return [::Float] - # Output only. The Recall (True Positive Rate) when only considering the - # label that has the highest prediction score and not below the confidence - # threshold for each example. - # @!attribute [rw] precision_at1 - # @return [::Float] - # Output only. The precision when only considering the label that has the - # highest prediction score and not below the confidence threshold for each - # example. - # @!attribute [rw] false_positive_rate_at1 - # @return [::Float] - # Output only. The False Positive Rate when only considering the label that - # has the highest prediction score and not below the confidence threshold - # for each example. - # @!attribute [rw] f1_score_at1 - # @return [::Float] - # Output only. The harmonic mean of {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#recall_at1 recall_at1} and {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfidenceMetricsEntry#precision_at1 precision_at1}. - # @!attribute [rw] true_positive_count - # @return [::Integer] - # Output only. The number of model created labels that match a ground truth - # label. - # @!attribute [rw] false_positive_count - # @return [::Integer] - # Output only. The number of model created labels that do not match a - # ground truth label. - # @!attribute [rw] false_negative_count - # @return [::Integer] - # Output only. The number of ground truth labels that are not matched - # by a model created label. - # @!attribute [rw] true_negative_count - # @return [::Integer] - # Output only. The number of labels that were not created by the model, - # but if they would, they would not match a ground truth label. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Confusion matrix of the model running the classification. - # @!attribute [rw] annotation_spec_id - # @return [::Array<::String>] - # Output only. IDs of the annotation specs used in the confusion matrix. - # For Tables CLASSIFICATION - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - # only list of [annotation_spec_display_name-s][] is populated. - # @!attribute [rw] display_name - # @return [::Array<::String>] - # Output only. Display name of the annotation specs used in the confusion - # matrix, as they were at the moment of the evaluation. For Tables - # CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type], - # distinct values of the target column at the moment of the model - # evaluation are populated here. - # @!attribute [rw] row - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix::Row>] - # Output only. Rows in the confusion matrix. The number of rows is equal to - # the size of `annotation_spec_id`. - # `row[i].example_count[j]` is the number of examples that have ground - # truth of the `annotation_spec_id[i]` and are predicted as - # `annotation_spec_id[j]` by the model being evaluated. - class ConfusionMatrix - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. A row in the confusion matrix. - # @!attribute [rw] example_count - # @return [::Array<::Integer>] - # Output only. Value of the specific cell in the confusion matrix. - # The number of values each row has (i.e. the length of the row) is equal - # to the length of the `annotation_spec_id` field or, if that one is not - # populated, length of the {::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix#display_name display_name} field. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Type of the classification problem. - module ClassificationType - # An un-set value of this enum. - CLASSIFICATION_TYPE_UNSPECIFIED = 0 - - # At most one label is allowed per example. - MULTICLASS = 1 - - # Multiple labels are allowed for one example. - MULTILABEL = 2 - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb deleted file mode 100644 index 5a49f3139bdf..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/column_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were - # given on import . - # Used by: - # * Tables - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the column specs. - # Form: - # - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}` - # @!attribute [rw] data_type - # @return [::Google::Cloud::AutoML::V1beta1::DataType] - # The data type of elements stored in the column. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The name of the column to show in the interface. The name can - # be up to 100 characters long and can consist only of ASCII Latin letters - # A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and - # must start with a letter or a digit. - # @!attribute [rw] data_stats - # @return [::Google::Cloud::AutoML::V1beta1::DataStats] - # Output only. Stats of the series of values in the column. - # This field may be stale, see the ancestor's - # Dataset.tables_dataset_metadata.stats_update_time field - # for the timestamp at which these stats were last updated. - # @!attribute [rw] top_correlated_columns - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec::CorrelatedColumn>] - # Deprecated. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - class ColumnSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Identifies the table's column, and its correlation with the column this - # ColumnSpec describes. - # @!attribute [rw] column_spec_id - # @return [::String] - # The column_spec_id of the correlated column, which belongs to the same - # table as the in-context column. - # @!attribute [rw] correlation_stats - # @return [::Google::Cloud::AutoML::V1beta1::CorrelationStats] - # Correlation between this and the in-context column. - class CorrelatedColumn - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb deleted file mode 100644 index c6d3145ce607..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_items.rb +++ /dev/null @@ -1,239 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A representation of an image. - # Only images up to 30MB in size are supported. - # @!attribute [rw] image_bytes - # @return [::String] - # Image content represented as a stream of bytes. - # Note: As with all `bytes` fields, protobuffers use a pure binary - # representation, whereas JSON representations use base64. - # - # Note: The following fields are mutually exclusive: `image_bytes`, `input_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::InputConfig] - # An input config specifying the content of the image. - # - # Note: The following fields are mutually exclusive: `input_config`, `image_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] thumbnail_uri - # @return [::String] - # Output only. HTTP URI to the thumbnail image. - class Image - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A representation of a text snippet. - # @!attribute [rw] content - # @return [::String] - # Required. The content of the text snippet as a string. Up to 250000 - # characters long. - # @!attribute [rw] mime_type - # @return [::String] - # Optional. The format of {::Google::Cloud::AutoML::V1beta1::TextSnippet#content content}. Currently the only two allowed - # values are "text/html" and "text/plain". If left blank, the format is - # automatically determined from the type of the uploaded {::Google::Cloud::AutoML::V1beta1::TextSnippet#content content}. - # @!attribute [rw] content_uri - # @return [::String] - # Output only. HTTP URI where you can download the content. - class TextSnippet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message that describes dimension of a document. - # @!attribute [rw] unit - # @return [::Google::Cloud::AutoML::V1beta1::DocumentDimensions::DocumentDimensionUnit] - # Unit of the dimension. - # @!attribute [rw] width - # @return [::Float] - # Width value of the document, works together with the unit. - # @!attribute [rw] height - # @return [::Float] - # Height value of the document, works together with the unit. - class DocumentDimensions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Unit of the document dimension. - module DocumentDimensionUnit - # Should not be used. - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0 - - # Document dimension is measured in inches. - INCH = 1 - - # Document dimension is measured in centimeters. - CENTIMETER = 2 - - # Document dimension is measured in points. 72 points = 1 inch. - POINT = 3 - end - end - - # A structured text document e.g. a PDF. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::DocumentInputConfig] - # An input config specifying the content of the document. - # @!attribute [rw] document_text - # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] - # The plain text version of this document. - # @!attribute [rw] layout - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Document::Layout>] - # Describes the layout of the document. - # Sorted by [page_number][]. - # @!attribute [rw] document_dimensions - # @return [::Google::Cloud::AutoML::V1beta1::DocumentDimensions] - # The dimensions of the page in the document. - # @!attribute [rw] page_count - # @return [::Integer] - # Number of pages in the document. - class Document - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the layout information of a {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the document. - # @!attribute [rw] text_segment - # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] - # Text Segment that represents a segment in - # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. - # @!attribute [rw] page_number - # @return [::Integer] - # Page number of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the original document, starts - # from 1. - # @!attribute [rw] bounding_poly - # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] - # The position of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in the page. - # Contains exactly 4 - # - # {::Google::Cloud::AutoML::V1beta1::BoundingPoly#normalized_vertices normalized_vertices} - # and they are connected by edges in the order provided, which will - # represent a rectangle parallel to the frame. The - # {::Google::Cloud::AutoML::V1beta1::NormalizedVertex NormalizedVertex-s} are - # relative to the page. - # Coordinates are based on top-left as point (0,0). - # @!attribute [rw] text_segment_type - # @return [::Google::Cloud::AutoML::V1beta1::Document::Layout::TextSegmentType] - # The type of the {::Google::Cloud::AutoML::V1beta1::Document::Layout#text_segment text_segment} in document. - class Layout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of TextSegment in the context of the original document. - module TextSegmentType - # Should not be used. - TEXT_SEGMENT_TYPE_UNSPECIFIED = 0 - - # The text segment is a token. e.g. word. - TOKEN = 1 - - # The text segment is a paragraph. - PARAGRAPH = 2 - - # The text segment is a form field. - FORM_FIELD = 3 - - # The text segment is the name part of a form field. It will be treated - # as child of another FORM_FIELD TextSegment if its span is subspan of - # another TextSegment with type FORM_FIELD. - FORM_FIELD_NAME = 4 - - # The text segment is the text content part of a form field. It will be - # treated as child of another FORM_FIELD TextSegment if its span is - # subspan of another TextSegment with type FORM_FIELD. - FORM_FIELD_CONTENTS = 5 - - # The text segment is a whole table, including headers, and all rows. - TABLE = 6 - - # The text segment is a table's headers. It will be treated as child of - # another TABLE TextSegment if its span is subspan of another TextSegment - # with type TABLE. - TABLE_HEADER = 7 - - # The text segment is a row in table. It will be treated as child of - # another TABLE TextSegment if its span is subspan of another TextSegment - # with type TABLE. - TABLE_ROW = 8 - - # The text segment is a cell in table. It will be treated as child of - # another TABLE_ROW TextSegment if its span is subspan of another - # TextSegment with type TABLE_ROW. - TABLE_CELL = 9 - end - end - end - - # A representation of a row in a relational table. - # @!attribute [rw] column_spec_ids - # @return [::Array<::String>] - # The resource IDs of the column specs describing the columns of the row. - # If set must contain, but possibly in a different order, all input - # feature - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_spec_ids} - # of the Model this row is being passed to. - # Note: The below `values` field must match order of this field, if this - # field is set. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Required. The values of the row cells, given in the same order as the - # column_spec_ids, or, if not set, then in the same order as input - # feature - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs column_specs} - # of the Model this row is being passed to. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Example data used for training or prediction. - # @!attribute [rw] image - # @return [::Google::Cloud::AutoML::V1beta1::Image] - # Example image. - # - # Note: The following fields are mutually exclusive: `image`, `text_snippet`, `document`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_snippet - # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] - # Example text. - # - # Note: The following fields are mutually exclusive: `text_snippet`, `image`, `document`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] document - # @return [::Google::Cloud::AutoML::V1beta1::Document] - # Example document. - # - # Note: The following fields are mutually exclusive: `document`, `image`, `text_snippet`, `row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] row - # @return [::Google::Cloud::AutoML::V1beta1::Row] - # Example relational table row. - # - # Note: The following fields are mutually exclusive: `row`, `image`, `text_snippet`, `document`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExamplePayload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb deleted file mode 100644 index 69d1de9e2ebe..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_stats.rb +++ /dev/null @@ -1,239 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # The data statistics of a series of values that share the same DataType. - # @!attribute [rw] float64_stats - # @return [::Google::Cloud::AutoML::V1beta1::Float64Stats] - # The statistics for FLOAT64 DataType. - # - # Note: The following fields are mutually exclusive: `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_stats - # @return [::Google::Cloud::AutoML::V1beta1::StringStats] - # The statistics for STRING DataType. - # - # Note: The following fields are mutually exclusive: `string_stats`, `float64_stats`, `timestamp_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] timestamp_stats - # @return [::Google::Cloud::AutoML::V1beta1::TimestampStats] - # The statistics for TIMESTAMP DataType. - # - # Note: The following fields are mutually exclusive: `timestamp_stats`, `float64_stats`, `string_stats`, `array_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] array_stats - # @return [::Google::Cloud::AutoML::V1beta1::ArrayStats] - # The statistics for ARRAY DataType. - # - # Note: The following fields are mutually exclusive: `array_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `struct_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_stats - # @return [::Google::Cloud::AutoML::V1beta1::StructStats] - # The statistics for STRUCT DataType. - # - # Note: The following fields are mutually exclusive: `struct_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `category_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] category_stats - # @return [::Google::Cloud::AutoML::V1beta1::CategoryStats] - # The statistics for CATEGORY DataType. - # - # Note: The following fields are mutually exclusive: `category_stats`, `float64_stats`, `string_stats`, `timestamp_stats`, `array_stats`, `struct_stats`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] distinct_value_count - # @return [::Integer] - # The number of distinct values. - # @!attribute [rw] null_value_count - # @return [::Integer] - # The number of values that are null. - # @!attribute [rw] valid_value_count - # @return [::Integer] - # The number of values that are valid. - class DataStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The data statistics of a series of FLOAT64 values. - # @!attribute [rw] mean - # @return [::Float] - # The mean of the series. - # @!attribute [rw] standard_deviation - # @return [::Float] - # The standard deviation of the series. - # @!attribute [rw] quantiles - # @return [::Array<::Float>] - # Ordered from 0 to k k-quantile values of the data series of n values. - # The value at index i is, approximately, the i*n/k-th smallest value in the - # series; for i = 0 and i = k these are, respectively, the min and max - # values. - # @!attribute [rw] histogram_buckets - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Float64Stats::HistogramBucket>] - # Histogram buckets of the data series. Sorted by the min value of the - # bucket, ascendingly, and the number of the buckets is dynamically - # generated. The buckets are non-overlapping and completely cover whole - # FLOAT64 range with min of first bucket being `"-Infinity"`, and max of - # the last one being `"Infinity"`. - class Float64Stats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A bucket of a histogram. - # @!attribute [rw] min - # @return [::Float] - # The minimum value of the bucket, inclusive. - # @!attribute [rw] max - # @return [::Float] - # The maximum value of the bucket, exclusive unless max = `"Infinity"`, in - # which case it's inclusive. - # @!attribute [rw] count - # @return [::Integer] - # The number of data values that are in the bucket, i.e. are between - # min and max values. - class HistogramBucket - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of STRING values. - # @!attribute [rw] top_unigram_stats - # @return [::Array<::Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats>] - # The statistics of the top 20 unigrams, ordered by - # {::Google::Cloud::AutoML::V1beta1::StringStats::UnigramStats#count count}. - class StringStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The statistics of a unigram. - # @!attribute [rw] value - # @return [::String] - # The unigram. - # @!attribute [rw] count - # @return [::Integer] - # The number of occurrences of this unigram in the series. - class UnigramStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of TIMESTAMP values. - # @!attribute [rw] granular_stats - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats}] - # The string key is the pre-defined granularity. Currently supported: - # hour_of_day, day_of_week, month_of_year. - # Granularities finer that the granularity of timestamp data are not - # populated (e.g. if timestamps are at day granularity, then hour_of_day - # is not populated). - class TimestampStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Stats split by a defined in context granularity. - # @!attribute [rw] buckets - # @return [::Google::Protobuf::Map{::Integer => ::Integer}] - # A map from granularity key to example count for that key. - # E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May). - class GranularStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::Integer] - # @!attribute [rw] value - # @return [::Integer] - class BucketsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::TimestampStats::GranularStats] - class GranularStatsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of ARRAY values. - # @!attribute [rw] member_stats - # @return [::Google::Cloud::AutoML::V1beta1::DataStats] - # Stats of all the values of all arrays, as if they were a single long - # series of data. The type depends on the element type of the array. - class ArrayStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The data statistics of a series of STRUCT values. - # @!attribute [rw] field_stats - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::DataStats}] - # Map from a field name of the struct to data stats aggregated over series - # of all data in that field across all the structs. - class StructStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::DataStats] - class FieldStatsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The data statistics of a series of CATEGORY values. - # @!attribute [rw] top_category_stats - # @return [::Array<::Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats>] - # The statistics of the top 20 CATEGORY values, ordered by - # - # {::Google::Cloud::AutoML::V1beta1::CategoryStats::SingleCategoryStats#count count}. - class CategoryStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The statistics of a single CATEGORY value. - # @!attribute [rw] value - # @return [::String] - # The CATEGORY value. - # @!attribute [rw] count - # @return [::Integer] - # The number of occurrences of this value in the series. - class SingleCategoryStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A correlation statistics between two series of DataType values. The series - # may have differing DataType-s, but within a single series the DataType must - # be the same. - # @!attribute [rw] cramers_v - # @return [::Float] - # The correlation value using the Cramer's V measure. - class CorrelationStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb deleted file mode 100644 index 487ca044c5e5..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/data_types.rb +++ /dev/null @@ -1,124 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Indicated the type of data that can be stored in a structured data entity - # (e.g. a table). - # @!attribute [rw] list_element_type - # @return [::Google::Cloud::AutoML::V1beta1::DataType] - # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::ARRAY ARRAY}, - # then `list_element_type` is the type of the elements. - # - # Note: The following fields are mutually exclusive: `list_element_type`, `struct_type`, `time_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_type - # @return [::Google::Cloud::AutoML::V1beta1::StructType] - # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT}, then `struct_type` - # provides type information for the struct's fields. - # - # Note: The following fields are mutually exclusive: `struct_type`, `list_element_type`, `time_format`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_format - # @return [::String] - # If {::Google::Cloud::AutoML::V1beta1::DataType#type_code type_code} == {::Google::Cloud::AutoML::V1beta1::TypeCode::TIMESTAMP TIMESTAMP} - # then `time_format` provides the format in which that time field is - # expressed. The time_format must either be one of: - # * `UNIX_SECONDS` - # * `UNIX_MILLISECONDS` - # * `UNIX_MICROSECONDS` - # * `UNIX_NANOSECONDS` - # (for respectively number of seconds, milliseconds, microseconds and - # nanoseconds since start of the Unix epoch); - # or be written in `strftime` syntax. If time_format is not set, then the - # default format as described on the type_code is used. - # - # Note: The following fields are mutually exclusive: `time_format`, `list_element_type`, `struct_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] type_code - # @return [::Google::Cloud::AutoML::V1beta1::TypeCode] - # Required. The {::Google::Cloud::AutoML::V1beta1::TypeCode TypeCode} for this type. - # @!attribute [rw] nullable - # @return [::Boolean] - # If true, this DataType can also be `NULL`. In .CSV files `NULL` value is - # expressed as an empty string. - class DataType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `StructType` defines the DataType-s of a {::Google::Cloud::AutoML::V1beta1::TypeCode::STRUCT STRUCT} type. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::DataType}] - # Unordered map of struct field names to their data types. - # Fields cannot be added or removed via Update. Their names and - # data types are still mutable. - class StructType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::DataType] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `TypeCode` is used as a part of - # {::Google::Cloud::AutoML::V1beta1::DataType DataType}. - module TypeCode - # Not specified. Should not be used. - TYPE_CODE_UNSPECIFIED = 0 - - # Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or - # `"-Infinity"`. - FLOAT64 = 3 - - # Must be between 0AD and 9999AD. Encoded as `string` according to - # {::Google::Cloud::AutoML::V1beta1::DataType#time_format time_format}, or, if - # that format is not set, then in RFC 3339 `date-time` format, where - # `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z). - TIMESTAMP = 4 - - # Encoded as `string`. - STRING = 6 - - # Encoded as `list`, where the list elements are represented according to - # - # {::Google::Cloud::AutoML::V1beta1::DataType#list_element_type list_element_type}. - ARRAY = 8 - - # Encoded as `struct`, where field values are represented according to - # {::Google::Cloud::AutoML::V1beta1::DataType#struct_type struct_type}. - STRUCT = 9 - - # Values of this type are not further understood by AutoML, - # e.g. AutoML is unable to tell the order of values (as it could with - # FLOAT64), or is unable to say if one value contains another (as it - # could with STRING). - # Encoded as `string` (bytes should be base64-encoded, as described in RFC - # 4648, section 4). - CATEGORY = 10 - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb deleted file mode 100644 index 66f98e62fd51..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/dataset.rb +++ /dev/null @@ -1,102 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A workspace for solving a single, particular machine learning (ML) problem. - # A workspace contains examples that may be annotated. - # @!attribute [rw] translation_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TranslationDatasetMetadata] - # Metadata for a dataset used for translation. - # - # Note: The following fields are mutually exclusive: `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationDatasetMetadata] - # Metadata for a dataset used for image classification. - # - # Note: The following fields are mutually exclusive: `image_classification_dataset_metadata`, `translation_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextClassificationDatasetMetadata] - # Metadata for a dataset used for text classification. - # - # Note: The following fields are mutually exclusive: `text_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionDatasetMetadata] - # Metadata for a dataset used for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_classification_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationDatasetMetadata] - # Metadata for a dataset used for video classification. - # - # Note: The following fields are mutually exclusive: `video_classification_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingDatasetMetadata] - # Metadata for a dataset used for video object tracking. - # - # Note: The following fields are mutually exclusive: `video_object_tracking_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionDatasetMetadata] - # Metadata for a dataset used for text extraction. - # - # Note: The following fields are mutually exclusive: `text_extraction_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_sentiment_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentDatasetMetadata] - # Metadata for a dataset used for text sentiment. - # - # Note: The following fields are mutually exclusive: `text_sentiment_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `tables_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tables_dataset_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata] - # Metadata for a dataset used for Tables. - # - # Note: The following fields are mutually exclusive: `tables_dataset_metadata`, `translation_dataset_metadata`, `image_classification_dataset_metadata`, `text_classification_dataset_metadata`, `image_object_detection_dataset_metadata`, `video_classification_dataset_metadata`, `video_object_tracking_dataset_metadata`, `text_extraction_dataset_metadata`, `text_sentiment_dataset_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the dataset. - # Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the dataset to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores - # (_), and ASCII digits 0-9. - # @!attribute [rw] description - # @return [::String] - # User-provided description of the dataset. The description can be up to - # 25000 characters long. - # @!attribute [rw] example_count - # @return [::Integer] - # Output only. The number of examples in the dataset. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this dataset was created. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - class Dataset - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb deleted file mode 100644 index 6f569cb06b5e..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/detection.rb +++ /dev/null @@ -1,152 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Annotation details for image object detection. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] - # Output only. The rectangle representing the object location. - # @!attribute [rw] score - # @return [::Float] - # Output only. The confidence that this annotation is positive for the parent example, - # value in [0, 1], higher means higher positivity confidence. - class ImageObjectDetectionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation details for video object tracking. - # @!attribute [rw] instance_id - # @return [::String] - # Optional. The instance of the object, expressed as a positive integer. Used to tell - # apart objects of the same type (i.e. AnnotationSpec) when multiple are - # present on a single example. - # NOTE: Instance ID prediction quality is not a part of model evaluation and - # is done as best effort. Especially in cases when an entity goes - # off-screen for a longer time (minutes), when it comes back it may be given - # a new instance ID. - # @!attribute [rw] time_offset - # @return [::Google::Protobuf::Duration] - # Required. A time (frame) of a video to which this annotation pertains. - # Represented as the duration since the video's start. - # @!attribute [rw] bounding_box - # @return [::Google::Cloud::AutoML::V1beta1::BoundingPoly] - # Required. The rectangle representing the object location on the frame (i.e. - # at the time_offset of the video). - # @!attribute [rw] score - # @return [::Float] - # Output only. The confidence that this annotation is positive for the video at - # the time_offset, value in [0, 1], higher means higher positivity - # confidence. For annotations created by the user the score is 1. When - # user approves an annotation, the original float score is kept (and not - # changed to 1). - class VideoObjectTrackingAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Bounding box matching model metrics for a single intersection-over-union - # threshold and multiple label match confidence thresholds. - # @!attribute [rw] iou_threshold - # @return [::Float] - # Output only. The intersection-over-union threshold value used to compute - # this metrics entry. - # @!attribute [rw] mean_average_precision - # @return [::Float] - # Output only. The mean average precision, most often close to au_prc. - # @!attribute [rw] confidence_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry::ConfidenceMetricsEntry>] - # Output only. Metrics for each label-match confidence_threshold from - # 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is - # derived from them. - class BoundingBoxMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. The confidence threshold value used to compute the metrics. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall under the given confidence threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision under the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Model evaluation metrics for image object detection problems. - # Evaluates prediction quality of labeled bounding boxes. - # @!attribute [rw] evaluated_bounding_box_count - # @return [::Integer] - # Output only. The total number of bounding boxes (i.e. summed over all - # images) the ground truth used to create this evaluation had. - # @!attribute [rw] bounding_box_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry>] - # Output only. The bounding boxes match metrics for each - # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # pair. - # @!attribute [rw] bounding_box_mean_average_precision - # @return [::Float] - # Output only. The single metric for bounding boxes evaluation: - # the mean_average_precision averaged over all bounding_box_metrics_entries. - class ImageObjectDetectionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for video object tracking problems. - # Evaluates prediction quality of both labeled bounding boxes and labeled - # tracks (i.e. series of bounding boxes sharing same label and instance ID). - # @!attribute [rw] evaluated_frame_count - # @return [::Integer] - # Output only. The number of video frames used to create this evaluation. - # @!attribute [rw] evaluated_bounding_box_count - # @return [::Integer] - # Output only. The total number of bounding boxes (i.e. summed over all - # frames) the ground truth used to create this evaluation had. - # @!attribute [rw] bounding_box_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::BoundingBoxMetricsEntry>] - # Output only. The bounding boxes match metrics for each - # Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - # pair. - # @!attribute [rw] bounding_box_mean_average_precision - # @return [::Float] - # Output only. The single metric for bounding boxes evaluation: - # the mean_average_precision averaged over all bounding_box_metrics_entries. - class VideoObjectTrackingEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb deleted file mode 100644 index 64cc3c7ae1f9..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/geometry.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A vertex represents a 2D point in the image. - # The normalized vertex coordinates are between 0 to 1 fractions relative to - # the original plane (image, video). E.g. if the plane (e.g. whole image) would - # have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would - # be at the position (1, 6) on that plane. - # @!attribute [rw] x - # @return [::Float] - # Required. Horizontal coordinate. - # @!attribute [rw] y - # @return [::Float] - # Required. Vertical coordinate. - class NormalizedVertex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A bounding polygon of a detected object on a plane. - # On output both vertices and normalized_vertices are provided. - # The polygon is formed by connecting vertices in the order they are listed. - # @!attribute [rw] normalized_vertices - # @return [::Array<::Google::Cloud::AutoML::V1beta1::NormalizedVertex>] - # Output only . The bounding polygon normalized vertices. - class BoundingPoly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb deleted file mode 100644 index e75d8c471c72..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/image.rb +++ /dev/null @@ -1,205 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Dataset metadata that is specific to image classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] - # Required. Type of the classification problem. - class ImageClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata specific to image object detection. - class ImageObjectDetectionDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata for image classification. - # @!attribute [rw] base_model_id - # @return [::String] - # Optional. The ID of the `base` model. If it is specified, the new model - # will be created based on the `base` model. Otherwise, the new model will be - # created from scratch. The `base` model must be in the same - # `project` and `location` as the new model to create, and have the same - # `model_type`. - # @!attribute [rw] train_budget - # @return [::Integer] - # Required. The train budget of creating this model, expressed in hours. The - # actual `train_cost` will be equal or less than this value. - # @!attribute [rw] train_cost - # @return [::Integer] - # Output only. The actual train cost of creating this model, expressed in - # hours. If this model is created from a `base` model, the train cost used - # to create the `base` model are not included. - # @!attribute [rw] stop_reason - # @return [::String] - # Output only. The reason that this create model operation stopped, - # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - # @!attribute [rw] model_type - # @return [::String] - # Optional. Type of the model. The available values are: - # * `cloud` - Model to be used via prediction calls to AutoML API. - # This is the default value. - # * `mobile-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have low latency, but - # may have lower prediction quality than other models. - # * `mobile-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. - # * `mobile-high-accuracy-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have a higher - # latency, but should also have a higher prediction quality - # than other models. - # * `mobile-core-ml-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core - # ML afterwards. Expected to have low latency, but may have - # lower prediction quality than other models. - # * `mobile-core-ml-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with Core - # ML afterwards. - # * `mobile-core-ml-high-accuracy-1` - A model that, in addition to - # providing prediction via AutoML API, can also be exported - # (see {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile device with - # Core ML afterwards. Expected to have a higher latency, but - # should also have a higher prediction quality than other - # models. - # @!attribute [rw] node_qps - # @return [::Float] - # Output only. An approximate number of online prediction QPS that can - # be supported by this model per each node on which it is deployed. - # @!attribute [rw] node_count - # @return [::Integer] - # Output only. The number of nodes this model is deployed on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the node_qps field. - class ImageClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to image object detection. - # @!attribute [rw] model_type - # @return [::String] - # Optional. Type of the model. The available values are: - # * `cloud-high-accuracy-1` - (default) A model to be used via prediction - # calls to AutoML API. Expected to have a higher latency, but - # should also have a higher prediction quality than other - # models. - # * `cloud-low-latency-1` - A model to be used via prediction - # calls to AutoML API. Expected to have low latency, but may - # have lower prediction quality than other models. - # * `mobile-low-latency-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have low latency, but - # may have lower prediction quality than other models. - # * `mobile-versatile-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. - # * `mobile-high-accuracy-1` - A model that, in addition to providing - # prediction via AutoML API, can also be exported (see - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}) and used on a mobile or edge device - # with TensorFlow afterwards. Expected to have a higher - # latency, but should also have a higher prediction quality - # than other models. - # @!attribute [rw] node_count - # @return [::Integer] - # Output only. The number of nodes this model is deployed on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the qps_per_node field. - # @!attribute [rw] node_qps - # @return [::Float] - # Output only. An approximate number of online prediction QPS that can - # be supported by this model per each node on which it is deployed. - # @!attribute [rw] stop_reason - # @return [::String] - # Output only. The reason that this create model operation stopped, - # e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - # @!attribute [rw] train_budget_milli_node_hours - # @return [::Integer] - # The train budget of creating this model, expressed in milli node - # hours i.e. 1,000 value in this field means 1 node hour. The actual - # `train_cost` will be equal or less than this value. If further model - # training ceases to provide any improvements, it will stop without using - # full budget and the stop_reason will be `MODEL_CONVERGED`. - # Note, node_hour = actual_hour * number_of_nodes_invovled. - # For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, - # the train budget must be between 20,000 and 900,000 milli node hours, - # inclusive. The default value is 216, 000 which represents one day in - # wall time. - # For model type `mobile-low-latency-1`, `mobile-versatile-1`, - # `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, - # `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train - # budget must be between 1,000 and 100,000 milli node hours, inclusive. - # The default value is 24, 000 which represents one day in wall time. - # @!attribute [rw] train_cost_milli_node_hours - # @return [::Integer] - # Output only. The actual train cost of creating this model, expressed in - # milli node hours, i.e. 1,000 value in this field means 1 node hour. - # Guaranteed to not exceed the train budget. - class ImageObjectDetectionModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model deployment metadata specific to Image Classification. - # @!attribute [rw] node_count - # @return [::Integer] - # Input only. The number of nodes to deploy the model on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the model's - # - # {::Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata#node_qps node_qps}. - # Must be between 1 and 100, inclusive on both ends. - class ImageClassificationModelDeploymentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model deployment metadata specific to Image Object Detection. - # @!attribute [rw] node_count - # @return [::Integer] - # Input only. The number of nodes to deploy the model on. A node is an - # abstraction of a machine resource, which can handle online prediction QPS - # as given in the model's - # - # [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node]. - # Must be between 1 and 100, inclusive on both ends. - class ImageObjectDetectionModelDeploymentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb deleted file mode 100644 index e63ca620a14b..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/io.rb +++ /dev/null @@ -1,1205 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Input configuration for ImportData Action. - # - # The format of input depends on dataset_metadata the Dataset into which - # the import is happening has. As input source the - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} - # is expected, unless specified otherwise. Additionally any input .CSV file - # by itself must be 100MB or smaller, unless specified otherwise. - # If an "example" file (that is, image, video etc.) with identical content - # (even if it had different GCS_FILE_PATH) is mentioned multiple times, then - # its label, bounding boxes etc. are appended. The same file should be always - # provided with the same ML_USE and GCS_FILE_PATH, if it is not, then - # these values are nondeterministically selected from the given ones. - # - # The formats are represented in EBNF with commas being literal and with - # non-terminal symbols defined near the end of this comment. The formats are: - # - # * For Image Classification: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH,LABEL,LABEL,... - # GCS_FILE_PATH leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO - # For MULTICLASS classification type, at most one LABEL is allowed - # per image. If an image has not yet been labeled, then it should be - # mentioned just once with no LABEL. - # Some sample rows: - # TRAIN,gs://folder/image1.jpg,daisy - # TEST,gs://folder/image2.jpg,dandelion,tulip,rose - # UNASSIGNED,gs://folder/image3.jpg,daisy - # UNASSIGNED,gs://folder/image4.jpg - # - # * For Image Object Detection: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,) - # GCS_FILE_PATH leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG. - # Each image is assumed to be exhaustively labeled. The minimum - # allowed BOUNDING_BOX edge length is 0.01, and no more than 500 - # BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined - # per line). If an image has not yet been labeled, then it should be - # mentioned just once with no LABEL and the ",,,,,,," in place of the - # BOUNDING_BOX. For images which are known to not contain any - # bounding boxes, they should be labelled explictly as - # "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the - # BOUNDING_BOX. - # Sample rows: - # TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, - # TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, - # UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 - # TEST,gs://folder/im3.png,,,,,,,,, - # TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,, - # - # * For Video Classification: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH - # where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH - # should lead to another .csv file which describes examples that have - # given ML_USE, using the following row format: - # GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) - # Here GCS_FILE_PATH leads to a video of up to 50GB in size and up - # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - # length of the video, and end has to be after the start. Any segment - # of a video which has one or more labels on it, is considered a - # hard negative for all other labels. Any segment with no labels on - # it is considered to be unknown. If a whole video is unknown, then - # it shuold be mentioned just once with ",," in place of LABEL, - # TIME_SEGMENT_START,TIME_SEGMENT_END. - # Sample top level CSV file: - # TRAIN,gs://folder/train_videos.csv - # TEST,gs://folder/test_videos.csv - # UNASSIGNED,gs://folder/other_videos.csv - # Sample rows of a CSV file for a particular ML_USE: - # gs://folder/video1.avi,car,120,180.000021 - # gs://folder/video1.avi,bike,150,180.000021 - # gs://folder/vid2.avi,car,0,60.5 - # gs://folder/vid3.avi,,, - # - # * For Video Object Tracking: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH - # where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH - # should lead to another .csv file which describes examples that have - # given ML_USE, using one of the following row format: - # GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX - # or - # GCS_FILE_PATH,,,,,,,,,, - # Here GCS_FILE_PATH leads to a video of up to 50GB in size and up - # to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # Providing INSTANCE_IDs can help to obtain a better model. When - # a specific labeled entity leaves the video frame, and shows up - # afterwards it is not required, albeit preferable, that the same - # INSTANCE_ID is given to it. - # TIMESTAMP must be within the length of the video, the - # BOUNDING_BOX is assumed to be drawn on the closest video's frame - # to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected - # to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per - # frame are allowed. If a whole video is unknown, then it should be - # mentioned just once with ",,,,,,,,,," in place of LABEL, - # [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX. - # Sample top level CSV file: - # TRAIN,gs://folder/train_videos.csv - # TEST,gs://folder/test_videos.csv - # UNASSIGNED,gs://folder/other_videos.csv - # Seven sample rows of a CSV file for a particular ML_USE: - # gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 - # gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 - # gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 - # gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, - # gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, - # gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, - # gs://folder/video2.avi,,,,,,,,,,, - # * For Text Extraction: - # CSV file(s) with each line in format: - # ML_USE,GCS_FILE_PATH - # GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which - # either imports text in-line or as documents. Any given - # .JSONL file must be 100MB or smaller. - # The in-line .JSONL file contains, per line, a proto that wraps a - # TextSnippet proto (in json representation) followed by one or more - # AnnotationPayload protos (called annotations), which have - # display_name and text_extraction detail populated. The given text - # is expected to be annotated exhaustively, for example, if you look - # for animals and text contains "dolphin" that is not labeled, then - # "dolphin" is assumed to not be an animal. Any given text snippet - # content must be 10KB or smaller, and also be UTF-8 NFC encoded - # (ASCII already is). - # The document .JSONL file contains, per line, a proto that wraps a - # Document proto. The Document proto must have either document_text - # or input_config set. In document_text case, the Document proto may - # also contain the spatial information of the document, including - # layout, document dimension and page number. In input_config case, - # only PDF documents are supported now, and each document may be up - # to 2MB large. Currently, annotations on documents cannot be - # specified at import. - # Three sample CSV rows: - # TRAIN,gs://folder/file1.jsonl - # VALIDATE,gs://folder/file2.jsonl - # TEST,gs://folder/file3.jsonl - # Sample in-line JSON Lines file for entity extraction (presented here - # with artificial line breaks, but the only actual line break is - # denoted by \n).: - # { - # "document": { - # "document_text": \\{"content": "dog cat"} - # "layout": [ - # { - # "text_segment": { - # "start_offset": 0, - # "end_offset": 3, - # }, - # "page_number": 1, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.1, "y": 0.1}, - # \\{"x": 0.1, "y": 0.3}, - # \\{"x": 0.3, "y": 0.3}, - # \\{"x": 0.3, "y": 0.1}, - # ], - # }, - # "text_segment_type": TOKEN, - # }, - # { - # "text_segment": { - # "start_offset": 4, - # "end_offset": 7, - # }, - # "page_number": 1, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.4, "y": 0.1}, - # \\{"x": 0.4, "y": 0.3}, - # \\{"x": 0.8, "y": 0.3}, - # \\{"x": 0.8, "y": 0.1}, - # ], - # }, - # "text_segment_type": TOKEN, - # } - # - # ], - # "document_dimensions": { - # "width": 8.27, - # "height": 11.69, - # "unit": INCH, - # } - # "page_count": 1, - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": {"text_segment": {"start_offset": 0, - # "end_offset": 3}} - # }, - # { - # "display_name": "animal", - # "text_extraction": {"text_segment": {"start_offset": 4, - # "end_offset": 7}} - # } - # ], - # }\n - # { - # "text_snippet": { - # "content": "This dog is good." - # }, - # "annotations": [ - # { - # "display_name": "animal", - # "text_extraction": { - # "text_segment": \\{"start_offset": 5, "end_offset": 8} - # } - # } - # ] - # } - # Sample document JSON Lines file (presented here with artificial line - # breaks, but the only actual line break is denoted by \n).: - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - # } - # } - # } - # }\n - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] - # } - # } - # } - # } - # - # * For Text Classification: - # CSV file(s) with each line in format: - # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... - # TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If - # the column content is a valid gcs file path, i.e. prefixed by - # "gs://", it will be treated as a GCS_FILE_PATH, else if the content - # is enclosed within double quotes (""), it is - # treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path - # must lead to a .txt file with UTF-8 encoding, for example, - # "gs://folder/content.txt", and the content in it is extracted - # as a text snippet. In TEXT_SNIPPET case, the column content - # excluding quotes is treated as to be imported text snippet. In - # both cases, the text snippet/file size must be within 128kB. - # Maximum 100 unique labels are allowed per CSV row. - # Sample rows: - # TRAIN,"They have bad food and very rude",RudeService,BadFood - # TRAIN,gs://folder/content.txt,SlowService - # TEST,"Typically always bad service there.",RudeService - # VALIDATE,"Stomach ache to go.",BadFood - # - # * For Text Sentiment: - # CSV file(s) with each line in format: - # ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT - # TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If - # the column content is a valid gcs file path, that is, prefixed by - # "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated - # as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path - # must lead to a .txt file with UTF-8 encoding, for example, - # "gs://folder/content.txt", and the content in it is extracted - # as a text snippet. In TEXT_SNIPPET case, the column content itself - # is treated as to be imported text snippet. In both cases, the - # text snippet must be up to 500 characters long. - # Sample rows: - # TRAIN,"@freewrytin this is way too good for your product",2 - # TRAIN,"I need this product so bad",3 - # TEST,"Thank you for this product.",4 - # VALIDATE,gs://folder/content.txt,2 - # - # * For Tables: - # Either - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} or - # - # {::Google::Cloud::AutoML::V1beta1::InputConfig#bigquery_source bigquery_source} - # can be used. All inputs is concatenated into a single - # - # [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name] - # For gcs_source: - # CSV file(s), where the first row of the first file is the header, - # containing unique column names. If the first row of a subsequent - # file is the same as the header, then it is also treated as a - # header. All other rows contain values for the corresponding - # columns. - # Each .CSV file by itself must be 10GB or smaller, and their total - # size must be 100GB or smaller. - # First three sample rows of a CSV file: - # "Id","First Name","Last Name","Dob","Addresses" - # - # "1","John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" - # - # "2","Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} - # For bigquery_source: - # An URI of a BigQuery table. The user data size of the BigQuery - # table must be 100GB or smaller. - # An imported table must have between 2 and 1,000 columns, inclusive, - # and between 1000 and 100,000,000 rows, inclusive. There are at most 5 - # import data running in parallel. - # Definitions: - # ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED" - # Describes how the given example (file) should be used for model - # training. "UNASSIGNED" can be used when user has no preference. - # GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png". - # LABEL = A display name of an object on an image, video etc., e.g. "dog". - # Must be up to 32 characters long and can consist only of ASCII - # Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. - # For each label an AnnotationSpec is created which display_name - # becomes the label; AnnotationSpecs are given back in predictions. - # INSTANCE_ID = A positive integer that identifies a specific instance of a - # labeled entity on an example. Used e.g. to track two cars on - # a video while being able to tell apart which one is which. - # BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,, - # A rectangle parallel to the frame of the example (image, - # video). If 4 vertices are given they are connected by edges - # in the order provided, if 2 are given they are recognized - # as diagonally opposite vertices of the rectangle. - # VERTEX = COORDINATE,COORDINATE - # First coordinate is horizontal (x), the second is vertical (y). - # COORDINATE = A float in 0 to 1 range, relative to total length of - # image or video in given dimension. For fractions the - # leading non-decimal 0 can be omitted (i.e. 0.3 = .3). - # Point 0,0 is in top left. - # TIME_SEGMENT_START = TIME_OFFSET - # Expresses a beginning, inclusive, of a time segment - # within an example that has a time dimension - # (e.g. video). - # TIME_SEGMENT_END = TIME_OFFSET - # Expresses an end, exclusive, of a time segment within - # an example that has a time dimension (e.g. video). - # TIME_OFFSET = A number of seconds as measured from the start of an - # example (e.g. video). Fractions are allowed, up to a - # microsecond precision. "inf" is allowed, and it means the end - # of the example. - # TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within - # double quotes (""). - # SENTIMENT = An integer between 0 and - # Dataset.text_sentiment_dataset_metadata.sentiment_max - # (inclusive). Describes the ordinal of the sentiment - higher - # value means a more positive sentiment. All the values are - # completely relative, i.e. neither 0 needs to mean a negative or - # neutral sentiment nor sentiment_max needs to mean a positive one - # - it is just required that 0 is the least positive sentiment - # in the data, and sentiment_max is the most positive one. - # The SENTIMENT shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - # All SENTIMENT values between 0 and sentiment_max must be - # represented in the imported data. On prediction the same 0 to - # sentiment_max range will be used. The difference between - # neighboring sentiment values needs not to be uniform, e.g. 1 and - # 2 may be similar whereas the difference between 2 and 3 may be - # huge. - # - # Errors: - # If any of the provided CSV files can't be parsed or if more than certain - # percent of CSV rows cannot be processed then the operation fails and - # nothing is imported. Regardless of overall success or failure the per-row - # failures, up to a certain count cap, is listed in - # Operation.metadata.partial_failures. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] - # The Google Cloud Storage location for the input content. - # In ImportData, the gcs_source points to a csv with structure described in - # the comment. - # - # Note: The following fields are mutually exclusive: `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_source - # @return [::Google::Cloud::AutoML::V1beta1::BigQuerySource] - # The BigQuery location for the input content. - # - # Note: The following fields are mutually exclusive: `bigquery_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters describing the semantic of the - # imported data, any string must be up to 25000 - # characters long. - # - # * For Tables: - # `schema_inference_version` - (integer) Required. The version of the - # algorithm that should be used for the initial inference of the - # schema (columns' DataTypes) of the table the data is being imported - # into. Allowed values: "1". - class InputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Input configuration for BatchPredict Action. - # - # The format of input depends on the ML problem of the model used for - # prediction. As input source the - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} - # is expected, unless specified otherwise. - # - # The formats are represented in EBNF with commas being literal and with - # non-terminal symbols defined near the end of this comment. The formats - # are: - # - # * For Image Classification: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH - # which leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in - # the Batch predict output. - # Three sample rows: - # gs://folder/image1.jpeg - # gs://folder/image2.gif - # gs://folder/image3.png - # - # * For Image Object Detection: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH - # which leads to image of up to 30MB in size. Supported - # extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in - # the Batch predict output. - # Three sample rows: - # gs://folder/image1.jpeg - # gs://folder/image2.gif - # gs://folder/image3.png - # * For Video Classification: - # CSV file(s) with each line in format: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - # GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h - # duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - # length of the video, and end has to be after the start. - # Three sample rows: - # gs://folder/video1.mp4,10,40 - # gs://folder/video1.mp4,20,60 - # gs://folder/vid2.mov,0,inf - # - # * For Video Object Tracking: - # CSV file(s) with each line in format: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END - # GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h - # duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. - # TIME_SEGMENT_START and TIME_SEGMENT_END must be within the - # length of the video, and end has to be after the start. - # Three sample rows: - # gs://folder/video1.mp4,10,240 - # gs://folder/video1.mp4,300,360 - # gs://folder/vid2.mov,0,inf - # * For Text Classification: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH | TEXT_SNIPPET - # Any given text file can have size upto 128kB. - # Any given text snippet content must have 60,000 characters or less. - # Three sample rows: - # gs://folder/text1.txt - # "Some text content to predict" - # gs://folder/text3.pdf - # Supported file extensions: .txt, .pdf - # - # * For Text Sentiment: - # CSV file(s) with each line having just a single column: - # GCS_FILE_PATH | TEXT_SNIPPET - # Any given text file can have size upto 128kB. - # Any given text snippet content must have 500 characters or less. - # Three sample rows: - # gs://folder/text1.txt - # "Some text content to predict" - # gs://folder/text3.pdf - # Supported file extensions: .txt, .pdf - # - # * For Text Extraction - # .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or - # as documents (for a single BatchPredict call only one of the these - # formats may be used). - # The in-line .JSONL file(s) contain per line a proto that - # wraps a temporary user-assigned TextSnippet ID (string up to 2000 - # characters long) called "id", a TextSnippet proto (in - # json representation) and zero or more TextFeature protos. Any given - # text snippet content must have 30,000 characters or less, and also - # be UTF-8 NFC encoded (ASCII already is). The IDs provided should be - # unique. - # The document .JSONL file(s) contain, per line, a proto that wraps a - # Document proto with input_config set. Only PDF documents are - # supported now, and each document must be up to 2MB large. - # Any given .JSONL file must be 100MB or smaller, and no more than 20 - # files may be given. - # Sample in-line JSON Lines file (presented here with artificial line - # breaks, but the only actual line break is denoted by \n): - # { - # "id": "my_first_id", - # "text_snippet": { "content": "dog car cat"}, - # "text_features": [ - # { - # "text_segment": \\{"start_offset": 4, "end_offset": 6}, - # "structural_type": PARAGRAPH, - # "bounding_poly": { - # "normalized_vertices": [ - # \\{"x": 0.1, "y": 0.1}, - # \\{"x": 0.1, "y": 0.3}, - # \\{"x": 0.3, "y": 0.3}, - # \\{"x": 0.3, "y": 0.1}, - # ] - # }, - # } - # ], - # }\n - # { - # "id": "2", - # "text_snippet": { - # "content": "An elaborate content", - # "mime_type": "text/plain" - # } - # } - # Sample document JSON Lines file (presented here with artificial line - # breaks, but the only actual line break is denoted by \n).: - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] - # } - # } - # } - # }\n - # { - # "document": { - # "input_config": { - # "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] - # } - # } - # } - # } - # - # * For Tables: - # Either - # {::Google::Cloud::AutoML::V1beta1::InputConfig#gcs_source gcs_source} or - # - # {::Google::Cloud::AutoML::V1beta1::InputConfig#bigquery_source bigquery_source}. - # GCS case: - # CSV file(s), each by itself 10GB or smaller and total size must be - # 100GB or smaller, where first file must have a header containing - # column names. If the first row of a subsequent file is the same as - # the header, then it is also treated as a header. All other rows - # contain values for the corresponding columns. - # The column names must contain the model's - # - # [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # (order doesn't matter). The columns corresponding to the model's - # input feature column specs must contain values compatible with the - # column spec's data types. Prediction on all the rows, i.e. the CSV - # lines, will be attempted. For FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # all columns having - # - # [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] - # type will be ignored. - # First three sample rows of a CSV file: - # "First Name","Last Name","Dob","Addresses" - # - # "John","Doe","1968-01-22","[\\{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},\\{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" - # - # "Jane","Doe","1980-10-16","[\\{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},\\{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} - # BigQuery case: - # An URI of a BigQuery table. The user data size of the BigQuery - # table must be 100GB or smaller. - # The column names must contain the model's - # - # [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # (order doesn't matter). The columns corresponding to the model's - # input feature column specs must contain values compatible with the - # column spec's data types. Prediction on all the rows of the table - # will be attempted. For FORECASTING - # - # [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # all columns having - # - # [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] - # type will be ignored. - # - # Definitions: - # GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi". - # TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within - # double quotes ("") - # TIME_SEGMENT_START = TIME_OFFSET - # Expresses a beginning, inclusive, of a time segment - # within an - # example that has a time dimension (e.g. video). - # TIME_SEGMENT_END = TIME_OFFSET - # Expresses an end, exclusive, of a time segment within - # an example that has a time dimension (e.g. video). - # TIME_OFFSET = A number of seconds as measured from the start of an - # example (e.g. video). Fractions are allowed, up to a - # microsecond precision. "inf" is allowed and it means the end - # of the example. - # - # Errors: - # If any of the provided CSV files can't be parsed or if more than certain - # percent of CSV rows cannot be processed then the operation fails and - # prediction does not happen. Regardless of overall success or failure the - # per-row failures, up to a certain count cap, will be listed in - # Operation.metadata.partial_failures. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] - # The Google Cloud Storage location for the input content. - # - # Note: The following fields are mutually exclusive: `gcs_source`, `bigquery_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_source - # @return [::Google::Cloud::AutoML::V1beta1::BigQuerySource] - # The BigQuery location for the input content. - # - # Note: The following fields are mutually exclusive: `bigquery_source`, `gcs_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BatchPredictInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input configuration of a {::Google::Cloud::AutoML::V1beta1::Document Document}. - # @!attribute [rw] gcs_source - # @return [::Google::Cloud::AutoML::V1beta1::GcsSource] - # The Google Cloud Storage location of the document file. Only a single path - # should be given. - # Max supported size: 512MB. - # Supported extensions: .PDF. - class DocumentInputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # * For Translation: - # CSV file `translation.csv`, with each line in format: - # ML_USE,GCS_FILE_PATH - # GCS_FILE_PATH leads to a .TSV file which describes examples that have - # given ML_USE, using the following row format per line: - # TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target - # language) - # - # * For Tables: - # Output depends on whether the dataset was imported from GCS or - # BigQuery. - # GCS case: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#gcs_destination gcs_destination} - # must be set. Exported are CSV file(s) `tables_1.csv`, - # `tables_2.csv`,...,`tables_N.csv` with each having as header line - # the table's column names, and all other lines contain values for - # the header columns. - # BigQuery case: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # - # `export_data__` - # where will be made - # BigQuery-dataset-name compatible (e.g. most special characters will - # become underscores), and timestamp will be in - # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that - # dataset a new table called `primary_table` will be created, and - # filled with precisely the same data as this obtained on import. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] - # The Google Cloud Storage location where the output is to be written to. - # For Image Object Detection, Text Extraction, Video Classification and - # Tables, in the given directory a new directory will be created with name: - # export_data-- where - # timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export - # output will be written into that directory. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] - # The BigQuery location where the output is to be written to. - # - # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class OutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for BatchPredict Action. - # - # As destination the - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#gcs_destination gcs_destination} - # must be set unless specified otherwise for a domain. If gcs_destination is - # set then in the given directory a new directory is created. Its name - # will be - # "prediction--", - # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents - # of it depends on the ML problem the predictions are made for. - # - # * For Image Classification: - # In the created directory files `image_classification_1.jsonl`, - # `image_classification_2.jsonl`,...,`image_classification_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of the successfully predicted images and annotations. - # A single image will be listed only once with all its annotations, - # and its annotations will never be split across files. - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps image's "ID" : "" followed by a list of - # zero or more AnnotationPayload protos (called annotations), which - # have classification detail populated. - # If prediction for any image failed (partially or completely), then an - # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - # files will be created (N depends on total number of failed - # predictions). These files will have a JSON representation of a proto - # that wraps the same "ID" : "" but here followed by - # exactly one - # - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`fields. - # - # * For Image Object Detection: - # In the created directory files `image_object_detection_1.jsonl`, - # `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of the successfully predicted images and annotations. - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps image's "ID" : "" followed by a list of - # zero or more AnnotationPayload protos (called annotations), which - # have image_object_detection detail populated. A single image will - # be listed only once with all its annotations, and its annotations - # will never be split across files. - # If prediction for any image failed (partially or completely), then - # additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` - # files will be created (N depends on total number of failed - # predictions). These files will have a JSON representation of a proto - # that wraps the same "ID" : "" but here followed by - # exactly one - # - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`fields. - # * For Video Classification: - # In the created directory a video_classification.csv file, and a .JSON - # file per each video classification requested in the input (i.e. each - # line in given CSV(s)), will be created. - # - # The format of video_classification.csv is: - # - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - # where: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - # the prediction input lines (i.e. video_classification.csv has - # precisely the same number of lines as the prediction input had.) - # JSON_FILE_NAME = Name of .JSON file in the output directory, which - # contains prediction responses for the video time segment. - # STATUS = "OK" if prediction completed successfully, or an error code - # with message otherwise. If STATUS is not "OK" then the .JSON file - # for that line may not exist or be empty. - # - # Each .JSON file, assuming STATUS is "OK", will contain a list of - # AnnotationPayload protos in JSON format, which are the predictions - # for the video time segment the file is assigned to in the - # video_classification.csv. All AnnotationPayload protos will have - # video_classification field set, and will be sorted by - # video_classification.type field (note that the returned types are - # governed by `classifaction_types` parameter in - # [PredictService.BatchPredictRequest.params][]). - # - # * For Video Object Tracking: - # In the created directory a video_object_tracking.csv file will be - # created, and multiple files video_object_trackinng_1.json, - # video_object_trackinng_2.json,..., video_object_trackinng_N.json, - # where N is the number of requests in the input (i.e. the number of - # lines in given CSV(s)). - # - # The format of video_object_tracking.csv is: - # - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS - # where: - # GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 - # the prediction input lines (i.e. video_object_tracking.csv has - # precisely the same number of lines as the prediction input had.) - # JSON_FILE_NAME = Name of .JSON file in the output directory, which - # contains prediction responses for the video time segment. - # STATUS = "OK" if prediction completed successfully, or an error - # code with message otherwise. If STATUS is not "OK" then the .JSON - # file for that line may not exist or be empty. - # - # Each .JSON file, assuming STATUS is "OK", will contain a list of - # AnnotationPayload protos in JSON format, which are the predictions - # for each frame of the video time segment the file is assigned to in - # video_object_tracking.csv. All AnnotationPayload protos will have - # video_object_tracking field set. - # * For Text Classification: - # In the created directory files `text_classification_1.jsonl`, - # `text_classification_2.jsonl`,...,`text_classification_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps input text snippet or input text file and a list of - # zero or more AnnotationPayload protos (called annotations), which - # have classification detail populated. A single text snippet or file - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # - # If prediction for any text snippet or file failed (partially or - # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps input text snippet or input text file followed by - # exactly one - # - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Text Sentiment: - # In the created directory files `text_sentiment_1.jsonl`, - # `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # - # Each .JSONL file will contain, per line, a JSON representation of a - # proto that wraps input text snippet or input text file and a list of - # zero or more AnnotationPayload protos (called annotations), which - # have text_sentiment detail populated. A single text snippet or file - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # - # If prediction for any text snippet or file failed (partially or - # completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps input text snippet or input text file followed by - # exactly one - # - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Text Extraction: - # In the created directory files `text_extraction_1.jsonl`, - # `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` - # will be created, where N may be 1, and depends on the - # total number of inputs and annotations found. - # The contents of these .JSONL file(s) depend on whether the input - # used inline text, or documents. - # If input was inline, then each .JSONL file will contain, per line, - # a JSON representation of a proto that wraps given in request text - # snippet's "id" (if specified), followed by input text snippet, - # and a list of zero or more - # AnnotationPayload protos (called annotations), which have - # text_extraction detail populated. A single text snippet will be - # listed only once with all its annotations, and its annotations will - # never be split across files. - # If input used documents, then each .JSONL file will contain, per - # line, a JSON representation of a proto that wraps given in request - # document proto, followed by its OCR-ed representation in the form - # of a text snippet, finally followed by a list of zero or more - # AnnotationPayload protos (called annotations), which have - # text_extraction detail populated and refer, via their indices, to - # the OCR-ed text snippet. A single document (and its text snippet) - # will be listed only once with all its annotations, and its - # annotations will never be split across files. - # If prediction for any text snippet failed (partially or completely), - # then additional `errors_1.jsonl`, `errors_2.jsonl`,..., - # `errors_N.jsonl` files will be created (N depends on total number of - # failed predictions). These files will have a JSON representation of a - # proto that wraps either the "id" : "" (in case of inline) - # or the document proto (in case of document) but here followed by - # exactly one - # - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # containing only `code` and `message`. - # - # * For Tables: - # Output depends on whether - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#gcs_destination gcs_destination} - # or - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig#bigquery_destination bigquery_destination} - # is set (either is allowed). - # GCS case: - # In the created directory files `tables_1.csv`, `tables_2.csv`,..., - # `tables_N.csv` will be created, where N may be 1, and depends on - # the total number of the successfully predicted rows. - # For all CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # Each .csv file will contain a header, listing all columns' - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # given on input followed by M target column names in the format of - # - # "<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>__score" where M is the number of distinct target values, - # i.e. number of distinct values in the target column of the table - # used to train the model. Subsequent lines will contain the - # respective values of successfully predicted rows, with the last, - # i.e. the target, columns having the corresponding prediction - # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation#score scores}. - # For REGRESSION and FORECASTING - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: - # Each .csv file will contain a header, listing all columns' - # [display_name-s][google.cloud.automl.v1beta1.display_name] given - # on input followed by the predicted target column with name in the - # format of - # - # "predicted_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>" - # Subsequent lines will contain the respective values of - # successfully predicted rows, with the last, i.e. the target, - # column having the predicted target value. - # If prediction for any rows failed, then an additional - # `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be - # created (N depends on total number of failed rows). These files - # will have analogous format as `tables_*.csv`, but always with a - # single target column having - # - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # represented as a JSON string, and containing only `code` and - # `message`. - # BigQuery case: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # `prediction__` - # where will be made - # BigQuery-dataset-name compatible (e.g. most special characters will - # become underscores), and timestamp will be in - # YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset - # two tables will be created, `predictions`, and `errors`. - # The `predictions` table's column names will be the input columns' - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name-s} - # followed by the target column with name in the format of - # - # "predicted_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>" - # The input feature columns will contain the respective values of - # successfully predicted rows, with the target column having an - # ARRAY of - # - # {::Google::Cloud::AutoML::V1beta1::AnnotationPayload AnnotationPayloads}, - # represented as STRUCT-s, containing - # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation TablesAnnotation}. - # The `errors` table contains rows for which the prediction has - # failed, it has analogous input columns while the target column name - # is in the format of - # - # "errors_<{::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_specs} - # - # {::Google::Cloud::AutoML::V1beta1::ColumnSpec#display_name display_name}>", - # and as a value has - # - # [`google.rpc.Status`](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) - # represented as a STRUCT, and containing only `code` and `message`. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] - # The Google Cloud Storage location of the directory where the output is to - # be written to. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] - # The BigQuery location where the output is to be written to. - # - # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BatchPredictOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output configuration for ModelExport Action. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcsDestination] - # The Google Cloud Storage location where the model is to be written to. - # This location may only be set for the following model formats: - # "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". - # - # Under the directory given as the destination a new one with name - # "model-export--", - # where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, - # will be created. Inside the model and any of its supporting files - # will be written. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `gcr_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gcr_destination - # @return [::Google::Cloud::AutoML::V1beta1::GcrDestination] - # The GCR location where model image is to be pushed to. This location - # may only be set for the following model formats: - # "docker". - # - # The model image will be created under the given URI. - # - # Note: The following fields are mutually exclusive: `gcr_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] model_format - # @return [::String] - # The format in which the model must be exported. The available, and default, - # formats depend on the problem and model type (if given problem and type - # combination doesn't have a format listed, it means its models are not - # exportable): - # - # * For Image Classification mobile-low-latency-1, mobile-versatile-1, - # mobile-high-accuracy-1: - # "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", - # "docker". - # - # * For Image Classification mobile-core-ml-low-latency-1, - # mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: - # "core_ml" (default). - # - # * For Image Object Detection mobile-low-latency-1, mobile-versatile-1, - # mobile-high-accuracy-1: - # "tflite", "tf_saved_model", "tf_js". - # - # * For Video Classification cloud, - # "tf_saved_model". - # - # * For Video Object Tracking cloud, - # "tf_saved_model". - # - # * For Video Object Tracking mobile-versatile-1: - # "tflite", "edgetpu_tflite", "tf_saved_model", "docker". - # - # * For Video Object Tracking mobile-coral-versatile-1: - # "tflite", "edgetpu_tflite", "docker". - # - # * For Video Object Tracking mobile-coral-low-latency-1: - # "tflite", "edgetpu_tflite", "docker". - # - # * For Video Object Tracking mobile-jetson-versatile-1: - # "tf_saved_model", "docker". - # - # * For Tables: - # "docker". - # - # Formats description: - # - # * tflite - Used for Android mobile devices. - # * edgetpu_tflite - Used for [Edge TPU](https://cloud.google.com/edge-tpu/) - # devices. - # * tf_saved_model - A tensorflow model in SavedModel format. - # * tf_js - A [TensorFlow.js](https://www.tensorflow.org/js) model that can - # be used in the browser and in Node.js using JavaScript. - # * docker - Used for Docker containers. Use the params field to customize - # the container. The container is verified to work correctly on - # ubuntu 16.04 operating system. See more at - # [containers - # - # quickstart](https://cloud.google.com/vision/automl/docs/containers-gcs-quickstart) - # * core_ml - Used for iOS mobile devices. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional model-type and format specific parameters describing the - # requirements for the to be exported model files, any string must be up to - # 25000 characters long. - # - # * For `docker` format: - # `cpu_architecture` - (string) "x86_64" (default). - # `gpu_architecture` - (string) "none" (default), "nvidia". - class ModelExportOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Output configuration for ExportEvaluatedExamples Action. Note that this call - # is available only for 30 days since the moment the model was evaluated. - # The output depends on the domain, as follows (note that only examples from - # the TEST set are exported): - # - # * For Tables: - # - # {::Google::Cloud::AutoML::V1beta1::OutputConfig#bigquery_destination bigquery_destination} - # pointing to a BigQuery project must be set. In the given project a - # new dataset will be created with name - # - # `export_evaluated_examples__` - # where will be made BigQuery-dataset-name - # compatible (e.g. most special characters will become underscores), - # and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" - # format. In the dataset an `evaluated_examples` table will be - # created. It will have all the same columns as the - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id primary_table} - # of the - # {::Google::Cloud::AutoML::V1beta1::Model#dataset_id dataset} from which - # the model was created, as they were at the moment of model's - # evaluation (this includes the target column with its ground - # truth), followed by a column called "predicted_". That - # last column will contain the model's prediction result for each - # respective row, given as ARRAY of - # {::Google::Cloud::AutoML::V1beta1::AnnotationPayload AnnotationPayloads}, - # represented as STRUCT-s, containing - # {::Google::Cloud::AutoML::V1beta1::TablesAnnotation TablesAnnotation}. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::AutoML::V1beta1::BigQueryDestination] - # The BigQuery location where the output is to be written to. - class ExportEvaluatedExamplesOutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location for the input content. - # @!attribute [rw] input_uris - # @return [::Array<::String>] - # Required. Google Cloud Storage URIs to input files, up to 2000 characters - # long. Accepted forms: - # * Full object path, e.g. gs://bucket/directory/object.csv - class GcsSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The BigQuery location for the input content. - # @!attribute [rw] input_uri - # @return [::String] - # Required. BigQuery URI to a table, up to 2000 characters long. - # Accepted forms: - # * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId - class BigQuerySource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Google Cloud Storage location where the output is to be written to. - # @!attribute [rw] output_uri_prefix - # @return [::String] - # Required. Google Cloud Storage URI to output directory, up to 2000 - # characters long. - # Accepted forms: - # * Prefix path: gs://bucket/directory - # The requesting user must have write permission to the bucket. - # The directory is created if it doesn't exist. - class GcsDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The BigQuery location for the output content. - # @!attribute [rw] output_uri - # @return [::String] - # Required. BigQuery URI to a project, up to 2000 characters long. - # Accepted forms: - # * BigQuery path e.g. bq://projectId - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The GCR location where the image must be pushed to. - # @!attribute [rw] output_uri - # @return [::String] - # Required. Google Contained Registry URI of the new image, up to 2000 - # characters long. See - # - # https://cloud.google.com/container-registry/do - # // cs/pushing-and-pulling#pushing_an_image_to_a_registry - # Accepted forms: - # * [HOSTNAME]/[PROJECT-ID]/[IMAGE] - # * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG] - # - # The requesting user must have permission to push images the project. - class GcrDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb deleted file mode 100644 index 6e167f65d37b..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # API proto representing a trained machine learning model. - # @!attribute [rw] translation_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TranslationModelMetadata] - # Metadata for translation models. - # - # Note: The following fields are mutually exclusive: `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelMetadata] - # Metadata for image classification models. - # - # Note: The following fields are mutually exclusive: `image_classification_model_metadata`, `translation_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextClassificationModelMetadata] - # Metadata for text classification models. - # - # Note: The following fields are mutually exclusive: `text_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelMetadata] - # Metadata for image object detection models. - # - # Note: The following fields are mutually exclusive: `image_object_detection_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_classification_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoClassificationModelMetadata] - # Metadata for video classification models. - # - # Note: The following fields are mutually exclusive: `video_classification_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingModelMetadata] - # Metadata for video object tracking models. - # - # Note: The following fields are mutually exclusive: `video_object_tracking_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionModelMetadata] - # Metadata for text extraction models. - # - # Note: The following fields are mutually exclusive: `text_extraction_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `tables_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tables_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TablesModelMetadata] - # Metadata for Tables models. - # - # Note: The following fields are mutually exclusive: `tables_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `text_sentiment_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_model_metadata - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentModelMetadata] - # Metadata for text sentiment models. - # - # Note: The following fields are mutually exclusive: `text_sentiment_model_metadata`, `translation_model_metadata`, `image_classification_model_metadata`, `text_classification_model_metadata`, `image_object_detection_model_metadata`, `video_classification_model_metadata`, `video_object_tracking_model_metadata`, `text_extraction_model_metadata`, `tables_model_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the model. - # Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] display_name - # @return [::String] - # Required. The name of the model to show in the interface. The name can be - # up to 32 characters long and can consist only of ASCII Latin letters A-Z - # and a-z, underscores - # (_), and ASCII digits 0-9. It must start with a letter. - # @!attribute [rw] dataset_id - # @return [::String] - # Required. The resource ID of the dataset used to create the model. The dataset must - # come from the same ancestor project and location. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the model training finished and can be used for prediction. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model was last updated. - # @!attribute [rw] deployment_state - # @return [::Google::Cloud::AutoML::V1beta1::Model::DeploymentState] - # Output only. Deployment state of the model. A model can only serve - # prediction requests after it gets deployed. - class Model - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Deployment state of the model. - module DeploymentState - # Should not be used, an un-set enum has this value by default. - DEPLOYMENT_STATE_UNSPECIFIED = 0 - - # Model is deployed. - DEPLOYED = 1 - - # Model is not deployed. - UNDEPLOYED = 2 - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb deleted file mode 100644 index 86132556d0f6..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/model_evaluation.rb +++ /dev/null @@ -1,117 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Evaluation results of a model. - # @!attribute [rw] classification_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics] - # Model evaluation metrics for image, text, video and tables - # classification. - # Tables problem is considered a classification when the target column - # is CATEGORY DataType. - # - # Note: The following fields are mutually exclusive: `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] regression_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::RegressionEvaluationMetrics] - # Model evaluation metrics for Tables regression. - # Tables problem is considered a regression when the target column - # has FLOAT64 DataType. - # - # Note: The following fields are mutually exclusive: `regression_evaluation_metrics`, `classification_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] translation_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::TranslationEvaluationMetrics] - # Model evaluation metrics for translation. - # - # Note: The following fields are mutually exclusive: `translation_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_object_detection_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionEvaluationMetrics] - # Model evaluation metrics for image object detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] video_object_tracking_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::VideoObjectTrackingEvaluationMetrics] - # Model evaluation metrics for video object tracking. - # - # Note: The following fields are mutually exclusive: `video_object_tracking_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `text_sentiment_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_sentiment_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::TextSentimentEvaluationMetrics] - # Evaluation metrics for text sentiment models. - # - # Note: The following fields are mutually exclusive: `text_sentiment_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_extraction_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_extraction_evaluation_metrics - # @return [::Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics] - # Evaluation metrics for text extraction models. - # - # Note: The following fields are mutually exclusive: `text_extraction_evaluation_metrics`, `classification_evaluation_metrics`, `regression_evaluation_metrics`, `translation_evaluation_metrics`, `image_object_detection_evaluation_metrics`, `video_object_tracking_evaluation_metrics`, `text_sentiment_evaluation_metrics`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Output only. Resource name of the model evaluation. - # Format: - # - # `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` - # @!attribute [rw] annotation_spec_id - # @return [::String] - # Output only. The ID of the annotation spec that the model evaluation applies to. The - # The ID is empty for the overall model evaluation. - # For Tables annotation specs in the dataset do not exist and this ID is - # always not set, but for CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - # the - # {::Google::Cloud::AutoML::V1beta1::ModelEvaluation#display_name display_name} - # field is used. - # @!attribute [rw] display_name - # @return [::String] - # Output only. The value of - # {::Google::Cloud::AutoML::V1beta1::AnnotationSpec#display_name display_name} at - # the moment when the model was trained. Because this field returns a value - # at model training time, for different models trained from the same dataset, - # the values may differ, since display names could had been changed between - # the two model's trainings. - # For Tables CLASSIFICATION - # - # [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - # distinct values of the target column at the moment of the model evaluation - # are populated here. - # The display_name is empty for the overall model evaluation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when this model evaluation was created. - # @!attribute [rw] evaluated_example_count - # @return [::Integer] - # Output only. The number of examples used for model evaluation, i.e. for - # which ground truth from time of model creation is compared against the - # predicted annotations created by the model. - # For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is - # the total number of all examples used for evaluation. - # Otherwise, this is the count of examples that according to the ground - # truth were annotated by the - # - # {::Google::Cloud::AutoML::V1beta1::ModelEvaluation#annotation_spec_id annotation_spec_id}. - class ModelEvaluation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb deleted file mode 100644 index 6920b67fbe65..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/operations.rb +++ /dev/null @@ -1,232 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Metadata used across all long running operations returned by AutoML API. - # @!attribute [rw] delete_details - # @return [::Google::Cloud::AutoML::V1beta1::DeleteOperationMetadata] - # Details of a Delete operation. - # - # Note: The following fields are mutually exclusive: `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] deploy_model_details - # @return [::Google::Cloud::AutoML::V1beta1::DeployModelOperationMetadata] - # Details of a DeployModel operation. - # - # Note: The following fields are mutually exclusive: `deploy_model_details`, `delete_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] undeploy_model_details - # @return [::Google::Cloud::AutoML::V1beta1::UndeployModelOperationMetadata] - # Details of an UndeployModel operation. - # - # Note: The following fields are mutually exclusive: `undeploy_model_details`, `delete_details`, `deploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] create_model_details - # @return [::Google::Cloud::AutoML::V1beta1::CreateModelOperationMetadata] - # Details of CreateModel operation. - # - # Note: The following fields are mutually exclusive: `create_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] import_data_details - # @return [::Google::Cloud::AutoML::V1beta1::ImportDataOperationMetadata] - # Details of ImportData operation. - # - # Note: The following fields are mutually exclusive: `import_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `batch_predict_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] batch_predict_details - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOperationMetadata] - # Details of BatchPredict operation. - # - # Note: The following fields are mutually exclusive: `batch_predict_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `export_data_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_data_details - # @return [::Google::Cloud::AutoML::V1beta1::ExportDataOperationMetadata] - # Details of ExportData operation. - # - # Note: The following fields are mutually exclusive: `export_data_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_model_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_model_details - # @return [::Google::Cloud::AutoML::V1beta1::ExportModelOperationMetadata] - # Details of ExportModel operation. - # - # Note: The following fields are mutually exclusive: `export_model_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_evaluated_examples_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] export_evaluated_examples_details - # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOperationMetadata] - # Details of ExportEvaluatedExamples operation. - # - # Note: The following fields are mutually exclusive: `export_evaluated_examples_details`, `delete_details`, `deploy_model_details`, `undeploy_model_details`, `create_model_details`, `import_data_details`, `batch_predict_details`, `export_data_details`, `export_model_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] progress_percent - # @return [::Integer] - # Output only. Progress of operation. Range: [0, 100]. - # Not used currently. - # @!attribute [rw] partial_failures - # @return [::Array<::Google::Rpc::Status>] - # Output only. Partial failures encountered. - # E.g. single files that couldn't be read. - # This field should never exceed 20 entries. - # Status details field will contain standard GCP error details. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was created. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was updated for the last time. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of operations that perform deletes of any entities. - class DeleteOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of DeployModel operation. - class DeployModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of UndeployModel operation. - class UndeployModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of CreateModel operation. - class CreateModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of ImportData operation. - class ImportDataOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details of ExportData operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::ExportDataOperationMetadata::ExportDataOutputInfo] - # Output only. Information further describing this export data's output. - class ExportDataOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes this export data's output. - # Supplements - # {::Google::Cloud::AutoML::V1beta1::OutputConfig OutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the exported data is written. - # - # Note: The following fields are mutually exclusive: `gcs_output_directory`, `bigquery_output_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_output_dataset - # @return [::String] - # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - # format, into which the exported data is written. - # - # Note: The following fields are mutually exclusive: `bigquery_output_dataset`, `gcs_output_directory`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExportDataOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of BatchPredict operation. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig] - # Output only. The input config that was given upon starting this - # batch predict operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOperationMetadata::BatchPredictOutputInfo] - # Output only. Information further describing this batch predict's output. - class BatchPredictOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes this batch predict's output. - # Supplements - # - # {::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig BatchPredictOutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the prediction output is written. - # - # Note: The following fields are mutually exclusive: `gcs_output_directory`, `bigquery_output_dataset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_output_dataset - # @return [::String] - # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - # format, into which the prediction output is written. - # - # Note: The following fields are mutually exclusive: `bigquery_output_dataset`, `gcs_output_directory`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BatchPredictOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of ExportModel operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::ExportModelOperationMetadata::ExportModelOutputInfo] - # Output only. Information further describing the output of this model - # export. - class ExportModelOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes the output of model export. - # Supplements - # - # {::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig ModelExportOutputConfig}. - # @!attribute [rw] gcs_output_directory - # @return [::String] - # The full path of the Google Cloud Storage directory created, into which - # the model will be exported. - class ExportModelOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Details of EvaluatedExamples operation. - # @!attribute [rw] output_info - # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOperationMetadata::ExportEvaluatedExamplesOutputInfo] - # Output only. Information further describing the output of this evaluated - # examples export. - class ExportEvaluatedExamplesOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Further describes the output of the evaluated examples export. - # Supplements - # - # {::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig ExportEvaluatedExamplesOutputConfig}. - # @!attribute [rw] bigquery_output_dataset - # @return [::String] - # The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - # format, into which the output of export evaluated examples is written. - class ExportEvaluatedExamplesOutputInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb deleted file mode 100644 index 87c78db799ad..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/prediction_service.rb +++ /dev/null @@ -1,238 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Request message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict PredictionService.Predict}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the model requested to serve the prediction. - # @!attribute [rw] payload - # @return [::Google::Cloud::AutoML::V1beta1::ExamplePayload] - # Required. Payload to perform a prediction on. The payload must match the - # problem type that the model was trained to solve. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific parameters, any string must be up to 25000 - # characters long. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that have - # at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned in the response. Default is 100, the - # requested value may be limited by server. - # * For Tables: - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotation. - # The default is false. - class PredictRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict PredictionService.Predict}. - # @!attribute [rw] payload - # @return [::Array<::Google::Cloud::AutoML::V1beta1::AnnotationPayload>] - # Prediction result. - # Translation and Text Sentiment will return precisely one payload. - # @!attribute [rw] preprocessed_input - # @return [::Google::Cloud::AutoML::V1beta1::ExamplePayload] - # The preprocessed example that AutoML actually makes prediction on. - # Empty if AutoML does not preprocess the input example. - # * For Text Extraction: - # If the input is a .pdf file, the OCR'ed text will be provided in - # {::Google::Cloud::AutoML::V1beta1::Document#document_text document_text}. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific prediction response metadata. - # - # * For Image Object Detection: - # `max_bounding_box_count` - (int64) At most that many bounding boxes per - # image could have been returned. - # - # * For Text Sentiment: - # `sentiment_score` - (float, deprecated) A value between -1 and 1, - # -1 maps to least positive sentiment, while 1 maps to the most positive - # one and the higher the score, the more positive the sentiment in the - # document is. Yet these values are relative to the training data, so - # e.g. if all data was positive then -1 will be also positive (though - # the least). - # The sentiment_score shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - class PredictResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the model requested to serve the batch prediction. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig] - # Required. The input configuration for batch prediction. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig] - # Required. The Configuration specifying where output predictions should - # be written. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::String}] - # Required. Additional domain-specific parameters for the predictions, any string must - # be up to 25000 characters long. - # - # * For Text Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a text snippet, it will only produce results - # that have at least this confidence score. The default is 0.5. - # - # * For Image Classification: - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for an image, it will only produce results that - # have at least this confidence score. The default is 0.5. - # - # * For Image Object Detection: - # - # `score_threshold` - (float) When Model detects objects on the image, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be produced per image. Default is 100, the - # requested value may be limited by server. - # - # * For Video Classification : - # - # `score_threshold` - (float) A value from 0.0 to 1.0. When the model - # makes predictions for a video, it will only produce results that - # have at least this confidence score. The default is 0.5. - # `segment_classification` - (boolean) Set to true to request - # segment-level classification. AutoML Video Intelligence returns - # labels and their confidence scores for the entire segment of the - # video that user specified in the request configuration. - # The default is "true". - # `shot_classification` - (boolean) Set to true to request shot-level - # classification. AutoML Video Intelligence determines the boundaries - # for each camera shot in the entire segment of the video that user - # specified in the request configuration. AutoML Video Intelligence - # then returns labels and their confidence scores for each detected - # shot, along with the start and end time of the shot. - # WARNING: Model evaluation is not done for this classification type, - # the quality of it depends on training data, but there are no metrics - # provided to describe that quality. The default is "false". - # `1s_interval_classification` - (boolean) Set to true to request - # classification for a video at one-second intervals. AutoML Video - # Intelligence returns labels and their confidence scores for each - # second of the entire segment of the video that user specified in the - # request configuration. - # WARNING: Model evaluation is not done for this classification - # type, the quality of it depends on training data, but there are no - # metrics provided to describe that quality. The default is - # "false". - # - # * For Tables: - # - # feature_importance - (boolean) Whether feature importance - # should be populated in the returned TablesAnnotations. The - # default is false. - # - # * For Video Object Tracking: - # - # `score_threshold` - (float) When Model detects objects on video frames, - # it will only produce bounding boxes which have at least this - # confidence score. Value in 0 to 1 range, default is 0.5. - # `max_bounding_box_count` - (int64) No more than this number of bounding - # boxes will be returned per frame. Default is 100, the requested - # value may be limited by server. - # `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - # at least that long as a relative value of video frame size will be - # returned. Value in 0 to 1 range. Default is 0. - class BatchPredictRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Result of the Batch Predict. This message is returned in - # {::Google::Longrunning::Operation#response response} of the operation returned - # by the {::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict PredictionService.BatchPredict}. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional domain-specific prediction response metadata. - # - # * For Image Object Detection: - # `max_bounding_box_count` - (int64) At most that many bounding boxes per - # image could have been returned. - # - # * For Video Object Tracking: - # `max_bounding_box_count` - (int64) At most that many bounding boxes per - # frame could have been returned. - class BatchPredictResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb deleted file mode 100644 index 7fc488386a6c..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/ranges.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A range between two double numbers. - # @!attribute [rw] start - # @return [::Float] - # Start of the range, inclusive. - # @!attribute [rw] end - # @return [::Float] - # End of the range, exclusive. - class DoubleRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb deleted file mode 100644 index 147832f1fabb..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/regression.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Metrics for regression problems. - # @!attribute [rw] root_mean_squared_error - # @return [::Float] - # Output only. Root Mean Squared Error (RMSE). - # @!attribute [rw] mean_absolute_error - # @return [::Float] - # Output only. Mean Absolute Error (MAE). - # @!attribute [rw] mean_absolute_percentage_error - # @return [::Float] - # Output only. Mean absolute percentage error. Only set if all ground truth - # values are are positive. - # @!attribute [rw] r_squared - # @return [::Float] - # Output only. R squared. - # @!attribute [rw] root_mean_squared_log_error - # @return [::Float] - # Output only. Root mean squared log error. - class RegressionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb deleted file mode 100644 index 1c76959322fb..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/service.rb +++ /dev/null @@ -1,452 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset AutoMl.CreateDataset}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project to create the dataset for. - # @!attribute [rw] dataset - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # Required. The dataset to create. - class CreateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset AutoMl.GetDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to retrieve. - class GetDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project from which to list datasets. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `dataset_metadata` - for existence of the case (e.g. - # `image_classification_dataset_metadata:*`). Some examples of - # using the filter are: - # - # * `translation_dataset_metadata:*` --> The dataset has - # `translation_dataset_metadata`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Server may return fewer results than requested. - # If unspecified, server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse#next_page_token ListDatasetsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets} call. - class ListDatasetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets AutoMl.ListDatasets}. - # @!attribute [rw] datasets - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Dataset>] - # The datasets read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest#page_token ListDatasetsRequest.page_token} to obtain that page. - class ListDatasetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset AutoMl.UpdateDataset} - # @!attribute [rw] dataset - # @return [::Google::Cloud::AutoML::V1beta1::Dataset] - # Required. The dataset which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. - class UpdateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset AutoMl.DeleteDataset}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset to delete. - class DeleteDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data AutoMl.ImportData}. - # @!attribute [rw] name - # @return [::String] - # Required. Dataset name. Dataset must already exist. All imported - # annotations and examples will be added. - # @!attribute [rw] input_config - # @return [::Google::Cloud::AutoML::V1beta1::InputConfig] - # Required. The desired input location and its domain specific semantics, - # if any. - class ImportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data AutoMl.ExportData}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the dataset. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::OutputConfig] - # Required. The desired output location. - class ExportDataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec AutoMl.GetAnnotationSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the annotation spec to retrieve. - class GetAnnotationSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec AutoMl.GetTableSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the table spec to retrieve. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - class GetTableSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the dataset to list table specs from. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - # @!attribute [rw] filter - # @return [::String] - # Filter expression, see go/filtering. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse#next_page_token ListTableSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs} call. - class ListTableSpecsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs AutoMl.ListTableSpecs}. - # @!attribute [rw] table_specs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TableSpec>] - # The table specs read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest#page_token ListTableSpecsRequest.page_token} to obtain that page. - class ListTableSpecsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec AutoMl.UpdateTableSpec} - # @!attribute [rw] table_spec - # @return [::Google::Cloud::AutoML::V1beta1::TableSpec] - # Required. The table spec which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. - class UpdateTableSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec AutoMl.GetColumnSpec}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the column spec to retrieve. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - class GetColumnSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs}. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the table spec to list column specs from. - # @!attribute [rw] field_mask - # @return [::Google::Protobuf::FieldMask] - # Mask specifying which fields to read. - # @!attribute [rw] filter - # @return [::String] - # Filter expression, see go/filtering. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server can return fewer results than requested. - # If unspecified, the server will pick a default size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained from the - # {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse#next_page_token ListColumnSpecsResponse.next_page_token} field of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs} call. - class ListColumnSpecsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs AutoMl.ListColumnSpecs}. - # @!attribute [rw] column_specs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # The column specs read. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest#page_token ListColumnSpecsRequest.page_token} to obtain that page. - class ListColumnSpecsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec AutoMl.UpdateColumnSpec} - # @!attribute [rw] column_spec - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # Required. The column spec which replaces the resource on the server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. - class UpdateColumnSpecRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model AutoMl.CreateModel}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent project where the model is being created. - # @!attribute [rw] model - # @return [::Google::Cloud::AutoML::V1beta1::Model] - # Required. The model to create. - class CreateModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model AutoMl.GetModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model. - class GetModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project, from which to list the models. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `model_metadata` - for existence of the case (e.g. - # `video_classification_model_metadata:*`). - # * `dataset_id` - for = or !=. Some examples of using the filter are: - # - # * `image_classification_model_metadata:*` --> The model has - # `image_classification_model_metadata`. - # * `dataset_id=5` --> The model was created from a dataset with ID 5. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels} call. - class ListModelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models AutoMl.ListModels}. - # @!attribute [rw] model - # @return [::Array<::Google::Cloud::AutoML::V1beta1::Model>] - # List of models in the requested page. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to {::Google::Cloud::AutoML::V1beta1::ListModelsRequest#page_token ListModelsRequest.page_token} to obtain that page. - class ListModelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model AutoMl.DeleteModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model being deleted. - class DeleteModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model AutoMl.DeployModel}. - # @!attribute [rw] image_object_detection_model_deployment_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata] - # Model deployment metadata specific to Image Object Detection. - # - # Note: The following fields are mutually exclusive: `image_object_detection_model_deployment_metadata`, `image_classification_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] image_classification_model_deployment_metadata - # @return [::Google::Cloud::AutoML::V1beta1::ImageClassificationModelDeploymentMetadata] - # Model deployment metadata specific to Image Classification. - # - # Note: The following fields are mutually exclusive: `image_classification_model_deployment_metadata`, `image_object_detection_model_deployment_metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model to deploy. - class DeployModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model AutoMl.UndeployModel}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the model to undeploy. - class UndeployModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model AutoMl.ExportModel}. - # Models need to be enabled for exporting, otherwise an error code will be - # returned. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the model to export. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig] - # Required. The desired output location and configuration. - class ExportModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples AutoMl.ExportEvaluatedExamples}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the model whose evaluated examples are to - # be exported. - # @!attribute [rw] output_config - # @return [::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig] - # Required. The desired output location and configuration. - class ExportEvaluatedExamplesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation AutoMl.GetModelEvaluation}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the model evaluation. - class GetModelEvaluationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the model to list the model evaluations for. - # If modelId is set as "-", this will list model evaluations from across all - # models of the parent location. - # @!attribute [rw] filter - # @return [::String] - # An expression for filtering the results of the request. - # - # * `annotation_spec_id` - for =, != or existence. See example below for - # the last. - # - # Some examples of using the filter are: - # - # * `annotation_spec_id!=4` --> The model evaluation was done for - # annotation spec with ID different than 4. - # * `NOT annotation_spec_id:*` --> The model evaluation was done for - # aggregate of all annotation specs. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results for the server to return. - # Typically obtained via - # {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} call. - class ListModelEvaluationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations}. - # @!attribute [rw] model_evaluation - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ModelEvaluation>] - # List of model evaluations in the requested page. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve next page of results. - # Pass to the {::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest#page_token ListModelEvaluationsRequest.page_token} field of a new - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations AutoMl.ListModelEvaluations} request to obtain that page. - class ListModelEvaluationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb deleted file mode 100644 index adc8f6e775c4..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/table_spec.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A specification of a relational table. - # The table's schema is represented via its child column specs. It is - # pre-populated as part of ImportData by schema inference algorithm, the - # version of which is a required parameter of ImportData InputConfig. - # Note: While working with a table, at times the schema may be - # inconsistent with the data in the table (e.g. string in a FLOAT64 column). - # The consistency validation is done upon creation of a model. - # Used by: - # * Tables - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the table spec. - # Form: - # - # `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}` - # @!attribute [rw] time_column_spec_id - # @return [::String] - # column_spec_id of the time column. Only used if the parent dataset's - # ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE - # and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and - # those in between to VALIDATE. - # Required type: TIMESTAMP. - # If both this column and ml_use_column are not set, then ML use of all rows - # will be assigned by AutoML. NOTE: Updates of this field will instantly - # affect any other users concurrently working with the dataset. - # @!attribute [rw] row_count - # @return [::Integer] - # Output only. The number of rows (i.e. examples) in the table. - # @!attribute [rw] valid_row_count - # @return [::Integer] - # Output only. The number of valid rows (i.e. without values that don't match - # DataType-s of their columns). - # @!attribute [rw] column_count - # @return [::Integer] - # Output only. The number of columns of the table. That is, the number of - # child ColumnSpec-s. - # @!attribute [rw] input_configs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::InputConfig>] - # Output only. Input configs via which data currently residing in the table - # had been imported. - # @!attribute [rw] etag - # @return [::String] - # Used to perform consistent read-modify-write updates. If not set, a blind - # "overwrite" update happens. - class TableSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb deleted file mode 100644 index cb70cab357c4..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/tables.rb +++ /dev/null @@ -1,304 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Metadata for a dataset used for AutoML Tables. - # @!attribute [rw] primary_table_spec_id - # @return [::String] - # Output only. The table_spec_id of the primary table of this dataset. - # @!attribute [rw] target_column_spec_id - # @return [::String] - # column_spec_id of the primary table's column that should be used as the - # training & prediction target. - # This column must be non-nullable and have one of following data types - # (otherwise model creation will error): - # - # * CATEGORY - # - # * FLOAT64 - # - # If the type is CATEGORY , only up to - # 100 unique values may exist in that column across all rows. - # - # NOTE: Updates of this field will instantly affect any other users - # concurrently working with the dataset. - # @!attribute [rw] weight_column_spec_id - # @return [::String] - # column_spec_id of the primary table's column that should be used as the - # weight column, i.e. the higher the value the more important the row will be - # during model training. - # Required type: FLOAT64. - # Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is - # ignored for training. - # If not set all rows are assumed to have equal weight of 1. - # NOTE: Updates of this field will instantly affect any other users - # concurrently working with the dataset. - # @!attribute [rw] ml_use_column_spec_id - # @return [::String] - # column_spec_id of the primary table column which specifies a possible ML - # use of the row, i.e. the column will be used to split the rows into TRAIN, - # VALIDATE and TEST sets. - # Required type: STRING. - # This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST` - # among its values, or only have `TEST`, `UNASSIGNED` values. In the latter - # case the rows with `UNASSIGNED` value will be assigned by AutoML. Note - # that if a given ml use distribution makes it impossible to create a "good" - # model, that call will error describing the issue. - # If both this column_spec_id and primary table's time_column_spec_id are not - # set, then all rows are treated as `UNASSIGNED`. - # NOTE: Updates of this field will instantly affect any other users - # concurrently working with the dataset. - # @!attribute [rw] target_column_correlations - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AutoML::V1beta1::CorrelationStats}] - # Output only. Correlations between - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#target_column_spec_id TablesDatasetMetadata.target_column_spec_id}, - # and other columns of the - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#primary_table_spec_id TablesDatasetMetadataprimary_table}. - # Only set if the target column is set. Mapping from other column spec id to - # its CorrelationStats with the target column. - # This field may be stale, see the stats_update_time field for - # for the timestamp at which these stats were last updated. - # @!attribute [rw] stats_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The most recent timestamp when target_column_correlations - # field and all descendant ColumnSpec.data_stats and - # ColumnSpec.top_correlated_columns fields were last (re-)generated. Any - # changes that happened to the dataset afterwards are not reflected in these - # fields values. The regeneration happens in the background on a best effort - # basis. - class TablesDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::AutoML::V1beta1::CorrelationStats] - class TargetColumnCorrelationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Model metadata specific to AutoML Tables. - # @!attribute [rw] optimization_objective_recall_value - # @return [::Float] - # Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL". - # Must be between 0 and 1, inclusive. - # - # Note: The following fields are mutually exclusive: `optimization_objective_recall_value`, `optimization_objective_precision_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] optimization_objective_precision_value - # @return [::Float] - # Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION". - # Must be between 0 and 1, inclusive. - # - # Note: The following fields are mutually exclusive: `optimization_objective_precision_value`, `optimization_objective_recall_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] target_column_spec - # @return [::Google::Cloud::AutoML::V1beta1::ColumnSpec] - # Column spec of the dataset's primary table's column the model is - # predicting. Snapshotted when model creation started. - # Only 3 fields are used: - # name - May be set on CreateModel, if it's not then the ColumnSpec - # corresponding to the current target_column_spec_id of the dataset - # the model is trained from is used. - # If neither is set, CreateModel will error. - # display_name - Output only. - # data_type - Output only. - # @!attribute [rw] input_feature_column_specs - # @return [::Array<::Google::Cloud::AutoML::V1beta1::ColumnSpec>] - # Column specs of the dataset's primary table's columns, on which - # the model is trained and which are used as the input for predictions. - # The - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column} - # as well as, according to dataset's state upon model creation, - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#weight_column_spec_id weight_column}, - # and - # - # {::Google::Cloud::AutoML::V1beta1::TablesDatasetMetadata#ml_use_column_spec_id ml_use_column} - # must never be included here. - # - # Only 3 fields are used: - # - # * name - May be set on CreateModel, if set only the columns specified are - # used, otherwise all primary table's columns (except the ones listed - # above) are used for the training and prediction input. - # - # * display_name - Output only. - # - # * data_type - Output only. - # @!attribute [rw] optimization_objective - # @return [::String] - # Objective function the model is optimizing towards. The training process - # creates a model that maximizes/minimizes the value of the objective - # function over the validation set. - # - # The supported optimization objectives depend on the prediction type. - # If the field is not set, a default objective function is used. - # - # CLASSIFICATION_BINARY: - # "MAXIMIZE_AU_ROC" (default) - Maximize the area under the receiver - # operating characteristic (ROC) curve. - # "MINIMIZE_LOG_LOSS" - Minimize log loss. - # "MAXIMIZE_AU_PRC" - Maximize the area under the precision-recall curve. - # "MAXIMIZE_PRECISION_AT_RECALL" - Maximize precision for a specified - # recall value. - # "MAXIMIZE_RECALL_AT_PRECISION" - Maximize recall for a specified - # precision value. - # - # CLASSIFICATION_MULTI_CLASS : - # "MINIMIZE_LOG_LOSS" (default) - Minimize log loss. - # - # - # REGRESSION: - # "MINIMIZE_RMSE" (default) - Minimize root-mean-squared error (RMSE). - # "MINIMIZE_MAE" - Minimize mean-absolute error (MAE). - # "MINIMIZE_RMSLE" - Minimize root-mean-squared log error (RMSLE). - # @!attribute [rw] tables_model_column_info - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>] - # Output only. Auxiliary information for each of the - # input_feature_column_specs with respect to this particular model. - # @!attribute [rw] train_budget_milli_node_hours - # @return [::Integer] - # Required. The train budget of creating this model, expressed in milli node - # hours i.e. 1,000 value in this field means 1 node hour. - # - # The training cost of the model will not exceed this budget. The final cost - # will be attempted to be close to the budget, though may end up being (even) - # noticeably smaller - at the backend's discretion. This especially may - # happen when further model training ceases to provide any improvements. - # - # If the budget is set to a value known to be insufficient to train a - # model for the given dataset, the training won't be attempted and - # will error. - # - # The train budget must be between 1,000 and 72,000 milli node hours, - # inclusive. - # @!attribute [rw] train_cost_milli_node_hours - # @return [::Integer] - # Output only. The actual training cost of the model, expressed in milli - # node hours, i.e. 1,000 value in this field means 1 node hour. Guaranteed - # to not exceed the train budget. - # @!attribute [rw] disable_early_stopping - # @return [::Boolean] - # Use the entire training budget. This disables the early stopping feature. - # By default, the early stopping feature is enabled, which means that AutoML - # Tables might stop training before the entire training budget has been used. - class TablesModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains annotation details specific to Tables. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher - # value means greater confidence in the returned value. - # For - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec} - # of FLOAT64 data type the score is not populated. - # @!attribute [rw] prediction_interval - # @return [::Google::Cloud::AutoML::V1beta1::DoubleRange] - # Output only. Only populated when - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column_spec} - # has FLOAT64 data type. An interval in which the exactly correct target - # value has 95% chance to be in. - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - # The predicted value of the row's - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#target_column_spec target_column}. - # The value depends on the column's DataType: - # - # * CATEGORY - the predicted (with the above confidence `score`) CATEGORY - # value. - # - # * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value. - # @!attribute [rw] tables_model_column_info - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo>] - # Output only. Auxiliary information for each of the model's - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelMetadata#input_feature_column_specs input_feature_column_specs} - # with respect to this particular prediction. - # If no other fields than - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_spec_name column_spec_name} - # and - # - # {::Google::Cloud::AutoML::V1beta1::TablesModelColumnInfo#column_display_name column_display_name} - # would be populated, then this whole field is not. - # @!attribute [rw] baseline_score - # @return [::Float] - # Output only. Stores the prediction score for the baseline example, which - # is defined as the example with all values set to their baseline values. - # This is used as part of the Sampled Shapley explanation of the model's - # prediction. This field is populated only when feature importance is - # requested. For regression models, this holds the baseline prediction for - # the baseline example. For classification models, this holds the baseline - # prediction for the baseline example for the argmax class. - class TablesAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An information specific to given column and Tables Model, in context - # of the Model and the predictions created by it. - # @!attribute [rw] column_spec_name - # @return [::String] - # Output only. The name of the ColumnSpec describing the column. Not - # populated when this proto is outputted to BigQuery. - # @!attribute [rw] column_display_name - # @return [::String] - # Output only. The display name of the column (same as the display_name of - # its ColumnSpec). - # @!attribute [rw] feature_importance - # @return [::Float] - # Output only. When given as part of a Model (always populated): - # Measurement of how much model predictions correctness on the TEST data - # depend on values in this column. A value between 0 and 1, higher means - # higher influence. These values are normalized - for all input feature - # columns of a given model they add to 1. - # - # When given back by Predict (populated iff - # [feature_importance - # param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch - # Predict (populated iff - # {::Google::Cloud::AutoML::V1beta1::PredictRequest#params feature_importance} - # param is set): - # Measurement of how impactful for the prediction returned for the given row - # the value in this column was. Specifically, the feature importance - # specifies the marginal contribution that the feature made to the prediction - # score compared to the baseline score. These values are computed using the - # Sampled Shapley method. - class TablesModelColumnInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb deleted file mode 100644 index 0214a830f15a..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/temporal.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A time period inside of an example that has a time dimension (e.g. video). - # @!attribute [rw] start_time_offset - # @return [::Google::Protobuf::Duration] - # Start of the time segment (inclusive), represented as the duration since - # the example start. - # @!attribute [rw] end_time_offset - # @return [::Google::Protobuf::Duration] - # End of the time segment (exclusive), represented as the duration since the - # example start. - class TimeSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb deleted file mode 100644 index 1c3b18d079ef..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Dataset metadata for classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] - # Required. Type of the classification problem. - class TextClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text classification. - # @!attribute [rw] classification_type - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationType] - # Output only. Classification type of the dataset used to train this model. - class TextClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata that is specific to text extraction - class TextExtractionDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text extraction. - # @!attribute [rw] model_hint - # @return [::String] - # Indicates the scope of model use case. - # - # * `default`: Use to train a general text extraction model. Default value. - # - # * `health_care`: Use to train a text extraction model that is tuned for - # healthcare applications. - class TextExtractionModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata for text sentiment. - # @!attribute [rw] sentiment_max - # @return [::Integer] - # Required. A sentiment is expressed as an integer ordinal, where higher value - # means a more positive sentiment. The range of sentiments that will be used - # is between 0 and sentiment_max (inclusive on both ends), and all the values - # in the range must be represented in the dataset before a model can be - # created. - # sentiment_max value must be between 1 and 10 (inclusive). - class TextSentimentDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to text sentiment. - class TextSentimentModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb deleted file mode 100644 index ca5b21931f3b..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_extraction.rb +++ /dev/null @@ -1,73 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Annotation for identifying spans of text. - # @!attribute [rw] text_segment - # @return [::Google::Cloud::AutoML::V1beta1::TextSegment] - # An entity annotation will set this, which is the part of the original - # text to which the annotation pertains. - # @!attribute [rw] score - # @return [::Float] - # Output only. A confidence estimate between 0.0 and 1.0. A higher value - # means greater confidence in correctness of the annotation. - class TextExtractionAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for text extraction problems. - # @!attribute [rw] au_prc - # @return [::Float] - # Output only. The Area under precision recall curve metric. - # @!attribute [rw] confidence_metrics_entries - # @return [::Array<::Google::Cloud::AutoML::V1beta1::TextExtractionEvaluationMetrics::ConfidenceMetricsEntry>] - # Output only. Metrics that have confidence thresholds. - # Precision-recall curve can be derived from it. - class TextExtractionEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metrics for a single confidence threshold. - # @!attribute [rw] confidence_threshold - # @return [::Float] - # Output only. The confidence threshold value used to compute the metrics. - # Only annotations with score of at least this threshold are considered to - # be ones the model would return. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall under the given confidence threshold. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision under the given confidence threshold. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - class ConfidenceMetricsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb deleted file mode 100644 index 0ab880d1d0de..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_segment.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. - # @!attribute [rw] content - # @return [::String] - # Output only. The content of the TextSegment. - # @!attribute [rw] start_offset - # @return [::Integer] - # Required. Zero-based character index of the first character of the text - # segment (counting characters from the beginning of the text). - # @!attribute [rw] end_offset - # @return [::Integer] - # Required. Zero-based character index of the first character past the end of - # the text segment (counting character from the beginning of the text). - # The character at the end_offset is NOT included in the text segment. - class TextSegment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb deleted file mode 100644 index 9b48bef95e98..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/text_sentiment.rb +++ /dev/null @@ -1,87 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Contains annotation details specific to text sentiment. - # @!attribute [rw] sentiment - # @return [::Integer] - # Output only. The sentiment with the semantic, as given to the - # {::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data AutoMl.ImportData} when populating the dataset from which the model used - # for the prediction had been trained. - # The sentiment values are between 0 and - # Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), - # with higher value meaning more positive sentiment. They are completely - # relative, i.e. 0 means least positive sentiment and sentiment_max means - # the most positive from the sentiments present in the train data. Therefore - # e.g. if train data had only negative sentiment, then sentiment_max, would - # be still negative (although least negative). - # The sentiment shouldn't be confused with "score" or "magnitude" - # from the previous Natural Language Sentiment Analysis API. - class TextSentimentAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model evaluation metrics for text sentiment problems. - # @!attribute [rw] precision - # @return [::Float] - # Output only. Precision. - # @!attribute [rw] recall - # @return [::Float] - # Output only. Recall. - # @!attribute [rw] f1_score - # @return [::Float] - # Output only. The harmonic mean of recall and precision. - # @!attribute [rw] mean_absolute_error - # @return [::Float] - # Output only. Mean absolute error. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] mean_squared_error - # @return [::Float] - # Output only. Mean squared error. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] linear_kappa - # @return [::Float] - # Output only. Linear weighted kappa. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] quadratic_kappa - # @return [::Float] - # Output only. Quadratic weighted kappa. Only set for the overall model - # evaluation, not for evaluation of a single annotation spec. - # @!attribute [rw] confusion_matrix - # @return [::Google::Cloud::AutoML::V1beta1::ClassificationEvaluationMetrics::ConfusionMatrix] - # Output only. Confusion matrix of the evaluation. - # Only set for the overall model evaluation, not for evaluation of a single - # annotation spec. - # @!attribute [rw] annotation_spec_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Array<::String>] - # Output only. The annotation spec ids used for this evaluation. - # Deprecated . - class TextSentimentEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb deleted file mode 100644 index 4826f3a2fb6f..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/translation.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Dataset metadata that is specific to translation. - # @!attribute [rw] source_language_code - # @return [::String] - # Required. The BCP-47 language code of the source language. - # @!attribute [rw] target_language_code - # @return [::String] - # Required. The BCP-47 language code of the target language. - class TranslationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Evaluation metrics for the dataset. - # @!attribute [rw] bleu_score - # @return [::Float] - # Output only. BLEU score. - # @!attribute [rw] base_bleu_score - # @return [::Float] - # Output only. BLEU score for base model. - class TranslationEvaluationMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata that is specific to translation. - # @!attribute [rw] base_model - # @return [::String] - # The resource name of the model to use as a baseline to train the custom - # model. If unset, we use the default base model provided by Google - # Translate. Format: - # `projects/{project_id}/locations/{location_id}/models/{model_id}` - # @!attribute [rw] source_language_code - # @return [::String] - # Output only. Inferred from the dataset. - # The source languge (The BCP-47 language code) that is used for training. - # @!attribute [rw] target_language_code - # @return [::String] - # Output only. The target languge (The BCP-47 language code) that is used for - # training. - class TranslationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Annotation details specific to translation. - # @!attribute [rw] translated_content - # @return [::Google::Cloud::AutoML::V1beta1::TextSnippet] - # Output only . The translated content. - class TranslationAnnotation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb b/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb deleted file mode 100644 index 8c029ee5303b..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/cloud/automl/v1beta1/video.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module AutoML - module V1beta1 - # Dataset metadata specific to video classification. - # All Video Classification datasets are treated as multi label. - class VideoClassificationDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Dataset metadata specific to video object tracking. - class VideoObjectTrackingDatasetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to video classification. - class VideoClassificationModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model metadata specific to video object tracking. - class VideoObjectTrackingModelMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb b/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb b/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index e58202461f88..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,128 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must - # be between -315576000000 and 315576000000 inclusive (which corresponds to - # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. This field is - # the nanosecond portion of the duration, not an alternative to seconds. - # Negative second values with fractions must still have non-negative nanos - # values that count forward in time. Must be between 0 and 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb b/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/google-cloud-automl-v1beta1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/google-cloud-automl-v1beta1/snippets/Gemfile b/google-cloud-automl-v1beta1/snippets/Gemfile deleted file mode 100644 index 4af8ecce5fb8..000000000000 --- a/google-cloud-automl-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-automl-v1beta1", path: "../" -else - gem "google-cloud-automl-v1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb b/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb deleted file mode 100644 index 0a974be0868c..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/create_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_CreateDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the create_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset. -# -def create_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new - - # Call the create_dataset method. - result = client.create_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - p result -end -# [END automl_v1beta1_generated_AutoML_CreateDataset_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/create_model.rb b/google-cloud-automl-v1beta1/snippets/automl/create_model.rb deleted file mode 100644 index 22cb436527e3..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/create_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_CreateModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the create_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model. -# -def create_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::CreateModelRequest.new - - # Call the create_model method. - result = client.create_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_CreateModel_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb b/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb deleted file mode 100644 index 628da07c0d25..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/delete_dataset.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_DeleteDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the delete_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset. -# -def delete_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new - - # Call the delete_dataset method. - result = client.delete_dataset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_DeleteDataset_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb b/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb deleted file mode 100644 index 15ca9acb6cac..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/delete_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_DeleteModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the delete_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model. -# -def delete_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new - - # Call the delete_model method. - result = client.delete_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_DeleteModel_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb b/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb deleted file mode 100644 index 140df82eb01c..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/deploy_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_DeployModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the deploy_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model. -# -def deploy_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::DeployModelRequest.new - - # Call the deploy_model method. - result = client.deploy_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_DeployModel_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/export_data.rb b/google-cloud-automl-v1beta1/snippets/automl/export_data.rb deleted file mode 100644 index d2be3e5b1a63..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/export_data.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ExportData_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the export_data call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data. -# -def export_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ExportDataRequest.new - - # Call the export_data method. - result = client.export_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ExportData_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb b/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb deleted file mode 100644 index ba25ff7ba592..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/export_evaluated_examples.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the export_evaluated_examples call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples. -# -def export_evaluated_examples - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new - - # Call the export_evaluated_examples method. - result = client.export_evaluated_examples request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/export_model.rb b/google-cloud-automl-v1beta1/snippets/automl/export_model.rb deleted file mode 100644 index 7c6e81cc84b0..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/export_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ExportModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the export_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model. -# -def export_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ExportModelRequest.new - - # Call the export_model method. - result = client.export_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ExportModel_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb b/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb deleted file mode 100644 index 9a97355601b2..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/get_annotation_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_annotation_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec. -# -def get_annotation_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new - - # Call the get_annotation_spec method. - result = client.get_annotation_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::AnnotationSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb b/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb deleted file mode 100644 index 2a52e3c32551..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/get_column_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetColumnSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_column_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec. -# -def get_column_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new - - # Call the get_column_spec method. - result = client.get_column_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_GetColumnSpec_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb b/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb deleted file mode 100644 index 68d3e53aa211..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/get_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset. -# -def get_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new - - # Call the get_dataset method. - result = client.get_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - p result -end -# [END automl_v1beta1_generated_AutoML_GetDataset_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_model.rb b/google-cloud-automl-v1beta1/snippets/automl/get_model.rb deleted file mode 100644 index e50cdc32d622..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/get_model.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model. -# -def get_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetModelRequest.new - - # Call the get_model method. - result = client.get_model request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Model. - p result -end -# [END automl_v1beta1_generated_AutoML_GetModel_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb b/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb deleted file mode 100644 index ca4f8591f907..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/get_model_evaluation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetModelEvaluation_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_model_evaluation call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation. -# -def get_model_evaluation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new - - # Call the get_model_evaluation method. - result = client.get_model_evaluation request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::ModelEvaluation. - p result -end -# [END automl_v1beta1_generated_AutoML_GetModelEvaluation_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb b/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb deleted file mode 100644 index cfe8b2137d84..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/get_table_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_GetTableSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the get_table_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec. -# -def get_table_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new - - # Call the get_table_spec method. - result = client.get_table_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_GetTableSpec_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/import_data.rb b/google-cloud-automl-v1beta1/snippets/automl/import_data.rb deleted file mode 100644 index 1cb0abe33861..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/import_data.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ImportData_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the import_data call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data. -# -def import_data - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ImportDataRequest.new - - # Call the import_data method. - result = client.import_data request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_ImportData_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb b/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb deleted file mode 100644 index c74afd3280ca..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/list_column_specs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ListColumnSpecs_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_column_specs call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs. -# -def list_column_specs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new - - # Call the list_column_specs method. - result = client.list_column_specs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::ColumnSpec. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListColumnSpecs_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb b/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb deleted file mode 100644 index 87378a8792fc..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/list_datasets.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ListDatasets_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_datasets call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets. -# -def list_datasets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new - - # Call the list_datasets method. - result = client.list_datasets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::Dataset. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListDatasets_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb b/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb deleted file mode 100644 index 528ea60d5c5d..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/list_model_evaluations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ListModelEvaluations_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_model_evaluations call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations. -# -def list_model_evaluations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new - - # Call the list_model_evaluations method. - result = client.list_model_evaluations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::ModelEvaluation. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListModelEvaluations_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/list_models.rb b/google-cloud-automl-v1beta1/snippets/automl/list_models.rb deleted file mode 100644 index 82eec30e8372..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/list_models.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ListModels_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_models call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models. -# -def list_models - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListModelsRequest.new - - # Call the list_models method. - result = client.list_models request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::Model. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListModels_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb b/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb deleted file mode 100644 index b3ce41523371..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/list_table_specs.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_ListTableSpecs_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the list_table_specs call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs. -# -def list_table_specs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new - - # Call the list_table_specs method. - result = client.list_table_specs request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::AutoML::V1beta1::TableSpec. - p item - end -end -# [END automl_v1beta1_generated_AutoML_ListTableSpecs_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb b/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb deleted file mode 100644 index c4dd0d5ccf13..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/undeploy_model.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UndeployModel_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the undeploy_model call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model. -# -def undeploy_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new - - # Call the undeploy_model method. - result = client.undeploy_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_AutoML_UndeployModel_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb b/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb deleted file mode 100644 index e2f0d1af6b69..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/update_column_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the update_column_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec. -# -def update_column_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new - - # Call the update_column_spec method. - result = client.update_column_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::ColumnSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb b/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb deleted file mode 100644 index a8a8c79b852f..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/update_dataset.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UpdateDataset_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the update_dataset call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset. -# -def update_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new - - # Call the update_dataset method. - result = client.update_dataset request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::Dataset. - p result -end -# [END automl_v1beta1_generated_AutoML_UpdateDataset_sync] diff --git a/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb b/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb deleted file mode 100644 index 66268b4bfcd3..000000000000 --- a/google-cloud-automl-v1beta1/snippets/automl/update_table_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_AutoML_UpdateTableSpec_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the update_table_spec call in the AutoML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec. -# -def update_table_spec - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::AutoML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new - - # Call the update_table_spec method. - result = client.update_table_spec request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::TableSpec. - p result -end -# [END automl_v1beta1_generated_AutoML_UpdateTableSpec_sync] diff --git a/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb b/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb deleted file mode 100644 index 181699c503a9..000000000000 --- a/google-cloud-automl-v1beta1/snippets/prediction_service/batch_predict.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_PredictionService_BatchPredict_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the batch_predict call in the PredictionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict. -# -def batch_predict - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new - - # Call the batch_predict method. - result = client.batch_predict request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END automl_v1beta1_generated_PredictionService_BatchPredict_sync] diff --git a/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb b/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb deleted file mode 100644 index aaba4299f11f..000000000000 --- a/google-cloud-automl-v1beta1/snippets/prediction_service/predict.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START automl_v1beta1_generated_PredictionService_Predict_sync] -require "google/cloud/automl/v1beta1" - -## -# Snippet for the predict call in the PredictionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict. -# -def predict - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::AutoML::V1beta1::PredictionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::AutoML::V1beta1::PredictRequest.new - - # Call the predict method. - result = client.predict request - - # The returned object is of type Google::Cloud::AutoML::V1beta1::PredictResponse. - p result -end -# [END automl_v1beta1_generated_PredictionService_Predict_sync] diff --git a/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json b/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json deleted file mode 100644 index 2cacd0d7a691..000000000000 --- a/google-cloud-automl-v1beta1/snippets/snippet_metadata_google.cloud.automl.v1beta1.json +++ /dev/null @@ -1,1055 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-automl-v1beta1", - "version": "0.19.1", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.automl.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "automl_v1beta1_generated_PredictionService_Predict_sync", - "title": "Snippet for the predict call in the PredictionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict.", - "file": "prediction_service/predict.rb", - "language": "RUBY", - "client_method": { - "short_name": "predict", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client#predict", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::PredictRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::PredictResponse", - "client": { - "short_name": "PredictionService::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client" - }, - "method": { - "short_name": "Predict", - "full_name": "google.cloud.automl.v1beta1.PredictionService.Predict", - "service": { - "short_name": "PredictionService", - "full_name": "google.cloud.automl.v1beta1.PredictionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_PredictionService_BatchPredict_sync", - "title": "Snippet for the batch_predict call in the PredictionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict.", - "file": "prediction_service/batch_predict.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_predict", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client#batch_predict", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::BatchPredictRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "PredictionService::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::PredictionService::Client" - }, - "method": { - "short_name": "BatchPredict", - "full_name": "google.cloud.automl.v1beta1.PredictionService.BatchPredict", - "service": { - "short_name": "PredictionService", - "full_name": "google.cloud.automl.v1beta1.PredictionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_CreateDataset_sync", - "title": "Snippet for the create_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset.", - "file": "automl/create_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "CreateDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.CreateDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetDataset_sync", - "title": "Snippet for the get_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset.", - "file": "automl/get_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListDatasets_sync", - "title": "Snippet for the list_datasets call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets.", - "file": "automl/list_datasets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_datasets", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_datasets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListDatasets", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListDatasets", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UpdateDataset_sync", - "title": "Snippet for the update_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset.", - "file": "automl/update_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Dataset", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UpdateDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_DeleteDataset_sync", - "title": "Snippet for the delete_dataset call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset.", - "file": "automl/delete_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_dataset", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "DeleteDataset", - "full_name": "google.cloud.automl.v1beta1.AutoMl.DeleteDataset", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ImportData_sync", - "title": "Snippet for the import_data call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data.", - "file": "automl/import_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_data", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#import_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ImportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ImportData", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ImportData", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ExportData_sync", - "title": "Snippet for the export_data call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data.", - "file": "automl/export_data.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_data", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_data", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ExportDataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ExportData", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportData", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetAnnotationSpec_sync", - "title": "Snippet for the get_annotation_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec.", - "file": "automl/get_annotation_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_annotation_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_annotation_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::AnnotationSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetAnnotationSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetTableSpec_sync", - "title": "Snippet for the get_table_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec.", - "file": "automl/get_table_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_table_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_table_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::TableSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetTableSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetTableSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListTableSpecs_sync", - "title": "Snippet for the list_table_specs call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs.", - "file": "automl/list_table_specs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_table_specs", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_table_specs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListTableSpecs", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListTableSpecs", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UpdateTableSpec_sync", - "title": "Snippet for the update_table_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec.", - "file": "automl/update_table_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_table_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_table_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::TableSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UpdateTableSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetColumnSpec_sync", - "title": "Snippet for the get_column_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec.", - "file": "automl/get_column_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_column_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_column_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ColumnSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetColumnSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetColumnSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListColumnSpecs_sync", - "title": "Snippet for the list_column_specs call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs.", - "file": "automl/list_column_specs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_column_specs", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_column_specs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListColumnSpecs", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UpdateColumnSpec_sync", - "title": "Snippet for the update_column_spec call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec.", - "file": "automl/update_column_spec.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_column_spec", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#update_column_spec", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ColumnSpec", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UpdateColumnSpec", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_CreateModel_sync", - "title": "Snippet for the create_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model.", - "file": "automl/create_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#create_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::CreateModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "CreateModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.CreateModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetModel_sync", - "title": "Snippet for the get_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model.", - "file": "automl/get_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::Model", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListModels_sync", - "title": "Snippet for the list_models call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models.", - "file": "automl/list_models.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_models", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_models", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListModelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListModelsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListModels", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListModels", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_DeleteModel_sync", - "title": "Snippet for the delete_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model.", - "file": "automl/delete_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#delete_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::DeleteModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "DeleteModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.DeleteModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_DeployModel_sync", - "title": "Snippet for the deploy_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model.", - "file": "automl/deploy_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "deploy_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#deploy_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::DeployModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "DeployModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.DeployModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_UndeployModel_sync", - "title": "Snippet for the undeploy_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model.", - "file": "automl/undeploy_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "undeploy_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#undeploy_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::UndeployModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "UndeployModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.UndeployModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ExportModel_sync", - "title": "Snippet for the export_model call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model.", - "file": "automl/export_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_model", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ExportModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ExportModel", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportModel", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ExportEvaluatedExamples_sync", - "title": "Snippet for the export_evaluated_examples call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples.", - "file": "automl/export_evaluated_examples.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_evaluated_examples", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#export_evaluated_examples", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ExportEvaluatedExamples", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_GetModelEvaluation_sync", - "title": "Snippet for the get_model_evaluation call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation.", - "file": "automl/get_model_evaluation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model_evaluation", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#get_model_evaluation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ModelEvaluation", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "GetModelEvaluation", - "full_name": "google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "automl_v1beta1_generated_AutoML_ListModelEvaluations_sync", - "title": "Snippet for the list_model_evaluations call in the AutoML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations.", - "file": "automl/list_model_evaluations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_model_evaluations", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client#list_model_evaluations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse", - "client": { - "short_name": "AutoML::Client", - "full_name": "::Google::Cloud::AutoML::V1beta1::AutoML::Client" - }, - "method": { - "short_name": "ListModelEvaluations", - "full_name": "google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations", - "service": { - "short_name": "AutoMl", - "full_name": "google.cloud.automl.v1beta1.AutoMl" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb deleted file mode 100644 index 75d1640c3c69..000000000000 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/service_services_pb" -require "google/cloud/automl/v1beta1/automl" - -class ::Google::Cloud::AutoML::V1beta1::AutoML::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Operations::Configuration, config - end -end diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb deleted file mode 100644 index 267b97d1fab1..000000000000 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_paths_test.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/automl" - -class ::Google::Cloud::AutoML::V1beta1::AutoML::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_annotation_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.annotation_spec_path project: "value0", location: "value1", dataset: "value2", annotation_spec: "value3" - assert_equal "projects/value0/locations/value1/datasets/value2/annotationSpecs/value3", path - end - end - - def test_column_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.column_spec_path project: "value0", location: "value1", dataset: "value2", table_spec: "value3", column_spec: "value4" - assert_equal "projects/value0/locations/value1/datasets/value2/tableSpecs/value3/columnSpecs/value4", path - end - end - - def test_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", location: "value1", dataset: "value2" - assert_equal "projects/value0/locations/value1/datasets/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end - - def test_model_evaluation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_evaluation_path project: "value0", location: "value1", model: "value2", model_evaluation: "value3" - assert_equal "projects/value0/locations/value1/models/value2/modelEvaluations/value3", path - end - end - - def test_table_spec_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_spec_path project: "value0", location: "value1", dataset: "value2", table_spec: "value3" - assert_equal "projects/value0/locations/value1/datasets/value2/tableSpecs/value3", path - end - end -end diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb deleted file mode 100644 index 76cbacb1181f..000000000000 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_rest_test.rb +++ /dev/null @@ -1,1424 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/automl/rest" - - -class ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset = {} - - create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_dataset({ parent: parent, dataset: dataset }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_dataset parent: parent, dataset: dataset do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_dataset ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_dataset({ parent: parent, dataset: dataset }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_dataset(::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_dataset_client_stub.call_count - end - end - end - - def test_get_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_dataset ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_dataset(::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dataset_client_stub.call_count - end - end - end - - def test_list_datasets - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_datasets parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_datasets ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_datasets(::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_datasets_client_stub.call_count - end - end - end - - def test_update_dataset - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - dataset = {} - update_mask = {} - - update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_dataset({ dataset: dataset, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_dataset dataset: dataset, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_dataset ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_dataset({ dataset: dataset, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_dataset(::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_dataset_client_stub.call_count - end - end - end - - def test_delete_dataset - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_dataset ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_dataset(::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_dataset_client_stub.call_count - end - end - end - - def test_import_data - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - - import_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_import_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.import_data({ name: name, input_config: input_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.import_data name: name, input_config: input_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.import_data ::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.import_data({ name: name, input_config: input_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.import_data(::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_data_client_stub.call_count - end - end - end - - def test_export_data - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_data_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_data_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.export_data({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.export_data name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.export_data ::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.export_data({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.export_data(::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_count - end - end - end - - def test_get_annotation_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_annotation_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_annotation_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_annotation_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_annotation_spec({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_annotation_spec name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_annotation_spec ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_annotation_spec({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_annotation_spec(::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_annotation_spec_client_stub.call_count - end - end - end - - def test_get_table_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - field_mask = {} - - get_table_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_table_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_table_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_table_spec({ name: name, field_mask: field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_table_spec name: name, field_mask: field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_table_spec ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_table_spec({ name: name, field_mask: field_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_table_spec(::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_table_spec_client_stub.call_count - end - end - end - - def test_list_table_specs - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_table_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_table_specs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_table_specs_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_table_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_table_specs ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_table_specs(::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_table_specs_client_stub.call_count - end - end - end - - def test_update_table_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - table_spec = {} - update_mask = {} - - update_table_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_table_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_table_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_table_spec({ table_spec: table_spec, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_table_spec table_spec: table_spec, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_table_spec ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_table_spec({ table_spec: table_spec, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_table_spec(::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_table_spec_client_stub.call_count - end - end - end - - def test_get_column_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - field_mask = {} - - get_column_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_column_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_column_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_column_spec({ name: name, field_mask: field_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_column_spec name: name, field_mask: field_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_column_spec ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_column_spec({ name: name, field_mask: field_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_column_spec(::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_column_spec_client_stub.call_count - end - end - end - - def test_list_column_specs - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_column_specs_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_column_specs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_column_specs_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_column_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_column_specs ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_column_specs(::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_column_specs_client_stub.call_count - end - end - end - - def test_update_column_spec - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - column_spec = {} - update_mask = {} - - update_column_spec_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_update_column_spec_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_column_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_column_spec({ column_spec: column_spec, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_column_spec column_spec: column_spec, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_column_spec ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_column_spec({ column_spec: column_spec, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_column_spec(::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_column_spec_client_stub.call_count - end - end - end - - def test_create_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - model = {} - - create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_model({ parent: parent, model: model }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_model parent: parent, model: model do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_model ::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_model({ parent: parent, model: model }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_model(::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_model_client_stub.call_count - end - end - end - - def test_get_model - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::Model.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_model ::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_model(::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_client_stub.call_count - end - end - end - - def test_list_models - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_models_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_models parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_models ::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_models(::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_models_client_stub.call_count - end - end - end - - def test_delete_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_model ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_model(::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_model_client_stub.call_count - end - end - end - - def test_deploy_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - image_object_detection_model_deployment_metadata = {} - name = "hello world" - - deploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_deploy_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, deploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.deploy_model ::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.deploy_model(::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, deploy_model_client_stub.call_count - end - end - end - - def test_undeploy_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undeploy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_undeploy_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, undeploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.undeploy_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.undeploy_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.undeploy_model ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.undeploy_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.undeploy_model(::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, undeploy_model_client_stub.call_count - end - end - end - - def test_export_model - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.export_model({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.export_model name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.export_model ::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.export_model({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.export_model(::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_model_client_stub.call_count - end - end - end - - def test_export_evaluated_examples - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_evaluated_examples_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_export_evaluated_examples_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_evaluated_examples_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.export_evaluated_examples({ name: name, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.export_evaluated_examples name: name, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.export_evaluated_examples ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.export_evaluated_examples({ name: name, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.export_evaluated_examples(::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_evaluated_examples_client_stub.call_count - end - end - end - - def test_get_model_evaluation - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_evaluation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_get_model_evaluation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_evaluation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_model_evaluation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_model_evaluation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_model_evaluation ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_model_evaluation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_model_evaluation(::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_evaluation_client_stub.call_count - end - end - end - - def test_list_model_evaluations - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_model_evaluations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::ServiceStub.stub :transcode_list_model_evaluations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_model_evaluations_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_model_evaluations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_model_evaluations ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_model_evaluations(::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_model_evaluations_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Rest::Client::Configuration, config - end -end diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb deleted file mode 100644 index e43526b6361c..000000000000 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/automl_test.rb +++ /dev/null @@ -1,1639 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/service_pb" -require "google/cloud/automl/v1beta1/automl" - -class ::Google::Cloud::AutoML::V1beta1::AutoML::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_create_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset = {} - - create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Dataset), request["dataset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_dataset({ parent: parent, dataset: dataset }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_dataset parent: parent, dataset: dataset do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_dataset ::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_dataset({ parent: parent, dataset: dataset }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_dataset(::Google::Cloud::AutoML::V1beta1::CreateDatasetRequest.new(parent: parent, dataset: dataset), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_dataset_client_stub.call_rpc_count - end - end - - def test_get_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_dataset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_dataset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_dataset ::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_dataset({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_dataset(::Google::Cloud::AutoML::V1beta1::GetDatasetRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_dataset_client_stub.call_rpc_count - end - end - - def test_list_datasets - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListDatasetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_datasets, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_datasets_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_datasets parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_datasets ::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_datasets({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_datasets(::Google::Cloud::AutoML::V1beta1::ListDatasetsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_datasets_client_stub.call_rpc_count - end - end - - def test_update_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - dataset = {} - update_mask = {} - - update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Dataset), request["dataset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_dataset({ dataset: dataset, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_dataset dataset: dataset, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_dataset ::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_dataset({ dataset: dataset, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_dataset(::Google::Cloud::AutoML::V1beta1::UpdateDatasetRequest.new(dataset: dataset, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_dataset_client_stub.call_rpc_count - end - end - - def test_delete_dataset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_dataset, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_dataset_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_dataset({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_dataset name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_dataset ::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_dataset({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_dataset(::Google::Cloud::AutoML::V1beta1::DeleteDatasetRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_dataset_client_stub.call_rpc_count - end - end - - def test_import_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - - import_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_data, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ImportDataRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::InputConfig), request["input_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.import_data({ name: name, input_config: input_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.import_data name: name, input_config: input_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.import_data ::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.import_data({ name: name, input_config: input_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.import_data(::Google::Cloud::AutoML::V1beta1::ImportDataRequest.new(name: name, input_config: input_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_data_client_stub.call_rpc_count - end - end - - def test_export_data - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_data_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_data, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportDataRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::OutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_data_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.export_data({ name: name, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.export_data name: name, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.export_data ::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.export_data({ name: name, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.export_data(::Google::Cloud::AutoML::V1beta1::ExportDataRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_data_client_stub.call_rpc_count - end - end - - def test_get_annotation_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::AnnotationSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_annotation_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_annotation_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_annotation_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_annotation_spec({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_annotation_spec name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_annotation_spec ::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_annotation_spec({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_annotation_spec(::Google::Cloud::AutoML::V1beta1::GetAnnotationSpecRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_annotation_spec_client_stub.call_rpc_count - end - end - - def test_get_table_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - field_mask = {} - - get_table_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_table_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_table_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_table_spec({ name: name, field_mask: field_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_table_spec name: name, field_mask: field_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_table_spec ::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_table_spec({ name: name, field_mask: field_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_table_spec(::Google::Cloud::AutoML::V1beta1::GetTableSpecRequest.new(name: name, field_mask: field_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_table_spec_client_stub.call_rpc_count - end - end - - def test_list_table_specs - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListTableSpecsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_table_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_table_specs, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_table_specs_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_table_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_table_specs ::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_table_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_table_specs(::Google::Cloud::AutoML::V1beta1::ListTableSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_table_specs_client_stub.call_rpc_count - end - end - - def test_update_table_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::TableSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - table_spec = {} - update_mask = {} - - update_table_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_table_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::TableSpec), request["table_spec"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_table_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_table_spec({ table_spec: table_spec, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_table_spec table_spec: table_spec, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_table_spec ::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_table_spec({ table_spec: table_spec, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_table_spec(::Google::Cloud::AutoML::V1beta1::UpdateTableSpecRequest.new(table_spec: table_spec, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_table_spec_client_stub.call_rpc_count - end - end - - def test_get_column_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - field_mask = {} - - get_column_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_column_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_column_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_column_spec({ name: name, field_mask: field_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_column_spec name: name, field_mask: field_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_column_spec ::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_column_spec({ name: name, field_mask: field_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_column_spec(::Google::Cloud::AutoML::V1beta1::GetColumnSpecRequest.new(name: name, field_mask: field_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_column_spec_client_stub.call_rpc_count - end - end - - def test_list_column_specs - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - field_mask = {} - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_column_specs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_column_specs, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["field_mask"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_column_specs_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_column_specs parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_column_specs ::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_column_specs({ parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_column_specs(::Google::Cloud::AutoML::V1beta1::ListColumnSpecsRequest.new(parent: parent, field_mask: field_mask, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_column_specs_client_stub.call_rpc_count - end - end - - def test_update_column_spec - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ColumnSpec.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - column_spec = {} - update_mask = {} - - update_column_spec_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_column_spec, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ColumnSpec), request["column_spec"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_column_spec_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_column_spec({ column_spec: column_spec, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_column_spec column_spec: column_spec, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_column_spec ::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_column_spec({ column_spec: column_spec, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_column_spec(::Google::Cloud::AutoML::V1beta1::UpdateColumnSpecRequest.new(column_spec: column_spec, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_column_spec_client_stub.call_rpc_count - end - end - - def test_create_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - model = {} - - create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::CreateModelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::Model), request["model"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_model({ parent: parent, model: model }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_model parent: parent, model: model do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_model ::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_model({ parent: parent, model: model }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_model(::Google::Cloud::AutoML::V1beta1::CreateModelRequest.new(parent: parent, model: model), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_model_client_stub.call_rpc_count - end - end - - def test_get_model - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::Model.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_model({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_model name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_model ::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_model({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_model(::Google::Cloud::AutoML::V1beta1::GetModelRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_model_client_stub.call_rpc_count - end - end - - def test_list_models - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListModelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_models, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListModelsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_models_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_models parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_models ::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_models({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_models(::Google::Cloud::AutoML::V1beta1::ListModelsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_models_client_stub.call_rpc_count - end - end - - def test_delete_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_model({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_model name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_model ::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_model({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_model(::Google::Cloud::AutoML::V1beta1::DeleteModelRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_model_client_stub.call_rpc_count - end - end - - def test_deploy_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - image_object_detection_model_deployment_metadata = {} - name = "hello world" - - deploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :deploy_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::DeployModelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ImageObjectDetectionModelDeploymentMetadata), request["image_object_detection_model_deployment_metadata"] - assert_equal :image_object_detection_model_deployment_metadata, request.model_deployment_metadata - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, deploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.deploy_model image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.deploy_model ::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.deploy_model({ image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.deploy_model(::Google::Cloud::AutoML::V1beta1::DeployModelRequest.new(image_object_detection_model_deployment_metadata: image_object_detection_model_deployment_metadata, name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, deploy_model_client_stub.call_rpc_count - end - end - - def test_undeploy_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - undeploy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :undeploy_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, undeploy_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.undeploy_model({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.undeploy_model name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.undeploy_model ::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.undeploy_model({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.undeploy_model(::Google::Cloud::AutoML::V1beta1::UndeployModelRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, undeploy_model_client_stub.call_rpc_count - end - end - - def test_export_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_model, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportModelRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ModelExportOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_model_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.export_model({ name: name, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.export_model name: name, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.export_model ::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.export_model({ name: name, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.export_model(::Google::Cloud::AutoML::V1beta1::ExportModelRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_model_client_stub.call_rpc_count - end - end - - def test_export_evaluated_examples - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - output_config = {} - - export_evaluated_examples_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_evaluated_examples, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesOutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_evaluated_examples_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.export_evaluated_examples({ name: name, output_config: output_config }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.export_evaluated_examples name: name, output_config: output_config do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.export_evaluated_examples ::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.export_evaluated_examples({ name: name, output_config: output_config }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.export_evaluated_examples(::Google::Cloud::AutoML::V1beta1::ExportEvaluatedExamplesRequest.new(name: name, output_config: output_config), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_evaluated_examples_client_stub.call_rpc_count - end - end - - def test_get_model_evaluation - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ModelEvaluation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_evaluation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model_evaluation, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_evaluation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_model_evaluation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_model_evaluation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_model_evaluation ::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_model_evaluation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_model_evaluation(::Google::Cloud::AutoML::V1beta1::GetModelEvaluationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_model_evaluation_client_stub.call_rpc_count - end - end - - def test_list_model_evaluations - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_model_evaluations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_model_evaluations, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_model_evaluations_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_model_evaluations parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_model_evaluations ::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_model_evaluations({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_model_evaluations(::Google::Cloud::AutoML::V1beta1::ListModelEvaluationsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_model_evaluations_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::AutoML::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AutoML::V1beta1::AutoML::Operations, client.operations_client - end -end diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb deleted file mode 100644 index 63bf5ca8cd95..000000000000 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_operations_test.rb +++ /dev/null @@ -1,400 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service_services_pb" -require "google/cloud/automl/v1beta1/prediction_service" - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations::Configuration, config - end -end diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb deleted file mode 100644 index f82674af6532..000000000000 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/prediction_service" - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project: "value0", location: "value1", model: "value2" - assert_equal "projects/value0/locations/value1/models/value2", path - end - end -end diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb deleted file mode 100644 index 40557dac392a..000000000000 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_rest_test.rb +++ /dev/null @@ -1,212 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service/rest" - - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_predict - # Create test objects. - client_result = ::Google::Cloud::AutoML::V1beta1::PredictResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - params = {} - - predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.stub :transcode_predict_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.predict({ name: name, payload: payload, params: params }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.predict name: name, payload: payload, params: params do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.predict ::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.predict({ name: name, payload: payload, params: params }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.predict(::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, predict_client_stub.call_count - end - end - end - - def test_batch_predict - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - output_config = {} - params = {} - - batch_predict_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::ServiceStub.stub :transcode_batch_predict_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.batch_predict ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.batch_predict(::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_predict_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Rest::Client::Configuration, config - end -end diff --git a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb b/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb deleted file mode 100644 index 9c66c7b2e013..000000000000 --- a/google-cloud-automl-v1beta1/test/google/cloud/automl/v1beta1/prediction_service_test.rb +++ /dev/null @@ -1,249 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/automl/v1beta1/prediction_service_pb" -require "google/cloud/automl/v1beta1/prediction_service" - -class ::Google::Cloud::AutoML::V1beta1::PredictionService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_predict - # Create GRPC objects. - grpc_response = ::Google::Cloud::AutoML::V1beta1::PredictResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - payload = {} - params = {} - - predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :predict, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::ExamplePayload), request["payload"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.predict({ name: name, payload: payload, params: params }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.predict name: name, payload: payload, params: params do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.predict ::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.predict({ name: name, payload: payload, params: params }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.predict(::Google::Cloud::AutoML::V1beta1::PredictRequest.new(name: name, payload: payload, params: params), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, predict_client_stub.call_rpc_count - end - end - - def test_batch_predict - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - input_config = {} - output_config = {} - params = {} - - batch_predict_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_predict, name - assert_kind_of ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictInputConfig), request["input_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AutoML::V1beta1::BatchPredictOutputConfig), request["output_config"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_predict_client_stub do - # Create client - c = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - c.batch_predict name: name, input_config: input_config, output_config: output_config, params: params do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.batch_predict ::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.batch_predict({ name: name, input_config: input_config, output_config: output_config, params: params }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.batch_predict(::Google::Cloud::AutoML::V1beta1::BatchPredictRequest.new(name: name, input_config: input_config, output_config: output_config, params: params), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_predict_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::AutoML::V1beta1::PredictionService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::AutoML::V1beta1::PredictionService::Operations, client.operations_client - end -end diff --git a/google-cloud-automl-v1beta1/test/helper.rb b/google-cloud-automl-v1beta1/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/google-cloud-automl-v1beta1/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/librarian.yaml b/librarian.yaml index b24a281f1776..d6163ccb0c37 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -482,17 +482,6 @@ libraries: ruby-cloud-yard-strict: "false" keep: - lib/google/cloud/automl/v1/_helpers.rb - - name: google-cloud-automl-v1beta1 - version: 0.19.1 - apis: - - path: google/cloud/automl/v1beta1 - ruby: - ruby_cloud_opts: - ruby-cloud-env-prefix: AUTOML - ruby-cloud-namespace-override: AutoMl=AutoML;Automl=AutoML - ruby-cloud-path-override: auto_ml=automl - keep: - - lib/google/cloud/automl/v1beta1/_helpers.rb - name: google-cloud-backupdr version: 2.3.1 apis: From 942274a90d1fe356734eaaaa34fb0209e6083e72 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Fri, 18 Sep 2026 17:10:44 -0400 Subject: [PATCH 2/3] fix: restore version.rb for tombstone gemspec --- .../google/cloud/automl/v1beta1/version.rb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb diff --git a/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb new file mode 100644 index 000000000000..ec6471cf7a72 --- /dev/null +++ b/google-cloud-automl-v1beta1/lib/google/cloud/automl/v1beta1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module AutoML + module V1beta1 + VERSION = "0.19.1" + end + end + end +end From 995a7a2fc06ddf39f843d05778e2ec8ba842ed50 Mon Sep 17 00:00:00 2001 From: Min Zhu Date: Fri, 18 Sep 2026 17:11:52 -0400 Subject: [PATCH 3/3] fix: use AutoML module name in gemspec --- google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec b/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec index 68dda49046a3..a2f2ffc99073 100644 --- a/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec +++ b/google-cloud-automl-v1beta1/google-cloud-automl-v1beta1.gemspec @@ -2,7 +2,7 @@ require File.expand_path("lib/google/cloud/automl/v1beta1/version", __dir__) Gem::Specification.new do |gem| gem.name = "google-cloud-automl-v1beta1" - gem.version = Google::Cloud::Automl::V1beta1::VERSION + gem.version = Google::Cloud::AutoML::V1beta1::VERSION gem.authors = ["Google LLC"] gem.email = "googleapis-packages@google.com" gem.description =