From da3da7e00c9817062f08a06aaec8e26b6d93826a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 30 Apr 2026 16:07:09 +0000 Subject: [PATCH 1/4] feat: Support NativeDashboardService, DashboardChartService, DashboardQueryService, FeaturedContentNativeDashboardService, FeaturedContentMetadata for v1 PiperOrigin-RevId: 907979786 Source-Link: https://github.com/googleapis/googleapis/commit/d9675db6acda5d46f7dfa172e07f594438cf4c25 Source-Link: https://github.com/googleapis/googleapis-gen/commit/81c5aaeedab56f8f361065c777c52c9d2172fbeb Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNocm9uaWNsZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiODFjNWFhZWVkYWI1NmY4ZjM2MTA2NWM3NzdjNTJjOWQyMTcyZmJlYiJ9 --- .../google-cloud-chronicle-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-chronicle-v1/.rubocop.yml | 33 + .../google-cloud-chronicle-v1/.toys.rb | 28 + .../google-cloud-chronicle-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-chronicle-v1/CHANGELOG.md | 2 + .../google-cloud-chronicle-v1/Gemfile | 14 + .../google-cloud-chronicle-v1/LICENSE.md | 201 ++ .../google-cloud-chronicle-v1/README.md | 154 + .../google-cloud-chronicle-v1/Rakefile | 169 ++ .../gapic_metadata.json | 429 +++ .../google-cloud-chronicle-v1.gemspec | 28 + .../lib/google-cloud-chronicle-v1.rb | 21 + .../lib/google/cloud/chronicle/v1.rb | 54 + .../cloud/chronicle/v1/dashboard_chart_pb.rb | 83 + .../chronicle/v1/dashboard_chart_service.rb | 55 + .../v1/dashboard_chart_service/client.rb | 584 ++++ .../v1/dashboard_chart_service/credentials.rb | 49 + .../v1/dashboard_chart_service/paths.rb | 73 + .../v1/dashboard_chart_service/rest.rb | 52 + .../v1/dashboard_chart_service/rest/client.rb | 527 ++++ .../rest/service_stub.rb | 203 ++ .../v1/dashboard_chart_services_pb.rb | 47 + .../cloud/chronicle/v1/dashboard_query_pb.rb | 58 + .../chronicle/v1/dashboard_query_service.rb | 55 + .../v1/dashboard_query_service/client.rb | 589 ++++ .../v1/dashboard_query_service/credentials.rb | 49 + .../v1/dashboard_query_service/paths.rb | 94 + .../v1/dashboard_query_service/rest.rb | 52 + .../v1/dashboard_query_service/rest/client.rb | 532 ++++ .../rest/service_stub.rb | 204 ++ .../v1/dashboard_query_services_pb.rb | 47 + .../chronicle/v1/data_access_control_pb.rb | 44 + .../v1/data_access_control_service.rb | 56 + .../v1/data_access_control_service/client.rb | 1431 +++++++++ .../credentials.rb | 47 + .../v1/data_access_control_service/paths.rb | 94 + .../v1/data_access_control_service/rest.rb | 53 + .../rest/client.rb | 1318 ++++++++ .../rest/service_stub.rb | 695 +++++ .../v1/data_access_control_services_pb.rb | 76 + .../cloud/chronicle/v1/data_table_pb.rb | 57 + .../cloud/chronicle/v1/data_table_service.rb | 55 + .../chronicle/v1/data_table_service/client.rb | 1915 ++++++++++++ .../v1/data_table_service/credentials.rb | 49 + .../chronicle/v1/data_table_service/paths.rb | 138 + .../chronicle/v1/data_table_service/rest.rb | 52 + .../v1/data_table_service/rest/client.rb | 1767 +++++++++++ .../data_table_service/rest/service_stub.rb | 1004 +++++++ .../chronicle/v1/data_table_services_pb.rb | 73 + .../google/cloud/chronicle/v1/entity_pb.rb | 39 + .../cloud/chronicle/v1/entity_service.rb | 55 + .../chronicle/v1/entity_service/client.rb | 908 ++++++ .../v1/entity_service/credentials.rb | 47 + .../chronicle/v1/entity_service/paths.rb | 73 + .../cloud/chronicle/v1/entity_service/rest.rb | 52 + .../v1/entity_service/rest/client.rb | 830 ++++++ .../v1/entity_service/rest/service_stub.rb | 388 +++ .../cloud/chronicle/v1/entity_services_pb.rb | 54 + .../v1/featured_content_metadata_pb.rb | 25 + .../featured_content_native_dashboard_pb.rb | 33 + ...atured_content_native_dashboard_service.rb | 56 + .../client.rb | 717 +++++ .../credentials.rb | 49 + .../paths.rb | 136 + .../rest.rb | 53 + .../rest/client.rb | 653 ++++ .../rest/service_stub.rb | 265 ++ ...ed_content_native_dashboard_services_pb.rb | 50 + .../google/cloud/chronicle/v1/instance_pb.rb | 27 + .../cloud/chronicle/v1/instance_service.rb | 55 + .../chronicle/v1/instance_service/client.rb | 481 +++ .../v1/instance_service/credentials.rb | 47 + .../chronicle/v1/instance_service/paths.rb | 52 + .../chronicle/v1/instance_service/rest.rb | 52 + .../v1/instance_service/rest/client.rb | 431 +++ .../v1/instance_service/rest/service_stub.rb | 142 + .../chronicle/v1/instance_services_pb.rb | 45 + .../cloud/chronicle/v1/native_dashboard_pb.rb | 61 + .../chronicle/v1/native_dashboard_service.rb | 55 + .../v1/native_dashboard_service/client.rb | 1611 ++++++++++ .../native_dashboard_service/credentials.rb | 49 + .../v1/native_dashboard_service/paths.rb | 115 + .../v1/native_dashboard_service/rest.rb | 52 + .../native_dashboard_service/rest/client.rb | 1484 +++++++++ .../rest/service_stub.rb | 822 +++++ .../v1/native_dashboard_services_pb.rb | 67 + .../cloud/chronicle/v1/reference_list_pb.rb | 38 + .../chronicle/v1/reference_list_service.rb | 55 + .../v1/reference_list_service/client.rb | 809 +++++ .../v1/reference_list_service/credentials.rb | 47 + .../v1/reference_list_service/paths.rb | 73 + .../v1/reference_list_service/rest.rb | 52 + .../v1/reference_list_service/rest/client.rb | 738 +++++ .../rest/service_stub.rb | 327 ++ .../v1/reference_list_services_pb.rb | 51 + .../lib/google/cloud/chronicle/v1/rest.rb | 46 + .../lib/google/cloud/chronicle/v1/rule_pb.rb | 61 + .../google/cloud/chronicle/v1/rule_service.rb | 56 + .../cloud/chronicle/v1/rule_service/client.rb | 1691 +++++++++++ .../chronicle/v1/rule_service/credentials.rb | 47 + .../chronicle/v1/rule_service/operations.rb | 841 ++++++ .../cloud/chronicle/v1/rule_service/paths.rb | 159 + .../cloud/chronicle/v1/rule_service/rest.rb | 53 + .../chronicle/v1/rule_service/rest/client.rb | 1564 ++++++++++ .../v1/rule_service/rest/operations.rb | 925 ++++++ .../v1/rule_service/rest/service_stub.rb | 817 +++++ .../cloud/chronicle/v1/rule_services_pb.rb | 70 + .../lib/google/cloud/chronicle/v1/version.rb | 28 + .../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 ++ .../cloud/chronicle/v1/dashboard_chart.rb | 923 ++++++ .../cloud/chronicle/v1/dashboard_query.rb | 653 ++++ .../cloud/chronicle/v1/data_access_control.rb | 364 +++ .../google/cloud/chronicle/v1/data_table.rb | 512 ++++ .../google/cloud/chronicle/v1/entity.rb | 210 ++ .../chronicle/v1/featured_content_metadata.rb | 82 + .../v1/featured_content_native_dashboard.rb | 141 + .../google/cloud/chronicle/v1/instance.rb | 47 + .../cloud/chronicle/v1/native_dashboard.rb | 502 ++++ .../cloud/chronicle/v1/reference_list.rb | 232 ++ .../google/cloud/chronicle/v1/rule.rb | 701 +++++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/date.rb | 56 + .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../batch_get_dashboard_charts.rb | 47 + .../get_dashboard_chart.rb | 47 + .../execute_dashboard_query.rb | 47 + .../get_dashboard_query.rb | 47 + .../create_data_access_label.rb | 47 + .../create_data_access_scope.rb | 47 + .../delete_data_access_label.rb | 47 + .../delete_data_access_scope.rb | 47 + .../get_data_access_label.rb | 47 + .../get_data_access_scope.rb | 47 + .../list_data_access_labels.rb | 51 + .../list_data_access_scopes.rb | 51 + .../update_data_access_label.rb | 47 + .../update_data_access_scope.rb | 47 + .../bulk_create_data_table_rows.rb | 47 + .../bulk_get_data_table_rows.rb | 47 + .../bulk_replace_data_table_rows.rb | 47 + .../bulk_update_data_table_rows.rb | 47 + .../data_table_service/create_data_table.rb | 47 + .../create_data_table_row.rb | 47 + .../data_table_service/delete_data_table.rb | 47 + .../delete_data_table_row.rb | 47 + .../data_table_service/get_data_table.rb | 47 + .../get_data_table_operation_errors.rb | 47 + .../data_table_service/get_data_table_row.rb | 47 + .../list_data_table_rows.rb | 51 + .../data_table_service/list_data_tables.rb | 51 + .../data_table_service/update_data_table.rb | 47 + .../update_data_table_row.rb | 47 + .../entity_service/create_watchlist.rb | 47 + .../entity_service/delete_watchlist.rb | 47 + .../snippets/entity_service/get_watchlist.rb | 47 + .../entity_service/list_watchlists.rb | 51 + .../entity_service/update_watchlist.rb | 47 + .../get_featured_content_native_dashboard.rb | 47 + ...stall_featured_content_native_dashboard.rb | 47 + ...list_featured_content_native_dashboards.rb | 51 + .../snippets/instance_service/get_instance.rb | 47 + .../native_dashboard_service/add_chart.rb | 47 + .../create_native_dashboard.rb | 47 + .../delete_native_dashboard.rb | 47 + .../duplicate_chart.rb | 47 + .../duplicate_native_dashboard.rb | 47 + .../native_dashboard_service/edit_chart.rb | 47 + .../export_native_dashboards.rb | 47 + .../get_native_dashboard.rb | 47 + .../import_native_dashboards.rb | 47 + .../list_native_dashboards.rb | 51 + .../native_dashboard_service/remove_chart.rb | 47 + .../update_native_dashboard.rb | 47 + .../create_reference_list.rb | 47 + .../get_reference_list.rb | 47 + .../list_reference_lists.rb | 51 + .../update_reference_list.rb | 47 + .../snippets/rule_service/create_retrohunt.rb | 54 + .../snippets/rule_service/create_rule.rb | 47 + .../snippets/rule_service/delete_rule.rb | 47 + .../snippets/rule_service/get_retrohunt.rb | 47 + .../snippets/rule_service/get_rule.rb | 47 + .../rule_service/get_rule_deployment.rb | 47 + .../snippets/rule_service/list_retrohunts.rb | 51 + .../rule_service/list_rule_deployments.rb | 51 + .../rule_service/list_rule_revisions.rb | 51 + .../snippets/rule_service/list_rules.rb | 51 + .../snippets/rule_service/update_rule.rb | 47 + .../rule_service/update_rule_deployment.rb | 47 + ...et_metadata_google.cloud.chronicle.v1.json | 2655 +++++++++++++++++ .../v1/dashboard_chart_service_paths_test.rb | 67 + .../v1/dashboard_chart_service_rest_test.rb | 208 ++ .../v1/dashboard_chart_service_test.rb | 222 ++ .../v1/dashboard_query_service_paths_test.rb | 79 + .../v1/dashboard_query_service_rest_test.rb | 211 ++ .../v1/dashboard_query_service_test.rb | 228 ++ .../data_access_control_service_paths_test.rb | 79 + .../data_access_control_service_rest_test.rb | 651 ++++ .../v1/data_access_control_service_test.rb | 718 +++++ .../v1/data_table_service_paths_test.rb | 103 + .../v1/data_table_service_rest_test.rb | 926 ++++++ .../chronicle/v1/data_table_service_test.rb | 1018 +++++++ .../chronicle/v1/entity_service_paths_test.rb | 67 + .../chronicle/v1/entity_service_rest_test.rb | 376 +++ .../cloud/chronicle/v1/entity_service_test.rb | 413 +++ ...ent_native_dashboard_service_paths_test.rb | 103 + ...tent_native_dashboard_service_rest_test.rb | 265 ++ ...d_content_native_dashboard_service_test.rb | 291 ++ .../v1/instance_service_paths_test.rb | 55 + .../v1/instance_service_rest_test.rb | 153 + .../chronicle/v1/instance_service_test.rb | 162 + .../v1/native_dashboard_service_paths_test.rb | 91 + .../v1/native_dashboard_service_rest_test.rb | 765 +++++ .../v1/native_dashboard_service_test.rb | 841 ++++++ .../v1/reference_list_service_paths_test.rb | 67 + .../v1/reference_list_service_rest_test.rb | 322 ++ .../v1/reference_list_service_test.rb | 355 +++ .../v1/rule_service_operations_test.rb | 400 +++ .../chronicle/v1/rule_service_paths_test.rb | 115 + .../chronicle/v1/rule_service_rest_test.rb | 766 +++++ .../cloud/chronicle/v1/rule_service_test.rb | 877 ++++++ .../google-cloud-chronicle-v1/test/helper.rb | 26 + 235 files changed, 55446 insertions(+) create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/README.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.gitignore b/owl-bot-staging/google-cloud-chronicle-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +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/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json new file mode 100644 index 000000000000..b353dde6b42b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "chronicle.googleapis.com", + "api_shortname": "chronicle", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest", + "distribution_name": "google-cloud-chronicle-v1", + "is_cloud": true, + "language": "ruby", + "name": "chronicle", + "name_pretty": "Chronicle V1 API", + "product_documentation": "https://cloud.google.com/chronicle/docs/secops/secops-overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/chronicle/docs/secops/secops-overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml b/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml new file mode 100644 index 000000000000..247c818fc834 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-chronicle-v1.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-chronicle-v1.rb" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb b/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb @@ -0,0 +1,28 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/.yardopts b/owl-bot-staging/google-cloud-chronicle-v1/.yardopts new file mode 100644 index 000000000000..279160678357 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Chronicle V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1b97f84a9c98 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-chronicle-v1 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-chronicle-v1 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/chronicle/v1" + +client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/chronicle/v1" + +::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::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-chronicle-v1 +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/chronicle/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::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/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-chronicle-v1/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md b/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/owl-bot-staging/google-cloud-chronicle-v1/README.md b/owl-bot-staging/google-cloud-chronicle-v1/README.md new file mode 100644 index 000000000000..d541636e6e52 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Chronicle V1 API + +The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. + +The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Chronicle V1 API. Most users should consider using +the main client gem, +[google-cloud-chronicle](https://rubygems.org/gems/google-cloud-chronicle). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-chronicle-v1 +``` + +## 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/chronicle.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/chronicle/v1" + +client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new +request = ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new # (request fields as keyword arguments...) +response = client.get_dashboard_query request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/chronicle/docs/secops/secops-overview) +for general usage information. + +## 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/chronicle/v1" +require "logger" + +client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::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.0+. + +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-chronicle`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-chronicle-v1`. +_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-chronicle`. +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-chronicle-v1`. + +### 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. diff --git a/owl-bot-staging/google-cloud-chronicle-v1/Rakefile b/owl-bot-staging/google-cloud-chronicle-v1/Rakefile new file mode 100644 index 000000000000..2f863e51cf0e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/Rakefile @@ -0,0 +1,169 @@ +# 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 "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-chronicle-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_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 GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/chronicle/v1/dashboard_query_service/credentials" + ::Google::Cloud::Chronicle::V1::DashboardQueryService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_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-chronicle-v1 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-chronicle-v1 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-chronicle-v1 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-chronicle-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-chronicle-v1" + header "google-cloud-chronicle-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-chronicle-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-chronicle-v1 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-chronicle-v1 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-chronicle-v1 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/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json new file mode 100644 index 000000000000..16360a702a6d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json @@ -0,0 +1,429 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.chronicle.v1", + "libraryPackage": "::Google::Cloud::Chronicle::V1", + "services": { + "DashboardQueryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client", + "rpcs": { + "GetDashboardQuery": { + "methods": [ + "get_dashboard_query" + ] + }, + "ExecuteDashboardQuery": { + "methods": [ + "execute_dashboard_query" + ] + } + } + } + } + }, + "DashboardChartService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client", + "rpcs": { + "GetDashboardChart": { + "methods": [ + "get_dashboard_chart" + ] + }, + "BatchGetDashboardCharts": { + "methods": [ + "batch_get_dashboard_charts" + ] + } + } + } + } + }, + "DataAccessControlService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client", + "rpcs": { + "CreateDataAccessLabel": { + "methods": [ + "create_data_access_label" + ] + }, + "GetDataAccessLabel": { + "methods": [ + "get_data_access_label" + ] + }, + "ListDataAccessLabels": { + "methods": [ + "list_data_access_labels" + ] + }, + "UpdateDataAccessLabel": { + "methods": [ + "update_data_access_label" + ] + }, + "DeleteDataAccessLabel": { + "methods": [ + "delete_data_access_label" + ] + }, + "CreateDataAccessScope": { + "methods": [ + "create_data_access_scope" + ] + }, + "GetDataAccessScope": { + "methods": [ + "get_data_access_scope" + ] + }, + "ListDataAccessScopes": { + "methods": [ + "list_data_access_scopes" + ] + }, + "UpdateDataAccessScope": { + "methods": [ + "update_data_access_scope" + ] + }, + "DeleteDataAccessScope": { + "methods": [ + "delete_data_access_scope" + ] + } + } + } + } + }, + "DataTableService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DataTableService::Client", + "rpcs": { + "CreateDataTable": { + "methods": [ + "create_data_table" + ] + }, + "ListDataTables": { + "methods": [ + "list_data_tables" + ] + }, + "GetDataTable": { + "methods": [ + "get_data_table" + ] + }, + "UpdateDataTable": { + "methods": [ + "update_data_table" + ] + }, + "DeleteDataTable": { + "methods": [ + "delete_data_table" + ] + }, + "CreateDataTableRow": { + "methods": [ + "create_data_table_row" + ] + }, + "UpdateDataTableRow": { + "methods": [ + "update_data_table_row" + ] + }, + "ListDataTableRows": { + "methods": [ + "list_data_table_rows" + ] + }, + "GetDataTableRow": { + "methods": [ + "get_data_table_row" + ] + }, + "DeleteDataTableRow": { + "methods": [ + "delete_data_table_row" + ] + }, + "BulkCreateDataTableRows": { + "methods": [ + "bulk_create_data_table_rows" + ] + }, + "BulkGetDataTableRows": { + "methods": [ + "bulk_get_data_table_rows" + ] + }, + "BulkReplaceDataTableRows": { + "methods": [ + "bulk_replace_data_table_rows" + ] + }, + "BulkUpdateDataTableRows": { + "methods": [ + "bulk_update_data_table_rows" + ] + }, + "GetDataTableOperationErrors": { + "methods": [ + "get_data_table_operation_errors" + ] + } + } + } + } + }, + "EntityService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::EntityService::Client", + "rpcs": { + "GetWatchlist": { + "methods": [ + "get_watchlist" + ] + }, + "ListWatchlists": { + "methods": [ + "list_watchlists" + ] + }, + "CreateWatchlist": { + "methods": [ + "create_watchlist" + ] + }, + "UpdateWatchlist": { + "methods": [ + "update_watchlist" + ] + }, + "DeleteWatchlist": { + "methods": [ + "delete_watchlist" + ] + } + } + } + } + }, + "NativeDashboardService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client", + "rpcs": { + "CreateNativeDashboard": { + "methods": [ + "create_native_dashboard" + ] + }, + "GetNativeDashboard": { + "methods": [ + "get_native_dashboard" + ] + }, + "ListNativeDashboards": { + "methods": [ + "list_native_dashboards" + ] + }, + "UpdateNativeDashboard": { + "methods": [ + "update_native_dashboard" + ] + }, + "DuplicateNativeDashboard": { + "methods": [ + "duplicate_native_dashboard" + ] + }, + "DeleteNativeDashboard": { + "methods": [ + "delete_native_dashboard" + ] + }, + "AddChart": { + "methods": [ + "add_chart" + ] + }, + "RemoveChart": { + "methods": [ + "remove_chart" + ] + }, + "EditChart": { + "methods": [ + "edit_chart" + ] + }, + "DuplicateChart": { + "methods": [ + "duplicate_chart" + ] + }, + "ExportNativeDashboards": { + "methods": [ + "export_native_dashboards" + ] + }, + "ImportNativeDashboards": { + "methods": [ + "import_native_dashboards" + ] + } + } + } + } + }, + "FeaturedContentNativeDashboardService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client", + "rpcs": { + "GetFeaturedContentNativeDashboard": { + "methods": [ + "get_featured_content_native_dashboard" + ] + }, + "ListFeaturedContentNativeDashboards": { + "methods": [ + "list_featured_content_native_dashboards" + ] + }, + "InstallFeaturedContentNativeDashboard": { + "methods": [ + "install_featured_content_native_dashboard" + ] + } + } + } + } + }, + "InstanceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::InstanceService::Client", + "rpcs": { + "GetInstance": { + "methods": [ + "get_instance" + ] + } + } + } + } + }, + "ReferenceListService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client", + "rpcs": { + "GetReferenceList": { + "methods": [ + "get_reference_list" + ] + }, + "ListReferenceLists": { + "methods": [ + "list_reference_lists" + ] + }, + "CreateReferenceList": { + "methods": [ + "create_reference_list" + ] + }, + "UpdateReferenceList": { + "methods": [ + "update_reference_list" + ] + } + } + } + } + }, + "RuleService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::RuleService::Client", + "rpcs": { + "CreateRule": { + "methods": [ + "create_rule" + ] + }, + "GetRule": { + "methods": [ + "get_rule" + ] + }, + "ListRules": { + "methods": [ + "list_rules" + ] + }, + "UpdateRule": { + "methods": [ + "update_rule" + ] + }, + "DeleteRule": { + "methods": [ + "delete_rule" + ] + }, + "ListRuleRevisions": { + "methods": [ + "list_rule_revisions" + ] + }, + "CreateRetrohunt": { + "methods": [ + "create_retrohunt" + ] + }, + "GetRetrohunt": { + "methods": [ + "get_retrohunt" + ] + }, + "ListRetrohunts": { + "methods": [ + "list_retrohunts" + ] + }, + "GetRuleDeployment": { + "methods": [ + "get_rule_deployment" + ] + }, + "ListRuleDeployments": { + "methods": [ + "list_rule_deployments" + ] + }, + "UpdateRuleDeployment": { + "methods": [ + "update_rule_deployment" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec b/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec new file mode 100644 index 000000000000..0cf9044d81bc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/chronicle/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-chronicle-v1" + gem.version = Google::Cloud::Chronicle::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details." + gem.summary = "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb new file mode 100644 index 000000000000..8d5cd2a8ddb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb @@ -0,0 +1,21 @@ +# 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/chronicle/v1" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb new file mode 100644 index 000000000000..5ef420b6fc6f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb @@ -0,0 +1,54 @@ +# 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/chronicle/v1/dashboard_query_service" +require "google/cloud/chronicle/v1/dashboard_chart_service" +require "google/cloud/chronicle/v1/data_access_control_service" +require "google/cloud/chronicle/v1/data_table_service" +require "google/cloud/chronicle/v1/entity_service" +require "google/cloud/chronicle/v1/native_dashboard_service" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" +require "google/cloud/chronicle/v1/instance_service" +require "google/cloud/chronicle/v1/reference_list_service" +require "google/cloud/chronicle/v1/rule_service" +require "google/cloud/chronicle/v1/version" + +module Google + module Cloud + module Chronicle + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1" + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/chronicle/v1" + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/chronicle/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb new file mode 100644 index 000000000000..8ac2f8e6e1cb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/dashboard_chart.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/chronicle/v1/dashboard_query_pb' + + +descriptor_data = "\n/google/cloud/chronicle/v1/dashboard_chart.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/chronicle/v1/dashboard_query.proto\"\xfd=\n\x0e\x44\x61shboardChart\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12J\n\x10native_dashboard\x18\x04 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12;\n\ttile_type\x18\x07 \x01(\x0e\x32#.google.cloud.chronicle.v1.TileTypeB\x03\xe0\x41\x01\x12X\n\x10\x63hart_datasource\x18\x05 \x01(\x0b\x32\x39.google.cloud.chronicle.v1.DashboardChart.ChartDatasourceB\x03\xe0\x41\x01\x12S\n\rvisualization\x18\x06 \x01(\x0b\x32\x37.google.cloud.chronicle.v1.DashboardChart.VisualizationB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11\x64rill_down_config\x18\t \x01(\x0b\x32\x39.google.cloud.chronicle.v1.DashboardChart.DrillDownConfigB\x03\xe0\x41\x01\x12\x13\n\x06tokens\x18\n \x03(\tB\x03\xe0\x41\x01\x1a\x95\x01\n\x0f\x43hartDatasource\x12\x45\n\x0f\x64\x61shboard_query\x18\x01 \x01(\tB,\xfa\x41)\n\'chronicle.googleapis.com/DashboardQuery\x12;\n\x0c\x64\x61ta_sources\x18\x03 \x03(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x1a\x8c+\n\rVisualization\x12L\n\x06x_axes\x18\x07 \x03(\x0b\x32<.google.cloud.chronicle.v1.DashboardChart.Visualization.Axis\x12L\n\x06y_axes\x18\x08 \x03(\x0b\x32<.google.cloud.chronicle.v1.DashboardChart.Visualization.Axis\x12N\n\x06series\x18\x03 \x03(\x0b\x32>.google.cloud.chronicle.v1.DashboardChart.Visualization.Series\x12P\n\x07tooltip\x18\x04 \x01(\x0b\x32?.google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip\x12O\n\x07legends\x18\t \x03(\x0b\x32>.google.cloud.chronicle.v1.DashboardChart.Visualization.Legend\x12V\n\x0b\x63olumn_defs\x18\n \x03(\x0b\x32\x41.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef\x12^\n\x0ctable_config\x18\x12 \x01(\x0b\x32\x43.google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfigB\x03\xe0\x41\x01\x12\x31\n\x06\x62utton\x18\x0b \x01(\x0b\x32!.google.cloud.chronicle.v1.Button\x12:\n\x08markdown\x18\x11 \x01(\x0b\x32#.google.cloud.chronicle.v1.MarkdownB\x03\xe0\x41\x01\x12\x1a\n\rseries_column\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rgrouping_type\x18\r \x01(\tB\x03\xe0\x41\x01\x12i\n\x12google_maps_config\x18\x0e \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfigB\x03\xe0\x41\x01\x12\'\n\x1athreshold_coloring_enabled\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12[\n\x0bvisual_maps\x18\x10 \x03(\x0b\x32\x41.google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMapB\x03\xe0\x41\x01\x1a\x88\x01\n\x04\x41xis\x12\x36\n\taxis_type\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.AxisType\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x10\n\x03min\x18\x06 \x01(\x05H\x00\x88\x01\x01\x12\x10\n\x03max\x18\x07 \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\x1a\xc1\x12\n\x06Series\x12:\n\x0bseries_type\x18\x08 \x01(\x0e\x32%.google.cloud.chronicle.v1.SeriesType\x12\x13\n\x0bseries_name\x18\x02 \x01(\t\x12\x13\n\x0bshow_symbol\x18\x04 \x01(\x08\x12\x17\n\x0fshow_background\x18\x05 \x01(\x08\x12\r\n\x05stack\x18\x06 \x01(\t\x12M\n\x15series_stack_strategy\x18\t \x01(\x0e\x32..google.cloud.chronicle.v1.SeriesStackStrategy\x12U\n\x06\x65ncode\x18\n \x01(\x0b\x32\x45.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode\x12\r\n\x05label\x18\x0b \x01(\t\x12\r\n\x05\x66ield\x18\x0c \x01(\t\x12\x61\n\ndata_label\x18\r \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabelB\x03\xe0\x41\x01\x12\x13\n\x06radius\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x61\n\nitem_style\x18\x0f \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyleB\x03\xe0\x41\x01\x12 \n\x13series_unique_value\x18\x10 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\narea_style\x18\x11 \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyleB\x03\xe0\x41\x01\x12\x63\n\x0bitem_colors\x18\x12 \x01(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColorsB\x03\xe0\x41\x01\x12\x65\n\x0cgauge_config\x18\x13 \x01(\x0b\x32J.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfigB\x03\xe0\x41\x01\x12r\n\x13metric_trend_config\x18\x14 \x01(\x0b\x32P.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfigB\x03\xe0\x41\x01\x1a@\n\x06\x45ncode\x12\t\n\x01x\x18\x01 \x01(\t\x12\t\n\x01y\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\x12\x11\n\titem_name\x18\x04 \x01(\t\x1a\x1e\n\tDataLabel\x12\x11\n\x04show\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1aU\n\tItemStyle\x12\x19\n\x0c\x62order_width\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x62order_color\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x63olor\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xbb\x01\n\tAreaStyle\x12\x12\n\x05\x63olor\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06origin\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bshadow_blur\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x19\n\x0cshadow_color\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fshadow_offset_x\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fshadow_offset_y\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07opacity\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x1a<\n\x12UserSelectedValues\x12\x12\n\x05\x63olor\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x8a\x01\n\x0f\x43hartSliceColor\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x65\n\x05value\x18\x02 \x01(\x0b\x32Q.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValuesB\x03\xe0\x41\x01\x1aq\n\nItemColors\x12\x63\n\x06\x63olors\x18\x01 \x03(\x0b\x32N.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColorB\x03\xe0\x41\x01\x1a\x34\n\nGaugeValue\x12\x12\n\x05value\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\xc0\x02\n\x0bGaugeConfig\x12\x62\n\nbase_value\x18\x01 \x01(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xe0\x41\x01\x12\x63\n\x0blimit_value\x18\x02 \x01(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xe0\x41\x01\x12h\n\x10threshold_values\x18\x03 \x03(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xe0\x41\x01\x1a\x96\x02\n\x11MetricTrendConfig\x12\x43\n\rmetric_format\x18\x01 \x01(\x0e\x32\'.google.cloud.chronicle.v1.MetricFormatB\x03\xe0\x41\x01\x12\x1e\n\x11show_metric_trend\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12P\n\x14metric_display_trend\x18\x03 \x01(\x0e\x32-.google.cloud.chronicle.v1.MetricDisplayTrendB\x03\xe0\x41\x01\x12J\n\x11metric_trend_type\x18\x04 \x01(\x0e\x32*.google.cloud.chronicle.v1.MetricTrendTypeB\x03\xe0\x41\x01\x1a[\n\x07Tooltip\x12\x0c\n\x04show\x18\x01 \x01(\x08\x12\x42\n\x0ftooltip_trigger\x18\x03 \x01(\x0e\x32).google.cloud.chronicle.v1.ToolTipTrigger\x1a\x87\x02\n\x06Legend\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04show\x18\x02 \x01(\x08\x12\x0f\n\x07z_level\x18\x03 \x01(\x05\x12\t\n\x01z\x18\x04 \x01(\x05\x12\x0c\n\x04left\x18\x05 \x01(\x05\x12\x0b\n\x03top\x18\x06 \x01(\x05\x12\r\n\x05right\x18\x07 \x01(\x05\x12\x0e\n\x06\x62ottom\x18\x08 \x01(\x05\x12>\n\rlegend_orient\x18\x0c \x01(\x0e\x32\'.google.cloud.chronicle.v1.LegendOrient\x12<\n\x0clegend_align\x18\r \x01(\x0e\x32&.google.cloud.chronicle.v1.LegendAlign\x12\x0f\n\x07padding\x18\x0b \x03(\x05\x1a*\n\tColumnDef\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06header\x18\x02 \x01(\t\x1av\n\x18\x43olumnRenderTypeSettings\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x12\x63olumn_render_type\x18\x02 \x01(\x0e\x32%.google.cloud.chronicle.v1.RenderTypeB\x03\xe0\x41\x01\x1am\n\x15\x43olumnTooltipSettings\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13header_tooltip_text\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x63\x65ll_tooltip_text\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x9d\x02\n\x0bTableConfig\x12\x1d\n\x10\x65nable_text_wrap\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12z\n\x1b\x63olumn_render_type_settings\x18\x02 \x03(\x0b\x32P.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettingsB\x03\xe0\x41\x01\x12s\n\x17\x63olumn_tooltip_settings\x18\x03 \x03(\x0b\x32M.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettingsB\x03\xe0\x41\x01\x1a\xfd\x05\n\x10GoogleMapsConfig\x12q\n\rdata_settings\x18\x01 \x01(\x0b\x32U.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettingsB\x03\xe0\x41\x01\x12;\n\tplot_mode\x18\x02 \x01(\x0e\x32#.google.cloud.chronicle.v1.PlotModeB\x03\xe0\x41\x01\x12o\n\x0cmap_position\x18\x03 \x01(\x0b\x32T.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPositionB\x03\xe0\x41\x01\x12s\n\x0epoint_settings\x18\x04 \x01(\x0b\x32V.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettingsB\x03\xe0\x41\x01\x1a\x66\n\x0c\x44\x61taSettings\x12\x1c\n\x0flatitude_column\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10longitude_column\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x63ount_column\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a~\n\x0bMapPosition\x12\x15\n\x08\x66it_data\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0elatitude_value\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01\x12\x1c\n\x0flongitude_value\x18\x06 \x01(\x01\x42\x03\xe0\x41\x01\x12\x1d\n\x10zoom_scale_value\x18\x07 \x01(\x01\x42\x03\xe0\x41\x01\x1ak\n\rPointSettings\x12\x46\n\x0fpoint_size_type\x18\x01 \x01(\x0e\x32(.google.cloud.chronicle.v1.PointSizeTypeB\x03\xe0\x41\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\xb2\x02\n\tVisualMap\x12\x46\n\x0fvisual_map_type\x18\x01 \x01(\x0e\x32(.google.cloud.chronicle.v1.VisualMapTypeB\x03\xe0\x41\x01\x12\x65\n\x06pieces\x18\x02 \x03(\x0b\x32P.google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPieceB\x03\xe0\x41\x01\x1av\n\x0eVisualMapPiece\x12\x15\n\x03min\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x15\n\x03max\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05label\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x06\n\x04_minB\x06\n\x04_max\x1a\xed\x0b\n\x0f\x44rillDownConfig\x12\x62\n\x10left_drill_downs\x18\x01 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDownB\x03\xe0\x41\x02\x12\x63\n\x11right_drill_downs\x18\x02 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDownB\x03\xe0\x41\x02\x1a\x90\n\n\tDrillDown\x12x\n\x10\x64\x65\x66\x61ult_settings\x18\x03 \x01(\x0b\x32\\.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettingsH\x00\x12v\n\x0f\x63ustom_settings\x18\x04 \x01(\x0b\x32[.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettingsH\x00\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x30\n\x18\x44\x65\x66\x61ultDrillDownSettings\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x1a\xa6\x07\n\x17\x43ustomDrillDownSettings\x12{\n\x05query\x18\x03 \x01(\x0b\x32j.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQueryH\x00\x12}\n\x06\x66ilter\x18\x04 \x01(\x0b\x32k.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilterH\x00\x12\x8a\x01\n\rexternal_link\x18\x05 \x01(\x0b\x32q.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLinkH\x00\x12\x14\n\x07new_tab\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1e\n\x11left_click_column\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0e\x44rillDownQuery\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xd5\x02\n\x0f\x44rillDownFilter\x12\xa5\x01\n\x11\x64\x61shboard_filters\x18\x01 \x03(\x0b\x32\x84\x01.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilterB\x03\xe0\x41\x02\x1a\x99\x01\n\x18\x44rillDownDashboardFilter\x12 \n\x13\x64\x61shboard_filter_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12[\n\x1a\x66ilter_operator_and_values\x18\x02 \x03(\x0b\x32\x32.google.cloud.chronicle.v1.FilterOperatorAndValuesB\x03\xe0\x41\x02\x1a\x44\n\x15\x44rillDownExternalLink\x12\x11\n\x04link\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06\x61\x63tionB\n\n\x08settings:\xa4\x01\xea\x41\xa0\x01\n\'chronicle.googleapis.com/DashboardChart\x12Tprojects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}*\x0f\x64\x61shboardCharts2\x0e\x64\x61shboardChart\"\x90\x02\n\x06\x42utton\x12\x12\n\x05label\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\thyperlink\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07new_tab\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x45\n\nproperties\x18\x05 \x01(\x0b\x32,.google.cloud.chronicle.v1.Button.PropertiesB\x03\xe0\x41\x01\x1a\x63\n\nProperties\x12\x12\n\x05\x63olor\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62utton_style\x18\x02 \x01(\x0e\x32&.google.cloud.chronicle.v1.ButtonStyleB\x03\xe0\x41\x01\"\xa6\x01\n\x08Markdown\x12\x14\n\x07\x63ontent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\nproperties\x18\x02 \x01(\x0b\x32\x36.google.cloud.chronicle.v1.Markdown.MarkdownPropertiesB\x03\xe0\x41\x01\x1a\x33\n\x12MarkdownProperties\x12\x1d\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Y\n\x18GetDashboardChartRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"\xa1\x01\n\x1e\x42\x61tchGetDashboardChartsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/DashboardChart\x12>\n\x05names\x18\x02 \x03(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"f\n\x1f\x42\x61tchGetDashboardChartsResponse\x12\x43\n\x10\x64\x61shboard_charts\x18\x01 \x03(\x0b\x32).google.cloud.chronicle.v1.DashboardChart*p\n\x08TileType\x12\x19\n\x15TILE_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17TILE_TYPE_VISUALIZATION\x10\x01\x12\x14\n\x10TILE_TYPE_BUTTON\x10\x02\x12\x16\n\x12TILE_TYPE_MARKDOWN\x10\x03*t\n\nRenderType\x12\x1b\n\x17RENDER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10RENDER_TYPE_TEXT\x10\x01\x12\x14\n\x10RENDER_TYPE_ICON\x10\x02\x12\x1d\n\x19RENDER_TYPE_ICON_AND_TEXT\x10\x03*Q\n\x08\x41xisType\x12\x19\n\x15\x41XIS_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05VALUE\x10\x01\x12\x0c\n\x08\x43\x41TEGORY\x10\x02\x12\x08\n\x04TIME\x10\x03\x12\x07\n\x03LOG\x10\x04*t\n\nSeriesType\x12\x1b\n\x17SERIES_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04LINE\x10\x01\x12\x07\n\x03\x42\x41R\x10\x02\x12\x07\n\x03PIE\x10\x03\x12\x08\n\x04TEXT\x10\x04\x12\x07\n\x03MAP\x10\x05\x12\t\n\x05GAUGE\x10\x06\x12\x0f\n\x0bSCATTERPLOT\x10\x07*o\n\x13SeriesStackStrategy\x12%\n!SERIES_STACK_STRATEGY_UNSPECIFIED\x10\x00\x12\x0c\n\x08SAMESIGN\x10\x01\x12\x07\n\x03\x41LL\x10\x02\x12\x0c\n\x08POSITIVE\x10\x03\x12\x0c\n\x08NEGATIVE\x10\x04*\x7f\n\x0eToolTipTrigger\x12\x1f\n\x1bTOOLTIP_TRIGGER_UNSPECIFIED\x10\x00\x12\x18\n\x14TOOLTIP_TRIGGER_NONE\x10\x01\x12\x18\n\x14TOOLTIP_TRIGGER_ITEM\x10\x02\x12\x18\n\x14TOOLTIP_TRIGGER_AXIS\x10\x03*K\n\x0cLegendOrient\x12\x1d\n\x19LEGEND_ORIENT_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERTICAL\x10\x01\x12\x0e\n\nHORIZONTAL\x10\x02*J\n\x0bLegendAlign\x12\x1c\n\x18LEGEND_ALIGN_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x08\n\x04LEFT\x10\x02\x12\t\n\x05RIGHT\x10\x03*}\n\x0b\x42uttonStyle\x12\x1c\n\x18\x42UTTON_STYLE_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42UTTON_STYLE_FILLED\x10\x01\x12\x19\n\x15\x42UTTON_STYLE_OUTLINED\x10\x02\x12\x1c\n\x18\x42UTTON_STYLE_TRANSPARENT\x10\x03*f\n\x08PlotMode\x12\x19\n\x15PLOT_MODE_UNSPECIFIED\x10\x00\x12\x14\n\x10PLOT_MODE_POINTS\x10\x01\x12\x15\n\x11PLOT_MODE_HEATMAP\x10\x02\x12\x12\n\x0ePLOT_MODE_BOTH\x10\x03*u\n\rPointSizeType\x12\x1f\n\x1bPOINT_SIZE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15POINT_SIZE_TYPE_FIXED\x10\x01\x12(\n$POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE\x10\x02*e\n\x0cMetricFormat\x12\x1d\n\x19METRIC_FORMAT_UNSPECIFIED\x10\x00\x12\x18\n\x14METRIC_FORMAT_NUMBER\x10\x01\x12\x1c\n\x18METRIC_FORMAT_PLAIN_TEXT\x10\x02*\xc0\x01\n\x12MetricDisplayTrend\x12$\n METRIC_DISPLAY_TREND_UNSPECIFIED\x10\x00\x12\'\n#METRIC_DISPLAY_TREND_ABSOLUTE_VALUE\x10\x02\x12#\n\x1fMETRIC_DISPLAY_TREND_PERCENTAGE\x10\x03\x12\x36\n2METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE\x10\x04*r\n\x0fMetricTrendType\x12!\n\x1dMETRIC_TREND_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19METRIC_TREND_TYPE_REGULAR\x10\x01\x12\x1d\n\x19METRIC_TREND_TYPE_INVERSE\x10\x02*O\n\rVisualMapType\x12\x1f\n\x1bVISUAL_MAP_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nCONTINUOUS\x10\x01\x12\r\n\tPIECEWISE\x10\x02\x32\xfe\x04\n\x15\x44\x61shboardChartService\x12\xc3\x01\n\x11GetDashboardChart\x12\x33.google.cloud.chronicle.v1.GetDashboardChartRequest\x1a).google.cloud.chronicle.v1.DashboardChart\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/instances/*/dashboardCharts/*}\x12\xf1\x01\n\x17\x42\x61tchGetDashboardCharts\x12\x39.google.cloud.chronicle.v1.BatchGetDashboardChartsRequest\x1a:.google.cloud.chronicle.v1.BatchGetDashboardChartsResponse\"_\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/instances/*}/dashboardCharts:batchGet\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xca\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x13\x44\x61shboardChartProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + DashboardChart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart").msgclass + DashboardChart::ChartDatasource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.ChartDatasource").msgclass + DashboardChart::Visualization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization").msgclass + DashboardChart::Visualization::Axis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Axis").msgclass + DashboardChart::Visualization::Series = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series").msgclass + DashboardChart::Visualization::Series::Encode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode").msgclass + DashboardChart::Visualization::Series::DataLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabel").msgclass + DashboardChart::Visualization::Series::ItemStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyle").msgclass + DashboardChart::Visualization::Series::AreaStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyle").msgclass + DashboardChart::Visualization::Series::UserSelectedValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValues").msgclass + DashboardChart::Visualization::Series::ChartSliceColor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColor").msgclass + DashboardChart::Visualization::Series::ItemColors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColors").msgclass + DashboardChart::Visualization::Series::GaugeValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue").msgclass + DashboardChart::Visualization::Series::GaugeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfig").msgclass + DashboardChart::Visualization::Series::MetricTrendConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfig").msgclass + DashboardChart::Visualization::Tooltip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip").msgclass + DashboardChart::Visualization::Legend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Legend").msgclass + DashboardChart::Visualization::ColumnDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef").msgclass + DashboardChart::Visualization::ColumnRenderTypeSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettings").msgclass + DashboardChart::Visualization::ColumnTooltipSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettings").msgclass + DashboardChart::Visualization::TableConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfig").msgclass + DashboardChart::Visualization::GoogleMapsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig").msgclass + DashboardChart::Visualization::GoogleMapsConfig::DataSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettings").msgclass + DashboardChart::Visualization::GoogleMapsConfig::MapPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPosition").msgclass + DashboardChart::Visualization::GoogleMapsConfig::PointSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettings").msgclass + DashboardChart::Visualization::VisualMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap").msgclass + DashboardChart::Visualization::VisualMap::VisualMapPiece = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPiece").msgclass + DashboardChart::DrillDownConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig").msgclass + DashboardChart::DrillDownConfig::DrillDown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown").msgclass + DashboardChart::DrillDownConfig::DrillDown::DefaultDrillDownSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettings").msgclass + DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings").msgclass + DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQuery").msgclass + DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter").msgclass + DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter::DrillDownDashboardFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilter").msgclass + DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownExternalLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLink").msgclass + Button = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Button").msgclass + Button::Properties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Button.Properties").msgclass + Markdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Markdown").msgclass + Markdown::MarkdownProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Markdown.MarkdownProperties").msgclass + GetDashboardChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDashboardChartRequest").msgclass + BatchGetDashboardChartsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BatchGetDashboardChartsRequest").msgclass + BatchGetDashboardChartsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BatchGetDashboardChartsResponse").msgclass + TileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.TileType").enummodule + RenderType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RenderType").enummodule + AxisType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AxisType").enummodule + SeriesType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.SeriesType").enummodule + SeriesStackStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.SeriesStackStrategy").enummodule + ToolTipTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ToolTipTrigger").enummodule + LegendOrient = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.LegendOrient").enummodule + LegendAlign = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.LegendAlign").enummodule + ButtonStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ButtonStyle").enummodule + PlotMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.PlotMode").enummodule + PointSizeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.PointSizeType").enummodule + MetricFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.MetricFormat").enummodule + MetricDisplayTrend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.MetricDisplayTrend").enummodule + MetricTrendType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.MetricTrendType").enummodule + VisualMapType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.VisualMapType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb new file mode 100644 index 000000000000..6a8b4f84d9ac --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/dashboard_chart_service/credentials" +require "google/cloud/chronicle/v1/dashboard_chart_service/paths" +require "google/cloud/chronicle/v1/dashboard_chart_service/client" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing dashboards' charts. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/dashboard_chart_service" + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/dashboard_chart_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new + # + module DashboardChartService + end + end + end + end +end + +helper_path = ::File.join __dir__, "dashboard_chart_service", "helpers.rb" +require "google/cloud/chronicle/v1/dashboard_chart_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb new file mode 100644 index 000000000000..47581154918d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb @@ -0,0 +1,584 @@ +# 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/chronicle/v1/dashboard_chart_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardChartService + ## + # Client for the DashboardChartService service. + # + # A service providing functionality for managing dashboards' charts. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dashboard_chart_service_stub + + ## + # Configure the DashboardChartService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DashboardChartService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DashboardChartService clients + # ::Google::Cloud::Chronicle::V1::DashboardChartService::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", "Chronicle", "V1"] + 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.get_dashboard_chart.timeout = 60.0 + default_config.rpcs.get_dashboard_chart.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.batch_get_dashboard_charts.timeout = 60.0 + default_config.rpcs.batch_get_dashboard_charts.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DashboardChartService 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::Chronicle::V1::DashboardChartService::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 + @dashboard_chart_service_stub.universe_domain + end + + ## + # Create a new DashboardChartService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DashboardChartService 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/chronicle/v1/dashboard_chart_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 + + @dashboard_chart_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::DashboardChartService::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 + ) + + @dashboard_chart_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dashboard_chart_service_stub.logger + end + + # Service calls + + ## + # Get a dashboard chart. + # + # @overload get_dashboard_chart(request, options = nil) + # Pass arguments to `get_dashboard_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDashboardChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, ::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_dashboard_chart(name: nil) + # Pass arguments to `get_dashboard_chart` 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 name of the dashboardChart to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardCharts/\\{chart} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DashboardChart] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new + # + # # Call the get_dashboard_chart method. + # result = client.get_dashboard_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardChart. + # p result + # + def get_dashboard_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest + + # 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_dashboard_chart.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::Chronicle::V1::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_dashboard_chart.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dashboard_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_chart_service_stub.call_rpc :get_dashboard_chart, 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 + + ## + # Get dashboard charts in batches. + # + # @overload batch_get_dashboard_charts(request, options = nil) + # Pass arguments to `batch_get_dashboard_charts` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, ::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_get_dashboard_charts(parent: nil, names: nil) + # Pass arguments to `batch_get_dashboard_charts` 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 parent resource shared by all dashboard charts being + # retrieved. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance} If this is + # set, the parent of all of the dashboard charts specified in `names` must + # match this field. + # @param names [::Array<::String>] + # Required. The names of the dashboard charts to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new + # + # # Call the batch_get_dashboard_charts method. + # result = client.batch_get_dashboard_charts request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse. + # p result + # + def batch_get_dashboard_charts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest + + # 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_get_dashboard_charts.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::Chronicle::V1::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.batch_get_dashboard_charts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_get_dashboard_charts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_chart_service_stub.call_rpc :batch_get_dashboard_charts, 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 + + ## + # Configuration class for the DashboardChartService API. + # + # This class represents the configuration for DashboardChartService, + # 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::Chronicle::V1::DashboardChartService::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 + # # get_dashboard_chart to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_chart.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_chart.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::Chronicle::V1::DashboardChartService::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. + # * `: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 = "chronicle.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 DashboardChartService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_dashboard_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dashboard_chart + ## + # RPC-specific configuration for `batch_get_dashboard_charts` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_dashboard_charts + + # @private + def initialize parent_rpcs = nil + get_dashboard_chart_config = parent_rpcs.get_dashboard_chart if parent_rpcs.respond_to? :get_dashboard_chart + @get_dashboard_chart = ::Gapic::Config::Method.new get_dashboard_chart_config + batch_get_dashboard_charts_config = parent_rpcs.batch_get_dashboard_charts if parent_rpcs.respond_to? :batch_get_dashboard_charts + @batch_get_dashboard_charts = ::Gapic::Config::Method.new batch_get_dashboard_charts_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb new file mode 100644 index 000000000000..8c5f54e38221 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module DashboardChartService + # Credentials for the DashboardChartService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb new file mode 100644 index 000000000000..9bbfee50192d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb @@ -0,0 +1,73 @@ +# 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 Chronicle + module V1 + module DashboardChartService + # Path helper methods for the DashboardChartService API. + module Paths + ## + # Create a fully-qualified DashboardChart resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param chart [String] + # + # @return [::String] + def dashboard_chart_path project:, location:, instance:, chart: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb new file mode 100644 index 000000000000..6a4e38024078 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/dashboard_chart_service/credentials" +require "google/cloud/chronicle/v1/dashboard_chart_service/paths" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing dashboards' charts. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/dashboard_chart_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new + # + module DashboardChartService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb new file mode 100644 index 000000000000..1abece7b2fd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb @@ -0,0 +1,527 @@ +# 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/chronicle/v1/dashboard_chart_pb" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardChartService + module Rest + ## + # REST client for the DashboardChartService service. + # + # A service providing functionality for managing dashboards' charts. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dashboard_chart_service_stub + + ## + # Configure the DashboardChartService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DashboardChartService clients + # ::Google::Cloud::Chronicle::V1::DashboardChartService::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", "Chronicle", "V1"] + 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.get_dashboard_chart.timeout = 60.0 + default_config.rpcs.get_dashboard_chart.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.batch_get_dashboard_charts.timeout = 60.0 + default_config.rpcs.batch_get_dashboard_charts.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DashboardChartService 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::Chronicle::V1::DashboardChartService::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 + @dashboard_chart_service_stub.universe_domain + end + + ## + # Create a new DashboardChartService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DashboardChartService 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 + + @dashboard_chart_service_stub = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @dashboard_chart_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dashboard_chart_service_stub.logger + end + + # Service calls + + ## + # Get a dashboard chart. + # + # @overload get_dashboard_chart(request, options = nil) + # Pass arguments to `get_dashboard_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDashboardChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, ::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_dashboard_chart(name: nil) + # Pass arguments to `get_dashboard_chart` 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 name of the dashboardChart to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardCharts/\\{chart} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DashboardChart] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new + # + # # Call the get_dashboard_chart method. + # result = client.get_dashboard_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardChart. + # p result + # + def get_dashboard_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest + + # 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_dashboard_chart.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::Chronicle::V1::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_dashboard_chart.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dashboard_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_chart_service_stub.get_dashboard_chart 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 + + ## + # Get dashboard charts in batches. + # + # @overload batch_get_dashboard_charts(request, options = nil) + # Pass arguments to `batch_get_dashboard_charts` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, ::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_get_dashboard_charts(parent: nil, names: nil) + # Pass arguments to `batch_get_dashboard_charts` 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 parent resource shared by all dashboard charts being + # retrieved. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance} If this is + # set, the parent of all of the dashboard charts specified in `names` must + # match this field. + # @param names [::Array<::String>] + # Required. The names of the dashboard charts to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new + # + # # Call the batch_get_dashboard_charts method. + # result = client.batch_get_dashboard_charts request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse. + # p result + # + def batch_get_dashboard_charts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest + + # 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_get_dashboard_charts.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::Chronicle::V1::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_get_dashboard_charts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_get_dashboard_charts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_chart_service_stub.batch_get_dashboard_charts 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 + + ## + # Configuration class for the DashboardChartService REST API. + # + # This class represents the configuration for DashboardChartService 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::Chronicle::V1::DashboardChartService::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 + # # get_dashboard_chart to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_chart.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_chart.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. + # * `: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 = "chronicle.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 DashboardChartService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_dashboard_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dashboard_chart + ## + # RPC-specific configuration for `batch_get_dashboard_charts` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_dashboard_charts + + # @private + def initialize parent_rpcs = nil + get_dashboard_chart_config = parent_rpcs.get_dashboard_chart if parent_rpcs.respond_to? :get_dashboard_chart + @get_dashboard_chart = ::Gapic::Config::Method.new get_dashboard_chart_config + batch_get_dashboard_charts_config = parent_rpcs.batch_get_dashboard_charts if parent_rpcs.respond_to? :batch_get_dashboard_charts + @batch_get_dashboard_charts = ::Gapic::Config::Method.new batch_get_dashboard_charts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb new file mode 100644 index 000000000000..e79d617d732c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb @@ -0,0 +1,203 @@ +# 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/chronicle/v1/dashboard_chart_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardChartService + module Rest + ## + # REST service stub for the DashboardChartService 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 get_dashboard_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest] + # 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::Chronicle::V1::DashboardChart] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # A result object deserialized from the server's reply + def get_dashboard_chart request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dashboard_chart_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_dashboard_chart", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DashboardChart.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_get_dashboard_charts REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest] + # 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::Chronicle::V1::BatchGetDashboardChartsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] + # A result object deserialized from the server's reply + def batch_get_dashboard_charts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_dashboard_charts_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_get_dashboard_charts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse.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 get_dashboard_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest] + # 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_dashboard_chart_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dashboardCharts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_get_dashboard_charts REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest] + # 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_get_dashboard_charts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dashboardCharts:batchGet", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb new file mode 100644 index 000000000000..33780def2e31 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/dashboard_chart.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/dashboard_chart_pb' + +module Google + module Cloud + module Chronicle + module V1 + module DashboardChartService + # A service providing functionality for managing dashboards' charts. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.DashboardChartService' + + # Get a dashboard chart. + rpc :GetDashboardChart, ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, ::Google::Cloud::Chronicle::V1::DashboardChart + # Get dashboard charts in batches. + rpc :BatchGetDashboardCharts, ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb new file mode 100644 index 000000000000..25fc186ae397 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/dashboard_query.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/protobuf/any_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n/google/cloud/chronicle/v1/dashboard_query.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1agoogle/type/interval.proto\"\xb5\x05\n\x0e\x44\x61shboardQuery\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardQuery\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x05input\x18\x03 \x01(\x0b\x32/.google.cloud.chronicle.v1.DashboardQuery.InputB\x03\xe0\x41\x02\x12H\n\x0f\x64\x61shboard_chart\x18\x04 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\x12\x11\n\x04\x65tag\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x02\n\x05Input\x12,\n\x0btime_window\x18\x01 \x01(\x0b\x32\x15.google.type.IntervalH\x00\x12U\n\rrelative_time\x18\x03 \x01(\x0b\x32<.google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTimeH\x00\x1ah\n\x0cRelativeTime\x12;\n\ttime_unit\x18\x01 \x01(\x0e\x32#.google.cloud.chronicle.v1.TimeUnitB\x03\xe0\x41\x02\x12\x1b\n\x0estart_time_val\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x42\x0c\n\ntime_input:\xa6\x01\xea\x41\xa2\x01\n\'chronicle.googleapis.com/DashboardQuery\x12Uprojects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}*\x10\x64\x61shboardQueries2\x0e\x64\x61shboardQuery\"Y\n\x18GetDashboardQueryRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardQuery\"\xa0\x02\n\x1c\x45xecuteDashboardQueryRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/DashboardQuery\x12=\n\x05query\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x02\x12@\n\x07\x66ilters\x18\x03 \x03(\x0b\x32*.google.cloud.chronicle.v1.DashboardFilterB\x03\xe0\x41\x01\x12\x18\n\x0b\x63lear_cache\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17use_previous_time_range\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xd6\x05\n\x11QueryRuntimeError\x12\x13\n\x0b\x65rror_title\x18\x01 \x01(\t\x12\x19\n\x11\x65rror_description\x18\x02 \x01(\t\x12R\n\x0e\x65rror_severity\x18\x03 \x01(\x0e\x32:.google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity\x12X\n\x08metadata\x18\x04 \x03(\x0b\x32\x46.google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata\x12R\n\x0ewarning_reason\x18\x05 \x01(\x0e\x32:.google.cloud.chronicle.v1.QueryRuntimeError.WarningReason\x1aq\n\x19QueryRuntimeErrorMetadata\x12\x45\n\x03key\x18\x01 \x01(\x0e\x32\x38.google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey\x12\r\n\x05value\x18\x02 \x01(\t\"H\n\rErrorSeverity\x12\x1e\n\x1a\x45RROR_SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\n\n\x06SEVERE\x10\x02\":\n\x0bMetadataKey\x12\x1c\n\x18METADATA_KEY_UNSPECIFIED\x10\x00\x12\r\n\tROW_LIMIT\x10\x01\"\x95\x01\n\rWarningReason\x12\x1e\n\x1aWARNING_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12ROW_LIMIT_EXCEEDED\x10\x01\x12\x1e\n\x1a\x44\x45\x46\x41ULT_ROW_LIMIT_EXCEEDED\x10\x02\x12,\n(CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED\x10\x03\"\xc2\x0b\n\x1d\x45xecuteDashboardQueryResponse\x12T\n\x07results\x18\x01 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData\x12;\n\x0c\x64\x61ta_sources\x18\x03 \x03(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x12J\n!last_backend_cache_refreshed_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12*\n\x0btime_window\x18\x05 \x01(\x0b\x32\x15.google.type.Interval\x12J\n\x14query_runtime_errors\x18\x06 \x03(\x0b\x32,.google.cloud.chronicle.v1.QueryRuntimeError\x12J\n\x11language_features\x18\x07 \x03(\x0e\x32*.google.cloud.chronicle.v1.LanguageFeatureB\x03\xe0\x41\x01\x1a\xa6\x04\n\x0b\x43olumnValue\x12\x12\n\x08null_val\x18\x01 \x01(\x08H\x00\x12\x12\n\x08\x62ool_val\x18\x02 \x01(\x08H\x00\x12\x13\n\tbytes_val\x18\x03 \x01(\x0cH\x00\x12\x14\n\ndouble_val\x18\x04 \x01(\x01H\x00\x12\x13\n\tint64_val\x18\x05 \x01(\x03H\x00\x12\x14\n\nuint64_val\x18\x06 \x01(\x04H\x00\x12\x14\n\nstring_val\x18\x07 \x01(\tH\x00\x12\x33\n\rtimestamp_val\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12%\n\x08\x64\x61te_val\x18\t \x01(\x0b\x32\x11.google.type.DateH\x00\x12)\n\tproto_val\x18\n \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x64\n\x08metadata\x18\x0b \x01(\x0b\x32R.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata\x1a\x8c\x01\n\rValueMetadata\x12\x33\n\x05links\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.InAppLink\x12\x13\n\x0b\x66ield_paths\x18\x02 \x03(\t\x12\x31\n\rtimestamp_val\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x07\n\x05value\x1a\xa3\x02\n\nColumnType\x12U\n\x05value\x18\x01 \x01(\x0b\x32\x44.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValueH\x00\x12X\n\x04list\x18\x02 \x01(\x0b\x32H.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.ListH\x00\x1a\\\n\x04List\x12T\n\x06values\x18\x01 \x03(\x0b\x32\x44.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValueB\x06\n\x04type\x1a\xae\x01\n\nColumnData\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12S\n\x06values\x18\x02 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType\x12;\n\x08metadata\x18\x03 \x01(\x0b\x32).google.cloud.chronicle.v1.ColumnMetadata\"\xf4\x03\n\x0f\x44\x61shboardFilter\x12\n\n\x02id\x18\x01 \x01(\t\x12:\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x12\x12\n\nfield_path\x18\x03 \x01(\t\x12\\\n filter_operator_and_field_values\x18\x04 \x03(\x0b\x32\x32.google.cloud.chronicle.v1.FilterOperatorAndValues\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x11\n\tchart_ids\x18\x06 \x03(\t\x12*\n\x1dis_standard_time_range_filter\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cis_mandatory\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\x37\n%is_standard_time_range_filter_enabled\x18\t \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12T\n\x16\x61\x64vanced_filter_config\x18\n \x01(\x0b\x32/.google.cloud.chronicle.v1.AdvancedFilterConfigB\x03\xe0\x41\x01\x42(\n&_is_standard_time_range_filter_enabled\"s\n\x17\x46ilterOperatorAndValues\x12\x42\n\x0f\x66ilter_operator\x18\x01 \x01(\x0e\x32).google.cloud.chronicle.v1.FilterOperator\x12\x14\n\x0c\x66ield_values\x18\x02 \x03(\t\"\xc6\x05\n\x14\x41\x64vancedFilterConfig\x12\x12\n\x05token\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tseparator\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10multiple_allowed\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0e\x64\x65\x66\x61ult_values\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12!\n\x14skip_default_affixes\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12V\n\x0cvalue_source\x18\x08 \x01(\x0b\x32;.google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSourceB\x03\xe0\x41\x02\x1a\xd1\x01\n\x0bValueSource\x12\\\n\x0emanual_options\x18\x01 \x01(\x0b\x32=.google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptionsB\x03\xe0\x41\x01H\x00\x12Z\n\rquery_options\x18\x02 \x01(\x0b\x32<.google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptionsB\x03\xe0\x41\x01H\x00\x42\x08\n\x06source\x1a%\n\rManualOptions\x12\x14\n\x07options\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\xa5\x01\n\x0cQueryOptions\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x63olumn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x1aglobal_time_filter_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x05input\x18\x04 \x01(\x0b\x32/.google.cloud.chronicle.v1.DashboardQuery.InputB\x03\xe0\x41\x01\"9\n\tInAppLink\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x10\n\x08icon_url\x18\x03 \x01(\t\"\xb5\x02\n\x0e\x43olumnMetadata\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x12\n\nfield_path\x18\x02 \x01(\t\x12\x15\n\rfunction_name\x18\x03 \x01(\t\x12\x17\n\x0f\x66unction_module\x18\x04 \x01(\t\x12:\n\x0b\x64\x61ta_source\x18\x05 \x01(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x12H\n\x12timestamp_metadata\x18\x06 \x01(\x0b\x32,.google.cloud.chronicle.v1.TimestampMetadata\x12\x11\n\tlongitude\x18\x07 \x01(\x08\x12\x10\n\x08latitude\x18\x08 \x01(\x08\x12\x10\n\x08selected\x18\t \x01(\x08\x12\x12\n\nunselected\x18\n \x01(\x08\"\x83\x01\n\x11TimestampMetadata\x12\x13\n\x0btime_format\x18\x01 \x01(\t\x12\x11\n\ttime_zone\x18\x02 \x01(\t\x12\x18\n\x10time_granularity\x18\x03 \x01(\t\x12\x13\n\x0bis_sortable\x18\x04 \x01(\x08\x12\x17\n\x0fis_interpolable\x18\x05 \x01(\x08*[\n\x0fLanguageFeature\x12 \n\x1cLANGUAGE_FEATURE_UNSPECIFIED\x10\x00\x12\t\n\x05JOINS\x10\x01\x12\n\n\x06STAGES\x10\x02\x12\x0f\n\x0b\x44\x41TA_TABLES\x10\x03*\xe4\x02\n\x0e\x46ilterOperator\x12\x1f\n\x1b\x46ILTER_OPERATOR_UNSPECIFIED\x10\x00\x12\t\n\x05\x45QUAL\x10\x01\x12\r\n\tNOT_EQUAL\x10\x02\x12\x06\n\x02IN\x10\x03\x12\x10\n\x0cGREATER_THAN\x10\x04\x12\x1c\n\x18GREATER_THAN_OR_EQUAL_TO\x10\x05\x12\r\n\tLESS_THAN\x10\x06\x12\x19\n\x15LESS_THAN_OR_EQUAL_TO\x10\x07\x12\x0b\n\x07\x42\x45TWEEN\x10\x08\x12\x08\n\x04PAST\x10\t\x12\x0b\n\x07IS_NULL\x10\n\x12\x0f\n\x0bIS_NOT_NULL\x10\x0b\x12\x0f\n\x0bSTARTS_WITH\x10\x0c\x12\r\n\tENDS_WITH\x10\r\x12\x18\n\x14\x44OES_NOT_STARTS_WITH\x10\x0e\x12\x16\n\x12\x44OES_NOT_ENDS_WITH\x10\x0f\x12\n\n\x06NOT_IN\x10\x10\x12\x0c\n\x08\x43ONTAINS\x10\x11\x12\x14\n\x10\x44OES_NOT_CONTAIN\x10\x12*\x9a\x02\n\nDataSource\x12\x1b\n\x17\x44\x41TA_SOURCE_UNSPECIFIED\x10\x00\x12\x07\n\x03UDM\x10\x01\x12\n\n\x06\x45NTITY\x10\x02\x12\x15\n\x11INGESTION_METRICS\x10\x03\x12\x13\n\x0fRULE_DETECTIONS\x10\x04\x12\x0c\n\x08RULESETS\x10\x05\x12\n\n\x06GLOBAL\x10\x06\x12\x0f\n\x0bIOC_MATCHES\x10\x07\x12\t\n\x05RULES\x10\x08\x12\x0e\n\nSOAR_CASES\x10\t\x12\x12\n\x0eSOAR_PLAYBOOKS\x10\n\x12\x15\n\x11SOAR_CASE_HISTORY\x10\x0b\x12\x0e\n\nDATA_TABLE\x10\x0c\x12\x11\n\rINVESTIGATION\x10\r\x12\x1a\n\x16INVESTIGATION_FEEDBACK\x10\x0e*o\n\x08TimeUnit\x12\x19\n\x15TIME_UNIT_UNSPECIFIED\x10\x00\x12\n\n\x06SECOND\x10\x01\x12\n\n\x06MINUTE\x10\x02\x12\x08\n\x04HOUR\x10\x03\x12\x07\n\x03\x44\x41Y\x10\x04\x12\x08\n\x04WEEK\x10\x05\x12\t\n\x05MONTH\x10\x06\x12\x08\n\x04YEAR\x10\x07\x32\xfc\x04\n\x15\x44\x61shboardQueryService\x12\xc4\x01\n\x11GetDashboardQuery\x12\x33.google.cloud.chronicle.v1.GetDashboardQueryRequest\x1a).google.cloud.chronicle.v1.DashboardQuery\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dashboardQueries/*}\x12\xee\x01\n\x15\x45xecuteDashboardQuery\x12\x37.google.cloud.chronicle.v1.ExecuteDashboardQueryRequest\x1a\x38.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse\"b\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02M\"H/v1/{parent=projects/*/locations/*/instances/*}/dashboardQueries:execute:\x01*\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xca\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x13\x44\x61shboardQueryProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + DashboardQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardQuery").msgclass + DashboardQuery::Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardQuery.Input").msgclass + DashboardQuery::Input::RelativeTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTime").msgclass + GetDashboardQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDashboardQueryRequest").msgclass + ExecuteDashboardQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryRequest").msgclass + QueryRuntimeError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError").msgclass + QueryRuntimeError::QueryRuntimeErrorMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata").msgclass + QueryRuntimeError::ErrorSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity").enummodule + QueryRuntimeError::MetadataKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey").enummodule + QueryRuntimeError::WarningReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.WarningReason").enummodule + ExecuteDashboardQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse").msgclass + ExecuteDashboardQueryResponse::ColumnValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue").msgclass + ExecuteDashboardQueryResponse::ColumnValue::ValueMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata").msgclass + ExecuteDashboardQueryResponse::ColumnType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType").msgclass + ExecuteDashboardQueryResponse::ColumnType::List = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.List").msgclass + ExecuteDashboardQueryResponse::ColumnData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData").msgclass + DashboardFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardFilter").msgclass + FilterOperatorAndValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FilterOperatorAndValues").msgclass + AdvancedFilterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig").msgclass + AdvancedFilterConfig::ValueSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSource").msgclass + AdvancedFilterConfig::ManualOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptions").msgclass + AdvancedFilterConfig::QueryOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptions").msgclass + InAppLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InAppLink").msgclass + ColumnMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ColumnMetadata").msgclass + TimestampMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.TimestampMetadata").msgclass + LanguageFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.LanguageFeature").enummodule + FilterOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FilterOperator").enummodule + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataSource").enummodule + TimeUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.TimeUnit").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb new file mode 100644 index 000000000000..fea1bce2d395 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/dashboard_query_service/credentials" +require "google/cloud/chronicle/v1/dashboard_query_service/paths" +require "google/cloud/chronicle/v1/dashboard_query_service/client" +require "google/cloud/chronicle/v1/dashboard_query_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing dashboards' queries. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/dashboard_query_service" + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/dashboard_query_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + module DashboardQueryService + end + end + end + end +end + +helper_path = ::File.join __dir__, "dashboard_query_service", "helpers.rb" +require "google/cloud/chronicle/v1/dashboard_query_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb new file mode 100644 index 000000000000..75eb19e93766 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb @@ -0,0 +1,589 @@ +# 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/chronicle/v1/dashboard_query_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardQueryService + ## + # Client for the DashboardQueryService service. + # + # A service providing functionality for managing dashboards' queries. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dashboard_query_service_stub + + ## + # Configure the DashboardQueryService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DashboardQueryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DashboardQueryService clients + # ::Google::Cloud::Chronicle::V1::DashboardQueryService::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", "Chronicle", "V1"] + 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.get_dashboard_query.timeout = 60.0 + default_config.rpcs.get_dashboard_query.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.execute_dashboard_query.timeout = 1800.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::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 + @dashboard_query_service_stub.universe_domain + end + + ## + # Create a new DashboardQueryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DashboardQueryService 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/chronicle/v1/dashboard_query_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 + + @dashboard_query_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::DashboardQueryService::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 + ) + + @dashboard_query_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dashboard_query_service_stub.logger + end + + # Service calls + + ## + # Get a dashboard query. + # + # @overload get_dashboard_query(request, options = nil) + # Pass arguments to `get_dashboard_query` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, ::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_dashboard_query(name: nil) + # Pass arguments to `get_dashboard_query` 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 name of the dashboardQuery to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardQueries/\\{query} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DashboardQuery] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new + # + # # Call the get_dashboard_query method. + # result = client.get_dashboard_query request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardQuery. + # p result + # + def get_dashboard_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest + + # 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_dashboard_query.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::Chronicle::V1::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_dashboard_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dashboard_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_query_service_stub.call_rpc :get_dashboard_query, 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 + + ## + # Execute a query and return the data. + # + # @overload execute_dashboard_query(request, options = nil) + # Pass arguments to `execute_dashboard_query` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, ::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 execute_dashboard_query(parent: nil, query: nil, filters: nil, clear_cache: nil, use_previous_time_range: nil) + # Pass arguments to `execute_dashboard_query` 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 parent, under which to run this dashboardQuery. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Required. The query to execute and get results back for. + # QueryID or 'query', 'input.time_window' fields will be used. Use + # 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + # query. + # @param filters [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter, ::Hash>] + # Optional. Dashboard level filters other than query string. + # @param clear_cache [::Boolean] + # Optional. When true, the backend would read from the database, rather than + # fetching data directly from the cache. + # @param use_previous_time_range [::Boolean] + # Optional. When true, the backend will execute the query against the + # previous time range of the query. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new + # + # # Call the execute_dashboard_query method. + # result = client.execute_dashboard_query request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse. + # p result + # + def execute_dashboard_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest + + # 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.execute_dashboard_query.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::Chronicle::V1::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.execute_dashboard_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.execute_dashboard_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_query_service_stub.call_rpc :execute_dashboard_query, 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 + + ## + # Configuration class for the DashboardQueryService API. + # + # This class represents the configuration for DashboardQueryService, + # 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::Chronicle::V1::DashboardQueryService::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 + # # get_dashboard_query to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_query.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_query.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::Chronicle::V1::DashboardQueryService::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. + # * `: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 = "chronicle.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 DashboardQueryService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_dashboard_query` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dashboard_query + ## + # RPC-specific configuration for `execute_dashboard_query` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_dashboard_query + + # @private + def initialize parent_rpcs = nil + get_dashboard_query_config = parent_rpcs.get_dashboard_query if parent_rpcs.respond_to? :get_dashboard_query + @get_dashboard_query = ::Gapic::Config::Method.new get_dashboard_query_config + execute_dashboard_query_config = parent_rpcs.execute_dashboard_query if parent_rpcs.respond_to? :execute_dashboard_query + @execute_dashboard_query = ::Gapic::Config::Method.new execute_dashboard_query_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb new file mode 100644 index 000000000000..18fdc4a6bfae --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module DashboardQueryService + # Credentials for the DashboardQueryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb new file mode 100644 index 000000000000..937d3f33b4e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb @@ -0,0 +1,94 @@ +# 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 Chronicle + module V1 + module DashboardQueryService + # Path helper methods for the DashboardQueryService API. + module Paths + ## + # Create a fully-qualified DashboardChart resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param chart [String] + # + # @return [::String] + def dashboard_chart_path project:, location:, instance:, chart: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" + end + + ## + # Create a fully-qualified DashboardQuery resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param query [String] + # + # @return [::String] + def dashboard_query_path project:, location:, instance:, query: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardQueries/#{query}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb new file mode 100644 index 000000000000..7679559f64da --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/dashboard_query_service/credentials" +require "google/cloud/chronicle/v1/dashboard_query_service/paths" +require "google/cloud/chronicle/v1/dashboard_query_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing dashboards' queries. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/dashboard_query_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + module DashboardQueryService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/dashboard_query_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb new file mode 100644 index 000000000000..2653019e183b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb @@ -0,0 +1,532 @@ +# 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/chronicle/v1/dashboard_query_pb" +require "google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardQueryService + module Rest + ## + # REST client for the DashboardQueryService service. + # + # A service providing functionality for managing dashboards' queries. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dashboard_query_service_stub + + ## + # Configure the DashboardQueryService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DashboardQueryService clients + # ::Google::Cloud::Chronicle::V1::DashboardQueryService::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", "Chronicle", "V1"] + 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.get_dashboard_query.timeout = 60.0 + default_config.rpcs.get_dashboard_query.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.execute_dashboard_query.timeout = 1800.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::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 + @dashboard_query_service_stub.universe_domain + end + + ## + # Create a new DashboardQueryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DashboardQueryService 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 + + @dashboard_query_service_stub = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @dashboard_query_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dashboard_query_service_stub.logger + end + + # Service calls + + ## + # Get a dashboard query. + # + # @overload get_dashboard_query(request, options = nil) + # Pass arguments to `get_dashboard_query` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, ::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_dashboard_query(name: nil) + # Pass arguments to `get_dashboard_query` 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 name of the dashboardQuery to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardQueries/\\{query} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DashboardQuery] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new + # + # # Call the get_dashboard_query method. + # result = client.get_dashboard_query request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardQuery. + # p result + # + def get_dashboard_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest + + # 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_dashboard_query.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::Chronicle::V1::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_dashboard_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dashboard_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_query_service_stub.get_dashboard_query 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 + + ## + # Execute a query and return the data. + # + # @overload execute_dashboard_query(request, options = nil) + # Pass arguments to `execute_dashboard_query` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, ::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 execute_dashboard_query(parent: nil, query: nil, filters: nil, clear_cache: nil, use_previous_time_range: nil) + # Pass arguments to `execute_dashboard_query` 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 parent, under which to run this dashboardQuery. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Required. The query to execute and get results back for. + # QueryID or 'query', 'input.time_window' fields will be used. Use + # 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + # query. + # @param filters [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter, ::Hash>] + # Optional. Dashboard level filters other than query string. + # @param clear_cache [::Boolean] + # Optional. When true, the backend would read from the database, rather than + # fetching data directly from the cache. + # @param use_previous_time_range [::Boolean] + # Optional. When true, the backend will execute the query against the + # previous time range of the query. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new + # + # # Call the execute_dashboard_query method. + # result = client.execute_dashboard_query request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse. + # p result + # + def execute_dashboard_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest + + # 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.execute_dashboard_query.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::Chronicle::V1::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.execute_dashboard_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.execute_dashboard_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_query_service_stub.execute_dashboard_query 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 + + ## + # Configuration class for the DashboardQueryService REST API. + # + # This class represents the configuration for DashboardQueryService 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::Chronicle::V1::DashboardQueryService::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 + # # get_dashboard_query to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_query.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_query.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. + # * `: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 = "chronicle.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 DashboardQueryService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_dashboard_query` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dashboard_query + ## + # RPC-specific configuration for `execute_dashboard_query` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_dashboard_query + + # @private + def initialize parent_rpcs = nil + get_dashboard_query_config = parent_rpcs.get_dashboard_query if parent_rpcs.respond_to? :get_dashboard_query + @get_dashboard_query = ::Gapic::Config::Method.new get_dashboard_query_config + execute_dashboard_query_config = parent_rpcs.execute_dashboard_query if parent_rpcs.respond_to? :execute_dashboard_query + @execute_dashboard_query = ::Gapic::Config::Method.new execute_dashboard_query_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb new file mode 100644 index 000000000000..b58063ce1d9b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb @@ -0,0 +1,204 @@ +# 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/chronicle/v1/dashboard_query_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardQueryService + module Rest + ## + # REST service stub for the DashboardQueryService 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 get_dashboard_query REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest] + # 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::Chronicle::V1::DashboardQuery] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # A result object deserialized from the server's reply + def get_dashboard_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dashboard_query_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_dashboard_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DashboardQuery.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the execute_dashboard_query REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest] + # 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::Chronicle::V1::ExecuteDashboardQueryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] + # A result object deserialized from the server's reply + def execute_dashboard_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_execute_dashboard_query_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: "execute_dashboard_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse.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 get_dashboard_query REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest] + # 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_dashboard_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dashboardQueries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the execute_dashboard_query REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_execute_dashboard_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dashboardQueries:execute", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb new file mode 100644 index 000000000000..f96c55661d70 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/dashboard_query.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/dashboard_query_pb' + +module Google + module Cloud + module Chronicle + module V1 + module DashboardQueryService + # A service providing functionality for managing dashboards' queries. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.DashboardQueryService' + + # Get a dashboard query. + rpc :GetDashboardQuery, ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, ::Google::Cloud::Chronicle::V1::DashboardQuery + # Execute a query and return the data. + rpc :ExecuteDashboardQuery, ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb new file mode 100644 index 000000000000..cc6fd584534a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/data_access_control.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/chronicle/v1/data_access_control.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x01\n\x1c\x43reateDataAccessLabelRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12J\n\x11\x64\x61ta_access_label\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_label_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\x9b\x01\n\x1bListDataAccessLabelsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x1cListDataAccessLabelsResponse\x12\x46\n\x12\x64\x61ta_access_labels\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x1cUpdateDataAccessLabelRequest\x12J\n\x11\x64\x61ta_access_label\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\xcf\x01\n\x1c\x43reateDataAccessScopeRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12J\n\x11\x64\x61ta_access_scope\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_scope_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\x9b\x01\n\x1bListDataAccessScopesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd3\x01\n\x1cListDataAccessScopesResponse\x12\x46\n\x12\x64\x61ta_access_scopes\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScope\x12-\n global_data_access_scope_granted\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB#\n!_global_data_access_scope_granted\"\x9b\x01\n\x1cUpdateDataAccessScopeRequest\x12J\n\x11\x64\x61ta_access_scope\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\xd5\x03\n\x0f\x44\x61taAccessLabel\x12\x13\n\tudm_query\x18\x03 \x01(\tH\x00\x12;\n\x04name\x18\x01 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessLabel\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}B\x0c\n\ndefinition\"\x88\x05\n\x0f\x44\x61taAccessScope\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12\\\n\x1a\x61llowed_data_access_labels\x18\x02 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12[\n\x19\x64\x65nied_data_access_labels\x18\x03 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tallow_all\x18\n \x01(\x08\x42\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessScope\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}\"\xd0\x01\n\x18\x44\x61taAccessLabelReference\x12\x1b\n\x11\x64\x61ta_access_label\x18\x01 \x01(\tH\x00\x12\x12\n\x08log_type\x18\x02 \x01(\tH\x00\x12\x19\n\x0f\x61sset_namespace\x18\x03 \x01(\tH\x00\x12\x44\n\x0fingestion_label\x18\x04 \x01(\x0b\x32).google.cloud.chronicle.v1.IngestionLabelH\x00\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x42\x07\n\x05label\"V\n\x0eIngestionLabel\x12 \n\x13ingestion_label_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15ingestion_label_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xe6\x12\n\x18\x44\x61taAccessControlService\x12\x8a\x02\n\x15\x43reateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.CreateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8b\x01\xda\x41-parent,data_access_label,data_access_label_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels:\x11\x64\x61ta_access_label\x12\xc7\x01\n\x12GetDataAccessLabel\x12\x34.google.cloud.chronicle.v1.GetDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\xda\x01\n\x14ListDataAccessLabels\x12\x36.google.cloud.chronicle.v1.ListDataAccessLabelsRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessLabelsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels\x12\x8c\x02\n\x15UpdateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_label,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_label.name=projects/*/locations/*/instances/*/dataAccessLabels/*}:\x11\x64\x61ta_access_label\x12\xb9\x01\n\x15\x44\x65leteDataAccessLabel\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessLabelRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\x8a\x02\n\x15\x43reateDataAccessScope\x12\x37.google.cloud.chronicle.v1.CreateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8b\x01\xda\x41-parent,data_access_scope,data_access_scope_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes:\x11\x64\x61ta_access_scope\x12\xc7\x01\n\x12GetDataAccessScope\x12\x34.google.cloud.chronicle.v1.GetDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x12\xda\x01\n\x14ListDataAccessScopes\x12\x36.google.cloud.chronicle.v1.ListDataAccessScopesRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessScopesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes\x12\x8c\x02\n\x15UpdateDataAccessScope\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_scope,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_scope.name=projects/*/locations/*/instances/*/dataAccessScopes/*}:\x11\x64\x61ta_access_scope\x12\xb9\x01\n\x15\x44\x65leteDataAccessScope\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessScopeRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0f\x44\x61taAccessProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + CreateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessLabelRequest").msgclass + GetDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessLabelRequest").msgclass + ListDataAccessLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsRequest").msgclass + ListDataAccessLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsResponse").msgclass + UpdateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessLabelRequest").msgclass + DeleteDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessLabelRequest").msgclass + CreateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessScopeRequest").msgclass + GetDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessScopeRequest").msgclass + ListDataAccessScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesRequest").msgclass + ListDataAccessScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesResponse").msgclass + UpdateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessScopeRequest").msgclass + DeleteDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessScopeRequest").msgclass + DataAccessLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabel").msgclass + DataAccessScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessScope").msgclass + DataAccessLabelReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabelReference").msgclass + IngestionLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.IngestionLabel").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb new file mode 100644 index 000000000000..7001b817d96a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb @@ -0,0 +1,56 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/data_access_control_service/credentials" +require "google/cloud/chronicle/v1/data_access_control_service/paths" +require "google/cloud/chronicle/v1/data_access_control_service/client" +require "google/cloud/chronicle/v1/data_access_control_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/data_access_control_service" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/data_access_control_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + module DataAccessControlService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_access_control_service", "helpers.rb" +require "google/cloud/chronicle/v1/data_access_control_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb new file mode 100644 index 000000000000..06ae3041cf1e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb @@ -0,0 +1,1431 @@ +# 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/chronicle/v1/data_access_control_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + ## + # Client for the DataAccessControlService service. + # + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_access_control_service_stub + + ## + # Configure the DataAccessControlService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataAccessControlService clients + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] + 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_data_access_label.timeout = 60.0 + + default_config.rpcs.get_data_access_label.timeout = 60.0 + default_config.rpcs.get_data_access_label.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_labels.timeout = 60.0 + default_config.rpcs.list_data_access_labels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_label.timeout = 60.0 + + default_config.rpcs.delete_data_access_label.timeout = 60.0 + + default_config.rpcs.create_data_access_scope.timeout = 60.0 + + default_config.rpcs.get_data_access_scope.timeout = 60.0 + default_config.rpcs.get_data_access_scope.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_scopes.timeout = 60.0 + default_config.rpcs.list_data_access_scopes.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_scope.timeout = 60.0 + + default_config.rpcs.delete_data_access_scope.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 + @data_access_control_service_stub.universe_domain + end + + ## + # Create a new DataAccessControlService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataAccessControlService 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/chronicle/v1/data_access_control_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 + + @data_access_control_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::DataAccessControlService::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 + ) + + @data_access_control_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_access_control_service_stub.logger + end + + # Service calls + + ## + # Creates a data access label. + # Data access labels are applied to incoming event data and selected in data + # access scopes (another resource), and only users with scopes containing the + # label can see data with that label. Currently, the data access label + # resource only includes custom labels, which are labels that correspond + # to UDM queries over event data. + # + # @overload create_data_access_label(request, options = nil) + # Pass arguments to `create_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) + # Pass arguments to `create_data_access_label` 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 parent resource where this Data Access Label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. Data access label to create. + # @param data_access_label_id [::String] + # Required. The ID to use for the data access label, which will become the + # label's display name and the final component of the label's resource name. + # The maximum number of characters should be 63. Regex pattern is as per AIP: + # https://google.aip.dev/122#resource-id-segments + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new + # + # # Call the create_data_access_label method. + # result = client.create_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def create_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :create_data_access_label, 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 data access label. + # + # @overload get_data_access_label(request, options = nil) + # Pass arguments to `get_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::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_data_access_label(name: nil) + # Pass arguments to `get_data_access_label` 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 ID of the data access label to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new + # + # # Call the get_data_access_label method. + # result = client.get_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def get_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :get_data_access_label, 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 all data access labels for the customer. + # + # @overload list_data_access_labels(request, options = nil) + # Pass arguments to `list_data_access_labels` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_labels` 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 parent resource where this data access label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access labels to return. The service may return + # fewer than this value. If unspecified, at most 100 data access labels will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessLabelsRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessLabel and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new + # + # # Call the list_data_access_labels method. + # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. + # p item + # end + # + def list_data_access_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest + + # 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_data_access_labels.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::Chronicle::V1::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_data_access_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_access_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :list_data_access_labels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, 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 data access label. + # + # @overload update_data_access_label(request, options = nil) + # Pass arguments to `update_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::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_data_access_label(data_access_label: nil, update_mask: nil) + # Pass arguments to `update_data_access_label` 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 data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. The data access label to update. + # + # The label's `name` field is used to identify the label to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description and definition + # fields are supported for update; an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new + # + # # Call the update_data_access_label method. + # result = client.update_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def update_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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.data_access_label&.name + header_params["data_access_label.name"] = request.data_access_label.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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :update_data_access_label, 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 data access label. When a label is deleted, new + # data that enters in the system will not receive the label, but the label + # will not be removed from old data that still refers to it. + # + # @overload delete_data_access_label(request, options = nil) + # Pass arguments to `delete_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::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_data_access_label(name: nil) + # Pass arguments to `delete_data_access_label` 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 ID of the data access label to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new + # + # # Call the delete_data_access_label method. + # result = client.delete_data_access_label request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :delete_data_access_label, 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 data access scope. + # Data access scope is a combination of allowed and denied labels attached + # to a permission group. If a scope has allowed labels A and B and denied + # labels C and D, then the group of people attached to the scope + # will have permissions to see all events labeled with A or B (or both) and + # not labeled with either C or D. + # + # @overload create_data_access_scope(request, options = nil) + # Pass arguments to `create_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) + # Pass arguments to `create_data_access_scope` 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 parent resource where this Data Access Scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. Data access scope to create. + # @param data_access_scope_id [::String] + # Required. The user provided scope id which will become the last part of the + # name of the scope resource. Needs to be compliant with + # https://google.aip.dev/122 + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new + # + # # Call the create_data_access_scope method. + # result = client.create_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def create_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :create_data_access_scope, 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 + + ## + # Retrieves an existing data access scope. + # + # @overload get_data_access_scope(request, options = nil) + # Pass arguments to `get_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::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_data_access_scope(name: nil) + # Pass arguments to `get_data_access_scope` 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 ID of the data access scope to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new + # + # # Call the get_data_access_scope method. + # result = client.get_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def get_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :get_data_access_scope, 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 all existing data access scopes for the customer. + # + # @overload list_data_access_scopes(request, options = nil) + # Pass arguments to `list_data_access_scopes` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_scopes` 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 parent resource where this data access scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access scopes to return. The service may return + # fewer than this value. If unspecified, at most 100 data access scopes will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessScopesRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessScope and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new + # + # # Call the list_data_access_scopes method. + # result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. + # p item + # end + # + def list_data_access_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest + + # 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_data_access_scopes.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::Chronicle::V1::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_data_access_scopes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_access_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :list_data_access_scopes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_scopes, 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 data access scope. + # + # @overload update_data_access_scope(request, options = nil) + # Pass arguments to `update_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::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_data_access_scope(data_access_scope: nil, update_mask: nil) + # Pass arguments to `update_data_access_scope` 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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. The data access scope to update. + # + # The scope's `name` field is used to identify the scope to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description, the allowed + # and denied labels list fields are supported for update; + # an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new + # + # # Call the update_data_access_scope method. + # result = client.update_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def update_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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.data_access_scope&.name + header_params["data_access_scope.name"] = request.data_access_scope.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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :update_data_access_scope, 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 data access scope. + # + # @overload delete_data_access_scope(request, options = nil) + # Pass arguments to `delete_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::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_data_access_scope(name: nil) + # Pass arguments to `delete_data_access_scope` 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 ID of the data access scope to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new + # + # # Call the delete_data_access_scope method. + # result = client.delete_data_access_scope request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :delete_data_access_scope, 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 + + ## + # Configuration class for the DataAccessControlService API. + # + # This class represents the configuration for DataAccessControlService, + # 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::Chronicle::V1::DataAccessControlService::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_data_access_label to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.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::Chronicle::V1::DataAccessControlService::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. + # * `: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 = "chronicle.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 DataAccessControlService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_label + ## + # RPC-specific configuration for `get_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_label + ## + # RPC-specific configuration for `list_data_access_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_labels + ## + # RPC-specific configuration for `update_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_label + ## + # RPC-specific configuration for `delete_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_label + ## + # RPC-specific configuration for `create_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_scope + ## + # RPC-specific configuration for `get_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_scope + ## + # RPC-specific configuration for `list_data_access_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_scopes + ## + # RPC-specific configuration for `update_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_scope + ## + # RPC-specific configuration for `delete_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_scope + + # @private + def initialize parent_rpcs = nil + create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label + @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config + get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label + @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config + list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels + @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config + update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label + @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config + delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label + @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config + create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope + @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config + get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope + @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config + list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes + @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config + update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope + @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config + delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope + @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb new file mode 100644 index 000000000000..2e86b999c1a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + module DataAccessControlService + # Credentials for the DataAccessControlService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb new file mode 100644 index 000000000000..f3ec957a19df --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb @@ -0,0 +1,94 @@ +# 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 Chronicle + module V1 + module DataAccessControlService + # Path helper methods for the DataAccessControlService API. + module Paths + ## + # Create a fully-qualified DataAccessLabel resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_label [String] + # + # @return [::String] + def data_access_label_path project:, location:, instance:, data_access_label: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessLabels/#{data_access_label}" + end + + ## + # Create a fully-qualified DataAccessScope resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_scope [String] + # + # @return [::String] + def data_access_scope_path project:, location:, instance:, data_access_scope: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb new file mode 100644 index 000000000000..e93f75e06d2d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb @@ -0,0 +1,53 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/data_access_control_service/credentials" +require "google/cloud/chronicle/v1/data_access_control_service/paths" +require "google/cloud/chronicle/v1/data_access_control_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/data_access_control_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + module DataAccessControlService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/data_access_control_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb new file mode 100644 index 000000000000..88d1752de0f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb @@ -0,0 +1,1318 @@ +# 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/chronicle/v1/data_access_control_pb" +require "google/cloud/chronicle/v1/data_access_control_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + module Rest + ## + # REST client for the DataAccessControlService service. + # + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_access_control_service_stub + + ## + # Configure the DataAccessControlService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataAccessControlService clients + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] + 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_data_access_label.timeout = 60.0 + + default_config.rpcs.get_data_access_label.timeout = 60.0 + default_config.rpcs.get_data_access_label.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_labels.timeout = 60.0 + default_config.rpcs.list_data_access_labels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_label.timeout = 60.0 + + default_config.rpcs.delete_data_access_label.timeout = 60.0 + + default_config.rpcs.create_data_access_scope.timeout = 60.0 + + default_config.rpcs.get_data_access_scope.timeout = 60.0 + default_config.rpcs.get_data_access_scope.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_scopes.timeout = 60.0 + default_config.rpcs.list_data_access_scopes.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_scope.timeout = 60.0 + + default_config.rpcs.delete_data_access_scope.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 + @data_access_control_service_stub.universe_domain + end + + ## + # Create a new DataAccessControlService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataAccessControlService 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 + + @data_access_control_service_stub = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_access_control_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_access_control_service_stub.logger + end + + # Service calls + + ## + # Creates a data access label. + # Data access labels are applied to incoming event data and selected in data + # access scopes (another resource), and only users with scopes containing the + # label can see data with that label. Currently, the data access label + # resource only includes custom labels, which are labels that correspond + # to UDM queries over event data. + # + # @overload create_data_access_label(request, options = nil) + # Pass arguments to `create_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) + # Pass arguments to `create_data_access_label` 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 parent resource where this Data Access Label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. Data access label to create. + # @param data_access_label_id [::String] + # Required. The ID to use for the data access label, which will become the + # label's display name and the final component of the label's resource name. + # The maximum number of characters should be 63. Regex pattern is as per AIP: + # https://google.aip.dev/122#resource-id-segments + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new + # + # # Call the create_data_access_label method. + # result = client.create_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def create_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.create_data_access_label 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 data access label. + # + # @overload get_data_access_label(request, options = nil) + # Pass arguments to `get_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::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_data_access_label(name: nil) + # Pass arguments to `get_data_access_label` 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 ID of the data access label to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new + # + # # Call the get_data_access_label method. + # result = client.get_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def get_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.get_data_access_label 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 all data access labels for the customer. + # + # @overload list_data_access_labels(request, options = nil) + # Pass arguments to `list_data_access_labels` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_labels` 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 parent resource where this data access label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access labels to return. The service may return + # fewer than this value. If unspecified, at most 100 data access labels will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessLabelsRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessLabel and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new + # + # # Call the list_data_access_labels method. + # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. + # p item + # end + # + def list_data_access_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest + + # 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_data_access_labels.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::Chronicle::V1::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_data_access_labels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_access_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.list_data_access_labels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, "data_access_labels", 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 data access label. + # + # @overload update_data_access_label(request, options = nil) + # Pass arguments to `update_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::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_data_access_label(data_access_label: nil, update_mask: nil) + # Pass arguments to `update_data_access_label` 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 data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. The data access label to update. + # + # The label's `name` field is used to identify the label to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description and definition + # fields are supported for update; an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new + # + # # Call the update_data_access_label method. + # result = client.update_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def update_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.update_data_access_label 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 data access label. When a label is deleted, new + # data that enters in the system will not receive the label, but the label + # will not be removed from old data that still refers to it. + # + # @overload delete_data_access_label(request, options = nil) + # Pass arguments to `delete_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::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_data_access_label(name: nil) + # Pass arguments to `delete_data_access_label` 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 ID of the data access label to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new + # + # # Call the delete_data_access_label method. + # result = client.delete_data_access_label request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.delete_data_access_label 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 data access scope. + # Data access scope is a combination of allowed and denied labels attached + # to a permission group. If a scope has allowed labels A and B and denied + # labels C and D, then the group of people attached to the scope + # will have permissions to see all events labeled with A or B (or both) and + # not labeled with either C or D. + # + # @overload create_data_access_scope(request, options = nil) + # Pass arguments to `create_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) + # Pass arguments to `create_data_access_scope` 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 parent resource where this Data Access Scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. Data access scope to create. + # @param data_access_scope_id [::String] + # Required. The user provided scope id which will become the last part of the + # name of the scope resource. Needs to be compliant with + # https://google.aip.dev/122 + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new + # + # # Call the create_data_access_scope method. + # result = client.create_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def create_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.create_data_access_scope 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 + + ## + # Retrieves an existing data access scope. + # + # @overload get_data_access_scope(request, options = nil) + # Pass arguments to `get_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::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_data_access_scope(name: nil) + # Pass arguments to `get_data_access_scope` 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 ID of the data access scope to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new + # + # # Call the get_data_access_scope method. + # result = client.get_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def get_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.get_data_access_scope 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 all existing data access scopes for the customer. + # + # @overload list_data_access_scopes(request, options = nil) + # Pass arguments to `list_data_access_scopes` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_scopes` 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 parent resource where this data access scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access scopes to return. The service may return + # fewer than this value. If unspecified, at most 100 data access scopes will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessScopesRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessScope and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new + # + # # Call the list_data_access_scopes method. + # result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. + # p item + # end + # + def list_data_access_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest + + # 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_data_access_scopes.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::Chronicle::V1::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_data_access_scopes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_access_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.list_data_access_scopes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_scopes, "data_access_scopes", 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 data access scope. + # + # @overload update_data_access_scope(request, options = nil) + # Pass arguments to `update_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::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_data_access_scope(data_access_scope: nil, update_mask: nil) + # Pass arguments to `update_data_access_scope` 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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. The data access scope to update. + # + # The scope's `name` field is used to identify the scope to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description, the allowed + # and denied labels list fields are supported for update; + # an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new + # + # # Call the update_data_access_scope method. + # result = client.update_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def update_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.update_data_access_scope 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 data access scope. + # + # @overload delete_data_access_scope(request, options = nil) + # Pass arguments to `delete_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::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_data_access_scope(name: nil) + # Pass arguments to `delete_data_access_scope` 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 ID of the data access scope to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new + # + # # Call the delete_data_access_scope method. + # result = client.delete_data_access_scope request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.delete_data_access_scope 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 + + ## + # Configuration class for the DataAccessControlService REST API. + # + # This class represents the configuration for DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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_data_access_label to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.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. + # * `: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 = "chronicle.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 DataAccessControlService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_label + ## + # RPC-specific configuration for `get_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_label + ## + # RPC-specific configuration for `list_data_access_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_labels + ## + # RPC-specific configuration for `update_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_label + ## + # RPC-specific configuration for `delete_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_label + ## + # RPC-specific configuration for `create_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_scope + ## + # RPC-specific configuration for `get_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_scope + ## + # RPC-specific configuration for `list_data_access_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_scopes + ## + # RPC-specific configuration for `update_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_scope + ## + # RPC-specific configuration for `delete_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_scope + + # @private + def initialize parent_rpcs = nil + create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label + @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config + get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label + @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config + list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels + @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config + update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label + @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config + delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label + @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config + create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope + @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config + get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope + @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config + list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes + @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config + update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope + @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config + delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope + @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb new file mode 100644 index 000000000000..c11b9f42da29 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb @@ -0,0 +1,695 @@ +# 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/chronicle/v1/data_access_control_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + module Rest + ## + # REST service stub for the DataAccessControlService 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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] + # 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::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # A result object deserialized from the server's reply + def create_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_label_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_data_access_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] + # 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::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # A result object deserialized from the server's reply + def get_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_label_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_data_access_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_labels REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] + # 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::Chronicle::V1::ListDataAccessLabelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse] + # A result object deserialized from the server's reply + def list_data_access_labels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_labels_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_data_access_labels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] + # 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::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # A result object deserialized from the server's reply + def update_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_label_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_data_access_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] + # 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_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_label_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_data_access_label", + 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 create_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] + # 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::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # A result object deserialized from the server's reply + def create_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_scope_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_data_access_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] + # 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::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # A result object deserialized from the server's reply + def get_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_scope_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_data_access_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scopes REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] + # 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::Chronicle::V1::ListDataAccessScopesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse] + # A result object deserialized from the server's reply + def list_data_access_scopes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_scopes_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_data_access_scopes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] + # 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::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # A result object deserialized from the server's reply + def update_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_scope_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_data_access_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] + # 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_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_scope_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_data_access_scope", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the create_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataAccessLabels", + body: "data_access_label", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_access_labels REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] + # 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_data_access_labels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataAccessLabels", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_access_label.name}", + body: "data_access_label", + matches: [ + ["data_access_label.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataAccessScopes", + body: "data_access_scope", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_access_scopes REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] + # 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_data_access_scopes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataAccessScopes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_access_scope.name}", + body: "data_access_scope", + matches: [ + ["data_access_scope.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb new file mode 100644 index 000000000000..0ef90feac2fc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb @@ -0,0 +1,76 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/data_access_control.proto for package 'Google.Cloud.Chronicle.V1' +# 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/chronicle/v1/data_access_control_pb' + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + # DataAccessControlService exposes resources and endpoints related to data + # access control. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.DataAccessControlService' + + # Creates a data access label. + # Data access labels are applied to incoming event data and selected in data + # access scopes (another resource), and only users with scopes containing the + # label can see data with that label. Currently, the data access label + # resource only includes custom labels, which are labels that correspond + # to UDM queries over event data. + rpc :CreateDataAccessLabel, ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel + # Gets a data access label. + rpc :GetDataAccessLabel, ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel + # Lists all data access labels for the customer. + rpc :ListDataAccessLabels, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse + # Updates a data access label. + rpc :UpdateDataAccessLabel, ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel + # Deletes a data access label. When a label is deleted, new + # data that enters in the system will not receive the label, but the label + # will not be removed from old data that still refers to it. + rpc :DeleteDataAccessLabel, ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::Google::Protobuf::Empty + # Creates a data access scope. + # Data access scope is a combination of allowed and denied labels attached + # to a permission group. If a scope has allowed labels A and B and denied + # labels C and D, then the group of people attached to the scope + # will have permissions to see all events labeled with A or B (or both) and + # not labeled with either C or D. + rpc :CreateDataAccessScope, ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope + # Retrieves an existing data access scope. + rpc :GetDataAccessScope, ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope + # Lists all existing data access scopes for the customer. + rpc :ListDataAccessScopes, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse + # Updates a data access scope. + rpc :UpdateDataAccessScope, ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope + # Deletes a data access scope. + rpc :DeleteDataAccessScope, ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb new file mode 100644 index 000000000000..7b754fbc9e2a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/data_table.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n*google/cloud/chronicle/v1/data_table.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xaf\x01\n\x16\x43reateDataTableRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/DataTable\x12=\n\ndata_table\x18\x02 \x01(\x0b\x32$.google.cloud.chronicle.v1.DataTableB\x03\xe0\x41\x02\x12\x1a\n\rdata_table_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"O\n\x13GetDataTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/DataTable\"\x8d\x01\n\x16UpdateDataTableRequest\x12=\n\ndata_table\x18\x01 \x01(\x0b\x32$.google.cloud.chronicle.v1.DataTableB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x9b\x01\n\x15ListDataTablesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/DataTable\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\"f\n\x16\x44\x65leteDataTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/DataTable\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"l\n\x16ListDataTablesResponse\x12\x39\n\x0b\x64\x61ta_tables\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.DataTable\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa0\x01\n\x19\x43reateDataTableRowRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12\x44\n\x0e\x64\x61ta_table_row\x18\x02 \x01(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRowB\x03\xe0\x41\x02\"\x97\x01\n\x19UpdateDataTableRowRequest\x12\x44\n\x0e\x64\x61ta_table_row\x18\x01 \x01(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRowB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb6\x01\n\x18ListDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"{\n\x19ListDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"U\n\x16GetDataTableRowRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%chronicle.googleapis.com/DataTableRow\"X\n\x19\x44\x65leteDataTableRowRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%chronicle.googleapis.com/DataTableRow\"\xac\x01\n\x1e\x42ulkCreateDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.CreateDataTableRowRequestB\x03\xe0\x41\x02\"c\n\x1f\x42ulkCreateDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xa6\x01\n\x1b\x42ulkGetDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12H\n\x08requests\x18\x02 \x03(\x0b\x32\x31.google.cloud.chronicle.v1.GetDataTableRowRequestB\x03\xe0\x41\x02\"`\n\x1c\x42ulkGetDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xad\x01\n\x1f\x42ulkReplaceDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.CreateDataTableRowRequestB\x03\xe0\x41\x02\"d\n BulkReplaceDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xac\x01\n\x1e\x42ulkUpdateDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.UpdateDataTableRowRequestB\x03\xe0\x41\x02\"c\n\x1f\x42ulkUpdateDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"b\n\x12\x44\x61taTableScopeInfo\x12L\n\x12\x64\x61ta_access_scopes\x18\x01 \x03(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\x99\x06\n\tDataTable\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0b\x63olumn_info\x18\x06 \x03(\x0b\x32..google.cloud.chronicle.v1.DataTableColumnInfoB\x03\xe0\x41\x05\x12\x1c\n\x0f\x64\x61ta_table_uuid\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05rules\x18\x08 \x03(\tB\x03\xe0\x41\x03\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x1d\n\x10row_time_to_live\x18\n \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15\x61pproximate_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12\x46\n\nscope_info\x18\x0c \x01(\x0b\x32-.google.cloud.chronicle.v1.DataTableScopeInfoB\x03\xe0\x41\x01\x12L\n\rupdate_source\x18\r \x01(\x0e\x32\x30.google.cloud.chronicle.v1.DataTableUpdateSourceB\x03\xe0\x41\x03\x12\x45\n\x1crow_time_to_live_update_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x95\x01\xea\x41\x91\x01\n\"chronicle.googleapis.com/DataTable\x12Tprojects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}*\ndataTables2\tdataTable\"\x81\x03\n\x0c\x44\x61taTableRow\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x06values\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1d\n\x10row_time_to_live\x18\x05 \x01(\tB\x03\xe0\x41\x01:\xbd\x01\xea\x41\xb9\x01\n%chronicle.googleapis.com/DataTableRow\x12sprojects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}*\rdataTableRows2\x0c\x64\x61taTableRow\"\xfa\x02\n\x13\x44\x61taTableColumnInfo\x12\x1c\n\x12mapped_column_path\x18\x03 \x01(\tH\x00\x12Y\n\x0b\x63olumn_type\x18\x04 \x01(\x0e\x32\x42.google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnTypeH\x00\x12\x19\n\x0c\x63olumn_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0foriginal_column\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nkey_column\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0frepeated_values\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"j\n\x13\x44\x61taTableColumnType\x12&\n\"DATA_TABLE_COLUMN_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\t\n\x05REGEX\x10\x02\x12\x08\n\x04\x43IDR\x10\x03\x12\n\n\x06NUMBER\x10\x04\x42\x0e\n\x0cpath_or_type\"m\n\"GetDataTableOperationErrorsRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1chronicle.googleapis.com/DataTableOperationErrors\"\xb8\x02\n\x18\x44\x61taTableOperationErrors\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12&\n\nrpc_errors\x18\x03 \x03(\x0b\x32\x12.google.rpc.Status:\xe0\x01\xea\x41\xdc\x01\n1chronicle.googleapis.com/DataTableOperationErrors\x12sprojects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}*\x18\x64\x61taTableOperationErrors2\x18\x64\x61taTableOperationErrors*a\n\x15\x44\x61taTableUpdateSource\x12(\n$DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x08\n\x04RULE\x10\x02\x12\n\n\x06SEARCH\x10\x03\x32\x89\x1c\n\x10\x44\x61taTableService\x12\xdc\x01\n\x0f\x43reateDataTable\x12\x31.google.cloud.chronicle.v1.CreateDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"p\xda\x41\x1fparent,data_table,data_table_id\x82\xd3\xe4\x93\x02H\":/v1/{parent=projects/*/locations/*/instances/*}/dataTables:\ndata_table\x12\xc2\x01\n\x0eListDataTables\x12\x30.google.cloud.chronicle.v1.ListDataTablesRequest\x1a\x31.google.cloud.chronicle.v1.ListDataTablesResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/dataTables\x12\xaf\x01\n\x0cGetDataTable\x12..google.cloud.chronicle.v1.GetDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/dataTables/*}\x12\xde\x01\n\x0fUpdateDataTable\x12\x31.google.cloud.chronicle.v1.UpdateDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"r\xda\x41\x16\x64\x61ta_table,update_mask\x82\xd3\xe4\x93\x02S2E/v1/{data_table.name=projects/*/locations/*/instances/*/dataTables/*}:\ndata_table\x12\xad\x01\n\x0f\x44\x65leteDataTable\x12\x31.google.cloud.chronicle.v1.DeleteDataTableRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\nname,force\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/dataTables/*}\x12\xef\x01\n\x12\x43reateDataTableRow\x12\x34.google.cloud.chronicle.v1.CreateDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"z\xda\x41\x15parent,data_table_row\x82\xd3\xe4\x93\x02\\\"J/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:\x0e\x64\x61ta_table_row\x12\x84\x02\n\x12UpdateDataTableRow\x12\x34.google.cloud.chronicle.v1.UpdateDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"\x8e\x01\xda\x41\x1a\x64\x61ta_table_row,update_mask\x82\xd3\xe4\x93\x02k2Y/v1/{data_table_row.name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}:\x0e\x64\x61ta_table_row\x12\xdb\x01\n\x11ListDataTableRows\x12\x33.google.cloud.chronicle.v1.ListDataTableRowsRequest\x1a\x34.google.cloud.chronicle.v1.ListDataTableRowsResponse\"[\xda\x41\x06parent\x82\xd3\xe4\x93\x02L\x12J/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows\x12\xc8\x01\n\x0fGetDataTableRow\x12\x31.google.cloud.chronicle.v1.GetDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}\x12\xbd\x01\n\x12\x44\x65leteDataTableRow\x12\x34.google.cloud.chronicle.v1.DeleteDataTableRowRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*J/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}\x12\x84\x02\n\x17\x42ulkCreateDataTableRows\x12\x39.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest\x1a:.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse\"r\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02Z\"U/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkCreate:\x01*\x12\xf8\x01\n\x14\x42ulkGetDataTableRows\x12\x36.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest\x1a\x37.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse\"o\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02W\"R/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkGet:\x01*\x12\x88\x02\n\x18\x42ulkReplaceDataTableRows\x12:.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest\x1a;.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse\"s\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02[\"V/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkReplace:\x01*\x12\x84\x02\n\x17\x42ulkUpdateDataTableRows\x12\x39.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest\x1a:.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse\"r\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02Z\"U/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkUpdate:\x01*\x12\xea\x01\n\x1bGetDataTableOperationErrors\x12=.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest\x1a\x33.google.cloud.chronicle.v1.DataTableOperationErrors\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/instances/*/dataTableOperationErrors/*}\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xc5\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0e\x44\x61taTableProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + CreateDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataTableRequest").msgclass + GetDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableRequest").msgclass + UpdateDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataTableRequest").msgclass + ListDataTablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTablesRequest").msgclass + DeleteDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataTableRequest").msgclass + ListDataTablesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTablesResponse").msgclass + CreateDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataTableRowRequest").msgclass + UpdateDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataTableRowRequest").msgclass + ListDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTableRowsRequest").msgclass + ListDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTableRowsResponse").msgclass + GetDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableRowRequest").msgclass + DeleteDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataTableRowRequest").msgclass + BulkCreateDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest").msgclass + BulkCreateDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse").msgclass + BulkGetDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkGetDataTableRowsRequest").msgclass + BulkGetDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkGetDataTableRowsResponse").msgclass + BulkReplaceDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest").msgclass + BulkReplaceDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse").msgclass + BulkUpdateDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest").msgclass + BulkUpdateDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse").msgclass + DataTableScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableScopeInfo").msgclass + DataTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTable").msgclass + DataTableRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableRow").msgclass + DataTableColumnInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableColumnInfo").msgclass + DataTableColumnInfo::DataTableColumnType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType").enummodule + GetDataTableOperationErrorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest").msgclass + DataTableOperationErrors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableOperationErrors").msgclass + DataTableUpdateSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableUpdateSource").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb new file mode 100644 index 000000000000..db30ac0f8aa8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/data_table_service/credentials" +require "google/cloud/chronicle/v1/data_table_service/paths" +require "google/cloud/chronicle/v1/data_table_service/client" +require "google/cloud/chronicle/v1/data_table_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # DataTableManager provides an interface for managing data tables. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/data_table_service" + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/data_table_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + module DataTableService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_table_service", "helpers.rb" +require "google/cloud/chronicle/v1/data_table_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb new file mode 100644 index 000000000000..9575eeb78010 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb @@ -0,0 +1,1915 @@ +# 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/chronicle/v1/data_table_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DataTableService + ## + # Client for the DataTableService service. + # + # DataTableManager provides an interface for managing data tables. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_table_service_stub + + ## + # Configure the DataTableService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DataTableService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTableService clients + # ::Google::Cloud::Chronicle::V1::DataTableService::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", "Chronicle", "V1"] + 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_data_table.timeout = 600.0 + + default_config.rpcs.list_data_tables.timeout = 600.0 + default_config.rpcs.list_data_tables.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_table.timeout = 600.0 + default_config.rpcs.get_data_table.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_table.timeout = 600.0 + + default_config.rpcs.delete_data_table.timeout = 600.0 + + default_config.rpcs.create_data_table_row.timeout = 600.0 + + default_config.rpcs.update_data_table_row.timeout = 600.0 + + default_config.rpcs.list_data_table_rows.timeout = 600.0 + default_config.rpcs.list_data_table_rows.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_table_row.timeout = 600.0 + default_config.rpcs.get_data_table_row.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_data_table_row.timeout = 600.0 + + default_config.rpcs.bulk_create_data_table_rows.timeout = 600.0 + + default_config.rpcs.bulk_get_data_table_rows.timeout = 600.0 + default_config.rpcs.bulk_get_data_table_rows.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.bulk_replace_data_table_rows.timeout = 600.0 + + default_config.rpcs.bulk_update_data_table_rows.timeout = 600.0 + + default_config.rpcs.get_data_table_operation_errors.timeout = 600.0 + default_config.rpcs.get_data_table_operation_errors.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTableService 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::Chronicle::V1::DataTableService::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 + @data_table_service_stub.universe_domain + end + + ## + # Create a new DataTableService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTableService 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/chronicle/v1/data_table_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 + + @data_table_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::DataTableService::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 + ) + + @data_table_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_table_service_stub.logger + end + + # Service calls + + ## + # Create a new data table. + # + # @overload create_data_table(request, options = nil) + # Pass arguments to `create_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::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_data_table(parent: nil, data_table: nil, data_table_id: nil) + # Pass arguments to `create_data_table` 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 parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] + # Required. The data table being created. + # @param data_table_id [::String] + # Required. The ID to use for the data table. This is also the display name + # for the data table. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Must be unique and has length < 256. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new + # + # # Call the create_data_table method. + # result = client.create_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def create_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :create_data_table, 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 + + ## + # List data tables. + # + # @overload list_data_tables(request, options = nil) + # Pass arguments to `list_data_tables` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataTablesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::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_data_tables(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_data_tables` 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 parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param page_size [::Integer] + # Optional. The maximum number of data tables to return. The service may + # return fewer than this value. If unspecified, at most 100 data tables will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataTables` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to + # `ListDataTables` must match the call that provided the page + # token. + # @param order_by [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new + # + # # Call the list_data_tables method. + # result = client.list_data_tables 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::Chronicle::V1::DataTable. + # p item + # end + # + def list_data_tables request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTablesRequest + + # 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_data_tables.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::Chronicle::V1::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_data_tables.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_tables.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :list_data_tables, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_table_service_stub, :list_data_tables, 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 + + ## + # Get data table info. + # + # @overload get_data_table(request, options = nil) + # Pass arguments to `get_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::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_data_table(name: nil) + # Pass arguments to `get_data_table` 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 data table to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new + # + # # Call the get_data_table method. + # result = client.get_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def get_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :get_data_table, 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 + + ## + # Update data table. + # + # @overload update_data_table(request, options = nil) + # Pass arguments to `update_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::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_data_table(data_table: nil, update_mask: nil) + # Pass arguments to `update_data_table` 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 data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] + # Required. This field is used to identify the datatable to update. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of metadata fields to update. Currently data tables only + # support updating the `description`, `row_time_to_live` and `scope_info` + # fields. When no field mask is supplied, all non-empty fields will be + # updated. A field mask of "*" will update all fields, whether empty or not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new + # + # # Call the update_data_table method. + # result = client.update_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def update_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest + + # 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_data_table.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::Chronicle::V1::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.data_table&.name + header_params["data_table.name"] = request.data_table.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_data_table.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :update_data_table, 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 + + ## + # Delete data table. + # + # @overload delete_data_table(request, options = nil) + # Pass arguments to `delete_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::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_data_table(name: nil, force: nil) + # Pass arguments to `delete_data_table` 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 data table to delete. + # Format + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + # @param force [::Boolean] + # Optional. If set to true, any rows under this data table will also be + # deleted. (Otherwise, the request will only work if the data table has no + # rows.) + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new + # + # # Call the delete_data_table method. + # result = client.delete_data_table request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :delete_data_table, 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 + + ## + # Create a new data table row. + # + # @overload create_data_table_row(request, options = nil) + # Pass arguments to `create_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::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_data_table_row(parent: nil, data_table_row: nil) + # Pass arguments to `create_data_table_row` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] + # Required. The data table row to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new + # + # # Call the create_data_table_row method. + # result = client.create_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def create_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :create_data_table_row, 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 + + ## + # Update data table row + # + # @overload update_data_table_row(request, options = nil) + # Pass arguments to `update_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::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_data_table_row(data_table_row: nil, update_mask: nil) + # Pass arguments to `update_data_table_row` 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 data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] + # Required. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. Currently data table rows only + # support updating the `values` field. When no field mask is supplied, all + # non-empty fields will be updated. A field mask of "*" will update all + # fields, whether empty or not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new + # + # # Call the update_data_table_row method. + # result = client.update_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def update_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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.data_table_row&.name + header_params["data_table_row.name"] = request.data_table_row.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_data_table_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :update_data_table_row, 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 + + ## + # List data table rows. + # + # @overload list_data_table_rows(request, options = nil) + # Pass arguments to `list_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::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_data_table_rows(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_data_table_rows` 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 id of the data table. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @param page_size [::Integer] + # Optional. The maximum number of data table rows to return. The service may + # return fewer than this value. If unspecified, at most 100 data table rows + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataTableRows` call. + # @param order_by [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + # @param filter [::String] + # Optional. Filter facilitating search over data table rows. This filter + # performs a case-insensitive substring match on the row values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new + # + # # Call the list_data_table_rows method. + # result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. + # p item + # end + # + def list_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest + + # 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_data_table_rows.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::Chronicle::V1::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_data_table_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :list_data_table_rows, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_table_service_stub, :list_data_table_rows, 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 + + ## + # Get data table row + # + # @overload get_data_table_row(request, options = nil) + # Pass arguments to `get_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::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_data_table_row(name: nil) + # Pass arguments to `get_data_table_row` 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 data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new + # + # # Call the get_data_table_row method. + # result = client.get_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def get_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :get_data_table_row, 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 + + ## + # Delete data table row. + # + # @overload delete_data_table_row(request, options = nil) + # Pass arguments to `delete_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::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_data_table_row(name: nil) + # Pass arguments to `delete_data_table_row` 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 data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new + # + # # Call the delete_data_table_row method. + # result = client.delete_data_table_row request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :delete_data_table_row, 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 + + ## + # Create data table rows in bulk. + # + # @overload bulk_create_data_table_rows(request, options = nil) + # Pass arguments to `bulk_create_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::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 bulk_create_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_create_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] + # Required. Data table rows to create. A maximum of 1000 rows (for sync + # requests) or 2000 rows (for async requests) can be created in a single + # request. Total size of the rows should be less than 4MB. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new + # + # # Call the bulk_create_data_table_rows method. + # result = client.bulk_create_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. + # p result + # + def bulk_create_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest + + # 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.bulk_create_data_table_rows.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::Chronicle::V1::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.bulk_create_data_table_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_create_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :bulk_create_data_table_rows, 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 + + ## + # Get data table rows in bulk. + # + # @overload bulk_get_data_table_rows(request, options = nil) + # Pass arguments to `bulk_get_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::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 bulk_get_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_get_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Hash>] + # Required. Data table rows to get. At max 1,000 rows can be there in a + # request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new + # + # # Call the bulk_get_data_table_rows method. + # result = client.bulk_get_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. + # p result + # + def bulk_get_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest + + # 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.bulk_get_data_table_rows.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::Chronicle::V1::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.bulk_get_data_table_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_get_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :bulk_get_data_table_rows, 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 + + ## + # Replace all existing data table rows with new data table rows. + # + # @overload bulk_replace_data_table_rows(request, options = nil) + # Pass arguments to `bulk_replace_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::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 bulk_replace_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_replace_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] + # Required. Data table rows to replace the existing data table rows. A + # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + # can be replaced in a single request. Total size of the rows should be less + # than 4MB. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new + # + # # Call the bulk_replace_data_table_rows method. + # result = client.bulk_replace_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. + # p result + # + def bulk_replace_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest + + # 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.bulk_replace_data_table_rows.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::Chronicle::V1::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.bulk_replace_data_table_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_replace_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :bulk_replace_data_table_rows, 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 + + ## + # Update data table rows in bulk. + # + # @overload bulk_update_data_table_rows(request, options = nil) + # Pass arguments to `bulk_update_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::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 bulk_update_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_update_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Hash>] + # Required. Data table rows to update. At max 1,000 rows (or rows with size + # less than 2MB) can be there in a request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new + # + # # Call the bulk_update_data_table_rows method. + # result = client.bulk_update_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. + # p result + # + def bulk_update_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest + + # 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.bulk_update_data_table_rows.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::Chronicle::V1::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.bulk_update_data_table_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_update_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :bulk_update_data_table_rows, 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 + + ## + # Get the error for a data table operation. + # + # @overload get_data_table_operation_errors(request, options = nil) + # Pass arguments to `get_data_table_operation_errors` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::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_data_table_operation_errors(name: nil) + # Pass arguments to `get_data_table_operation_errors` 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 data table operation errors. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new + # + # # Call the get_data_table_operation_errors method. + # result = client.get_data_table_operation_errors request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. + # p result + # + def get_data_table_operation_errors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest + + # 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_data_table_operation_errors.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::Chronicle::V1::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_data_table_operation_errors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_table_operation_errors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :get_data_table_operation_errors, 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 + + ## + # Configuration class for the DataTableService API. + # + # This class represents the configuration for DataTableService, + # 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::Chronicle::V1::DataTableService::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_data_table to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DataTableService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_table.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_table.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::Chronicle::V1::DataTableService::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. + # * `: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 = "chronicle.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 DataTableService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_table + ## + # RPC-specific configuration for `list_data_tables` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_tables + ## + # RPC-specific configuration for `get_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table + ## + # RPC-specific configuration for `update_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_table + ## + # RPC-specific configuration for `delete_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_table + ## + # RPC-specific configuration for `create_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_table_row + ## + # RPC-specific configuration for `update_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_table_row + ## + # RPC-specific configuration for `list_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_table_rows + ## + # RPC-specific configuration for `get_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table_row + ## + # RPC-specific configuration for `delete_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_table_row + ## + # RPC-specific configuration for `bulk_create_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_create_data_table_rows + ## + # RPC-specific configuration for `bulk_get_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_get_data_table_rows + ## + # RPC-specific configuration for `bulk_replace_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_replace_data_table_rows + ## + # RPC-specific configuration for `bulk_update_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_update_data_table_rows + ## + # RPC-specific configuration for `get_data_table_operation_errors` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table_operation_errors + + # @private + def initialize parent_rpcs = nil + create_data_table_config = parent_rpcs.create_data_table if parent_rpcs.respond_to? :create_data_table + @create_data_table = ::Gapic::Config::Method.new create_data_table_config + list_data_tables_config = parent_rpcs.list_data_tables if parent_rpcs.respond_to? :list_data_tables + @list_data_tables = ::Gapic::Config::Method.new list_data_tables_config + get_data_table_config = parent_rpcs.get_data_table if parent_rpcs.respond_to? :get_data_table + @get_data_table = ::Gapic::Config::Method.new get_data_table_config + update_data_table_config = parent_rpcs.update_data_table if parent_rpcs.respond_to? :update_data_table + @update_data_table = ::Gapic::Config::Method.new update_data_table_config + delete_data_table_config = parent_rpcs.delete_data_table if parent_rpcs.respond_to? :delete_data_table + @delete_data_table = ::Gapic::Config::Method.new delete_data_table_config + create_data_table_row_config = parent_rpcs.create_data_table_row if parent_rpcs.respond_to? :create_data_table_row + @create_data_table_row = ::Gapic::Config::Method.new create_data_table_row_config + update_data_table_row_config = parent_rpcs.update_data_table_row if parent_rpcs.respond_to? :update_data_table_row + @update_data_table_row = ::Gapic::Config::Method.new update_data_table_row_config + list_data_table_rows_config = parent_rpcs.list_data_table_rows if parent_rpcs.respond_to? :list_data_table_rows + @list_data_table_rows = ::Gapic::Config::Method.new list_data_table_rows_config + get_data_table_row_config = parent_rpcs.get_data_table_row if parent_rpcs.respond_to? :get_data_table_row + @get_data_table_row = ::Gapic::Config::Method.new get_data_table_row_config + delete_data_table_row_config = parent_rpcs.delete_data_table_row if parent_rpcs.respond_to? :delete_data_table_row + @delete_data_table_row = ::Gapic::Config::Method.new delete_data_table_row_config + bulk_create_data_table_rows_config = parent_rpcs.bulk_create_data_table_rows if parent_rpcs.respond_to? :bulk_create_data_table_rows + @bulk_create_data_table_rows = ::Gapic::Config::Method.new bulk_create_data_table_rows_config + bulk_get_data_table_rows_config = parent_rpcs.bulk_get_data_table_rows if parent_rpcs.respond_to? :bulk_get_data_table_rows + @bulk_get_data_table_rows = ::Gapic::Config::Method.new bulk_get_data_table_rows_config + bulk_replace_data_table_rows_config = parent_rpcs.bulk_replace_data_table_rows if parent_rpcs.respond_to? :bulk_replace_data_table_rows + @bulk_replace_data_table_rows = ::Gapic::Config::Method.new bulk_replace_data_table_rows_config + bulk_update_data_table_rows_config = parent_rpcs.bulk_update_data_table_rows if parent_rpcs.respond_to? :bulk_update_data_table_rows + @bulk_update_data_table_rows = ::Gapic::Config::Method.new bulk_update_data_table_rows_config + get_data_table_operation_errors_config = parent_rpcs.get_data_table_operation_errors if parent_rpcs.respond_to? :get_data_table_operation_errors + @get_data_table_operation_errors = ::Gapic::Config::Method.new get_data_table_operation_errors_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb new file mode 100644 index 000000000000..1ed772b14e1b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module DataTableService + # Credentials for the DataTableService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb new file mode 100644 index 000000000000..9d9e63d2bcae --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb @@ -0,0 +1,138 @@ +# 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 Chronicle + module V1 + module DataTableService + # Path helper methods for the DataTableService API. + module Paths + ## + # Create a fully-qualified DataAccessScope resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_scope [String] + # + # @return [::String] + def data_access_scope_path project:, location:, instance:, data_access_scope: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" + end + + ## + # Create a fully-qualified DataTable resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_table [String] + # + # @return [::String] + def data_table_path project:, location:, instance:, data_table: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataTables/#{data_table}" + end + + ## + # Create a fully-qualified DataTableOperationErrors resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_table_operation_errors [String] + # + # @return [::String] + def data_table_operation_errors_path project:, location:, instance:, data_table_operation_errors: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataTableOperationErrors/#{data_table_operation_errors}" + end + + ## + # Create a fully-qualified DataTableRow resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_table [String] + # @param data_table_row [String] + # + # @return [::String] + def data_table_row_path project:, location:, instance:, data_table:, data_table_row: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + raise ::ArgumentError, "data_table cannot contain /" if data_table.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataTables/#{data_table}/dataTableRows/#{data_table_row}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb new file mode 100644 index 000000000000..9f355abee4eb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/data_table_service/credentials" +require "google/cloud/chronicle/v1/data_table_service/paths" +require "google/cloud/chronicle/v1/data_table_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # DataTableManager provides an interface for managing data tables. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/data_table_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + module DataTableService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/data_table_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb new file mode 100644 index 000000000000..30ed96d59257 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb @@ -0,0 +1,1767 @@ +# 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/chronicle/v1/data_table_pb" +require "google/cloud/chronicle/v1/data_table_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module DataTableService + module Rest + ## + # REST client for the DataTableService service. + # + # DataTableManager provides an interface for managing data tables. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_table_service_stub + + ## + # Configure the DataTableService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTableService clients + # ::Google::Cloud::Chronicle::V1::DataTableService::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", "Chronicle", "V1"] + 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_data_table.timeout = 600.0 + + default_config.rpcs.list_data_tables.timeout = 600.0 + default_config.rpcs.list_data_tables.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_table.timeout = 600.0 + default_config.rpcs.get_data_table.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_table.timeout = 600.0 + + default_config.rpcs.delete_data_table.timeout = 600.0 + + default_config.rpcs.create_data_table_row.timeout = 600.0 + + default_config.rpcs.update_data_table_row.timeout = 600.0 + + default_config.rpcs.list_data_table_rows.timeout = 600.0 + default_config.rpcs.list_data_table_rows.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_table_row.timeout = 600.0 + default_config.rpcs.get_data_table_row.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_data_table_row.timeout = 600.0 + + default_config.rpcs.bulk_create_data_table_rows.timeout = 600.0 + + default_config.rpcs.bulk_get_data_table_rows.timeout = 600.0 + default_config.rpcs.bulk_get_data_table_rows.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.bulk_replace_data_table_rows.timeout = 600.0 + + default_config.rpcs.bulk_update_data_table_rows.timeout = 600.0 + + default_config.rpcs.get_data_table_operation_errors.timeout = 600.0 + default_config.rpcs.get_data_table_operation_errors.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTableService 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::Chronicle::V1::DataTableService::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 + @data_table_service_stub.universe_domain + end + + ## + # Create a new DataTableService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTableService 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 + + @data_table_service_stub = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_table_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_table_service_stub.logger + end + + # Service calls + + ## + # Create a new data table. + # + # @overload create_data_table(request, options = nil) + # Pass arguments to `create_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::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_data_table(parent: nil, data_table: nil, data_table_id: nil) + # Pass arguments to `create_data_table` 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 parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] + # Required. The data table being created. + # @param data_table_id [::String] + # Required. The ID to use for the data table. This is also the display name + # for the data table. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Must be unique and has length < 256. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new + # + # # Call the create_data_table method. + # result = client.create_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def create_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.create_data_table 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 + + ## + # List data tables. + # + # @overload list_data_tables(request, options = nil) + # Pass arguments to `list_data_tables` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataTablesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::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_data_tables(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_data_tables` 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 parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param page_size [::Integer] + # Optional. The maximum number of data tables to return. The service may + # return fewer than this value. If unspecified, at most 100 data tables will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataTables` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to + # `ListDataTables` must match the call that provided the page + # token. + # @param order_by [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new + # + # # Call the list_data_tables method. + # result = client.list_data_tables 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::Chronicle::V1::DataTable. + # p item + # end + # + def list_data_tables request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTablesRequest + + # 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_data_tables.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::Chronicle::V1::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_data_tables.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_tables.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.list_data_tables request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_table_service_stub, :list_data_tables, "data_tables", 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 + + ## + # Get data table info. + # + # @overload get_data_table(request, options = nil) + # Pass arguments to `get_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::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_data_table(name: nil) + # Pass arguments to `get_data_table` 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 data table to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new + # + # # Call the get_data_table method. + # result = client.get_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def get_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.get_data_table 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 + + ## + # Update data table. + # + # @overload update_data_table(request, options = nil) + # Pass arguments to `update_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::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_data_table(data_table: nil, update_mask: nil) + # Pass arguments to `update_data_table` 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 data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] + # Required. This field is used to identify the datatable to update. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of metadata fields to update. Currently data tables only + # support updating the `description`, `row_time_to_live` and `scope_info` + # fields. When no field mask is supplied, all non-empty fields will be + # updated. A field mask of "*" will update all fields, whether empty or not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new + # + # # Call the update_data_table method. + # result = client.update_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def update_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.update_data_table 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 + + ## + # Delete data table. + # + # @overload delete_data_table(request, options = nil) + # Pass arguments to `delete_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::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_data_table(name: nil, force: nil) + # Pass arguments to `delete_data_table` 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 data table to delete. + # Format + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + # @param force [::Boolean] + # Optional. If set to true, any rows under this data table will also be + # deleted. (Otherwise, the request will only work if the data table has no + # rows.) + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new + # + # # Call the delete_data_table method. + # result = client.delete_data_table request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.delete_data_table 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 + + ## + # Create a new data table row. + # + # @overload create_data_table_row(request, options = nil) + # Pass arguments to `create_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::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_data_table_row(parent: nil, data_table_row: nil) + # Pass arguments to `create_data_table_row` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] + # Required. The data table row to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new + # + # # Call the create_data_table_row method. + # result = client.create_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def create_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.create_data_table_row 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 + + ## + # Update data table row + # + # @overload update_data_table_row(request, options = nil) + # Pass arguments to `update_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::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_data_table_row(data_table_row: nil, update_mask: nil) + # Pass arguments to `update_data_table_row` 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 data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] + # Required. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. Currently data table rows only + # support updating the `values` field. When no field mask is supplied, all + # non-empty fields will be updated. A field mask of "*" will update all + # fields, whether empty or not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new + # + # # Call the update_data_table_row method. + # result = client.update_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def update_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.update_data_table_row 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 + + ## + # List data table rows. + # + # @overload list_data_table_rows(request, options = nil) + # Pass arguments to `list_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::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_data_table_rows(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_data_table_rows` 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 id of the data table. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @param page_size [::Integer] + # Optional. The maximum number of data table rows to return. The service may + # return fewer than this value. If unspecified, at most 100 data table rows + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataTableRows` call. + # @param order_by [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + # @param filter [::String] + # Optional. Filter facilitating search over data table rows. This filter + # performs a case-insensitive substring match on the row values. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new + # + # # Call the list_data_table_rows method. + # result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. + # p item + # end + # + def list_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest + + # 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_data_table_rows.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::Chronicle::V1::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_data_table_rows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.list_data_table_rows request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_table_service_stub, :list_data_table_rows, "data_table_rows", 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 + + ## + # Get data table row + # + # @overload get_data_table_row(request, options = nil) + # Pass arguments to `get_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::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_data_table_row(name: nil) + # Pass arguments to `get_data_table_row` 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 data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new + # + # # Call the get_data_table_row method. + # result = client.get_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def get_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.get_data_table_row 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 + + ## + # Delete data table row. + # + # @overload delete_data_table_row(request, options = nil) + # Pass arguments to `delete_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::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_data_table_row(name: nil) + # Pass arguments to `delete_data_table_row` 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 data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new + # + # # Call the delete_data_table_row method. + # result = client.delete_data_table_row request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.delete_data_table_row 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 + + ## + # Create data table rows in bulk. + # + # @overload bulk_create_data_table_rows(request, options = nil) + # Pass arguments to `bulk_create_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::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 bulk_create_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_create_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] + # Required. Data table rows to create. A maximum of 1000 rows (for sync + # requests) or 2000 rows (for async requests) can be created in a single + # request. Total size of the rows should be less than 4MB. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new + # + # # Call the bulk_create_data_table_rows method. + # result = client.bulk_create_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. + # p result + # + def bulk_create_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest + + # 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.bulk_create_data_table_rows.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::Chronicle::V1::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.bulk_create_data_table_rows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_create_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.bulk_create_data_table_rows 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 + + ## + # Get data table rows in bulk. + # + # @overload bulk_get_data_table_rows(request, options = nil) + # Pass arguments to `bulk_get_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::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 bulk_get_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_get_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Hash>] + # Required. Data table rows to get. At max 1,000 rows can be there in a + # request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new + # + # # Call the bulk_get_data_table_rows method. + # result = client.bulk_get_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. + # p result + # + def bulk_get_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest + + # 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.bulk_get_data_table_rows.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::Chronicle::V1::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.bulk_get_data_table_rows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_get_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.bulk_get_data_table_rows 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 + + ## + # Replace all existing data table rows with new data table rows. + # + # @overload bulk_replace_data_table_rows(request, options = nil) + # Pass arguments to `bulk_replace_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::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 bulk_replace_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_replace_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] + # Required. Data table rows to replace the existing data table rows. A + # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + # can be replaced in a single request. Total size of the rows should be less + # than 4MB. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new + # + # # Call the bulk_replace_data_table_rows method. + # result = client.bulk_replace_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. + # p result + # + def bulk_replace_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest + + # 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.bulk_replace_data_table_rows.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::Chronicle::V1::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.bulk_replace_data_table_rows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_replace_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.bulk_replace_data_table_rows 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 + + ## + # Update data table rows in bulk. + # + # @overload bulk_update_data_table_rows(request, options = nil) + # Pass arguments to `bulk_update_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::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 bulk_update_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_update_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Hash>] + # Required. Data table rows to update. At max 1,000 rows (or rows with size + # less than 2MB) can be there in a request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new + # + # # Call the bulk_update_data_table_rows method. + # result = client.bulk_update_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. + # p result + # + def bulk_update_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest + + # 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.bulk_update_data_table_rows.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::Chronicle::V1::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.bulk_update_data_table_rows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_update_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.bulk_update_data_table_rows 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 + + ## + # Get the error for a data table operation. + # + # @overload get_data_table_operation_errors(request, options = nil) + # Pass arguments to `get_data_table_operation_errors` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::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_data_table_operation_errors(name: nil) + # Pass arguments to `get_data_table_operation_errors` 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 data table operation errors. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new + # + # # Call the get_data_table_operation_errors method. + # result = client.get_data_table_operation_errors request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. + # p result + # + def get_data_table_operation_errors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest + + # 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_data_table_operation_errors.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::Chronicle::V1::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_data_table_operation_errors.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_table_operation_errors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.get_data_table_operation_errors 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 + + ## + # Configuration class for the DataTableService REST API. + # + # This class represents the configuration for DataTableService 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::Chronicle::V1::DataTableService::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_data_table to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_table.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_table.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. + # * `: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 = "chronicle.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 DataTableService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_table + ## + # RPC-specific configuration for `list_data_tables` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_tables + ## + # RPC-specific configuration for `get_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table + ## + # RPC-specific configuration for `update_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_table + ## + # RPC-specific configuration for `delete_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_table + ## + # RPC-specific configuration for `create_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_table_row + ## + # RPC-specific configuration for `update_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_table_row + ## + # RPC-specific configuration for `list_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_table_rows + ## + # RPC-specific configuration for `get_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table_row + ## + # RPC-specific configuration for `delete_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_table_row + ## + # RPC-specific configuration for `bulk_create_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_create_data_table_rows + ## + # RPC-specific configuration for `bulk_get_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_get_data_table_rows + ## + # RPC-specific configuration for `bulk_replace_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_replace_data_table_rows + ## + # RPC-specific configuration for `bulk_update_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_update_data_table_rows + ## + # RPC-specific configuration for `get_data_table_operation_errors` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table_operation_errors + + # @private + def initialize parent_rpcs = nil + create_data_table_config = parent_rpcs.create_data_table if parent_rpcs.respond_to? :create_data_table + @create_data_table = ::Gapic::Config::Method.new create_data_table_config + list_data_tables_config = parent_rpcs.list_data_tables if parent_rpcs.respond_to? :list_data_tables + @list_data_tables = ::Gapic::Config::Method.new list_data_tables_config + get_data_table_config = parent_rpcs.get_data_table if parent_rpcs.respond_to? :get_data_table + @get_data_table = ::Gapic::Config::Method.new get_data_table_config + update_data_table_config = parent_rpcs.update_data_table if parent_rpcs.respond_to? :update_data_table + @update_data_table = ::Gapic::Config::Method.new update_data_table_config + delete_data_table_config = parent_rpcs.delete_data_table if parent_rpcs.respond_to? :delete_data_table + @delete_data_table = ::Gapic::Config::Method.new delete_data_table_config + create_data_table_row_config = parent_rpcs.create_data_table_row if parent_rpcs.respond_to? :create_data_table_row + @create_data_table_row = ::Gapic::Config::Method.new create_data_table_row_config + update_data_table_row_config = parent_rpcs.update_data_table_row if parent_rpcs.respond_to? :update_data_table_row + @update_data_table_row = ::Gapic::Config::Method.new update_data_table_row_config + list_data_table_rows_config = parent_rpcs.list_data_table_rows if parent_rpcs.respond_to? :list_data_table_rows + @list_data_table_rows = ::Gapic::Config::Method.new list_data_table_rows_config + get_data_table_row_config = parent_rpcs.get_data_table_row if parent_rpcs.respond_to? :get_data_table_row + @get_data_table_row = ::Gapic::Config::Method.new get_data_table_row_config + delete_data_table_row_config = parent_rpcs.delete_data_table_row if parent_rpcs.respond_to? :delete_data_table_row + @delete_data_table_row = ::Gapic::Config::Method.new delete_data_table_row_config + bulk_create_data_table_rows_config = parent_rpcs.bulk_create_data_table_rows if parent_rpcs.respond_to? :bulk_create_data_table_rows + @bulk_create_data_table_rows = ::Gapic::Config::Method.new bulk_create_data_table_rows_config + bulk_get_data_table_rows_config = parent_rpcs.bulk_get_data_table_rows if parent_rpcs.respond_to? :bulk_get_data_table_rows + @bulk_get_data_table_rows = ::Gapic::Config::Method.new bulk_get_data_table_rows_config + bulk_replace_data_table_rows_config = parent_rpcs.bulk_replace_data_table_rows if parent_rpcs.respond_to? :bulk_replace_data_table_rows + @bulk_replace_data_table_rows = ::Gapic::Config::Method.new bulk_replace_data_table_rows_config + bulk_update_data_table_rows_config = parent_rpcs.bulk_update_data_table_rows if parent_rpcs.respond_to? :bulk_update_data_table_rows + @bulk_update_data_table_rows = ::Gapic::Config::Method.new bulk_update_data_table_rows_config + get_data_table_operation_errors_config = parent_rpcs.get_data_table_operation_errors if parent_rpcs.respond_to? :get_data_table_operation_errors + @get_data_table_operation_errors = ::Gapic::Config::Method.new get_data_table_operation_errors_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb new file mode 100644 index 000000000000..110794e9d528 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb @@ -0,0 +1,1004 @@ +# 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/chronicle/v1/data_table_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DataTableService + module Rest + ## + # REST service stub for the DataTableService 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_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRequest] + # 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::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # A result object deserialized from the server's reply + def create_data_table request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_table_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_data_table", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_tables REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTablesRequest] + # 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::Chronicle::V1::ListDataTablesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListDataTablesResponse] + # A result object deserialized from the server's reply + def list_data_tables request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_tables_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_data_tables", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.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_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRequest] + # 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::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # A result object deserialized from the server's reply + def get_data_table request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_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_data_table", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest] + # 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::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # A result object deserialized from the server's reply + def update_data_table request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_table_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_data_table", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest] + # 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_data_table request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_table_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_data_table", + 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 create_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest] + # 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::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # A result object deserialized from the server's reply + def create_data_table_row request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_table_row_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_data_table_row", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest] + # 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::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # A result object deserialized from the server's reply + def update_data_table_row request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_table_row_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_data_table_row", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest] + # 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::Chronicle::V1::ListDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse] + # A result object deserialized from the server's reply + def list_data_table_rows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_table_rows_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_data_table_rows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.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_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest] + # 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::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # A result object deserialized from the server's reply + def get_data_table_row request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_row_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_data_table_row", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest] + # 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_data_table_row request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_table_row_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_data_table_row", + 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 bulk_create_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest] + # 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::Chronicle::V1::BulkCreateDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] + # A result object deserialized from the server's reply + def bulk_create_data_table_rows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_create_data_table_rows_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: "bulk_create_data_table_rows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the bulk_get_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest] + # 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::Chronicle::V1::BulkGetDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] + # A result object deserialized from the server's reply + def bulk_get_data_table_rows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_get_data_table_rows_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: "bulk_get_data_table_rows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the bulk_replace_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest] + # 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::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # A result object deserialized from the server's reply + def bulk_replace_data_table_rows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_replace_data_table_rows_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: "bulk_replace_data_table_rows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the bulk_update_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest] + # 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::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # A result object deserialized from the server's reply + def bulk_update_data_table_rows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_update_data_table_rows_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: "bulk_update_data_table_rows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.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_data_table_operation_errors REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest] + # 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::Chronicle::V1::DataTableOperationErrors] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] + # A result object deserialized from the server's reply + def get_data_table_operation_errors request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_operation_errors_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_data_table_operation_errors", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.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_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRequest] + # 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_data_table_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTables", + body: "data_table", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_tables REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTablesRequest] + # 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_data_tables_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataTables", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRequest] + # 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_data_table_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest] + # 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_data_table_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_table.name}", + body: "data_table", + matches: [ + ["data_table.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest] + # 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_data_table_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest] + # 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_data_table_row_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTableRows", + body: "data_table_row", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest] + # 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_data_table_row_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_table_row.name}", + body: "data_table_row", + matches: [ + ["data_table_row.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest] + # 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_data_table_rows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataTableRows", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest] + # 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_data_table_row_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest] + # 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_data_table_row_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_create_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_create_data_table_rows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTableRows:bulkCreate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_get_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_get_data_table_rows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTableRows:bulkGet", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_replace_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_replace_data_table_rows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTableRows:bulkReplace", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_update_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_update_data_table_rows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTableRows:bulkUpdate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_table_operation_errors REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest] + # 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_data_table_operation_errors_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTableOperationErrors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb new file mode 100644 index 000000000000..39896c092027 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb @@ -0,0 +1,73 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/data_table.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/data_table_pb' + +module Google + module Cloud + module Chronicle + module V1 + module DataTableService + # DataTableManager provides an interface for managing data tables. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.DataTableService' + + # Create a new data table. + rpc :CreateDataTable, ::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable + # List data tables. + rpc :ListDataTables, ::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::Google::Cloud::Chronicle::V1::ListDataTablesResponse + # Get data table info. + rpc :GetDataTable, ::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable + # Update data table. + rpc :UpdateDataTable, ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable + # Delete data table. + rpc :DeleteDataTable, ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::Google::Protobuf::Empty + # Create a new data table row. + rpc :CreateDataTableRow, ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow + # Update data table row + rpc :UpdateDataTableRow, ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow + # List data table rows. + rpc :ListDataTableRows, ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse + # Get data table row + rpc :GetDataTableRow, ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow + # Delete data table row. + rpc :DeleteDataTableRow, ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::Google::Protobuf::Empty + # Create data table rows in bulk. + rpc :BulkCreateDataTableRows, ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse + # Get data table rows in bulk. + rpc :BulkGetDataTableRows, ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse + # Replace all existing data table rows with new data table rows. + rpc :BulkReplaceDataTableRows, ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse + # Update data table rows in bulk. + rpc :BulkUpdateDataTableRows, ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse + # Get the error for a data table operation. + rpc :GetDataTableOperationErrors, ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::Google::Cloud::Chronicle::V1::DataTableOperationErrors + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb new file mode 100644 index 000000000000..80fdf542b870 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/entity.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/chronicle/v1/entity.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\x06\n\tWatchlist\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12multiplying_factor\x18\x05 \x01(\x02\x42\x03\xe0\x41\x01\x12h\n\x1b\x65ntity_population_mechanism\x18\x06 \x01(\x0b\x32>.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanismB\x03\xe0\x41\x02\x12K\n\x0c\x65ntity_count\x18\x07 \x01(\x0b\x32\x30.google.cloud.chronicle.v1.Watchlist.EntityCountB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\\\n\x1awatchlist_user_preferences\x18\n \x01(\x0b\x32\x33.google.cloud.chronicle.v1.WatchlistUserPreferencesB\x03\xe0\x41\x01\x1a\x90\x01\n\x19\x45ntityPopulationMechanism\x12\\\n\x06manual\x18\x01 \x01(\x0b\x32\x45.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.ManualB\x03\xe0\x41\x01H\x00\x1a\x08\n\x06ManualB\x0b\n\tmechanism\x1a\x34\n\x0b\x45ntityCount\x12\x11\n\x04user\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x12\n\x05\x61sset\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03:\x94\x01\xea\x41\x90\x01\n\"chronicle.googleapis.com/Watchlist\x12Sprojects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}*\nwatchlists2\twatchlist\"/\n\x18WatchlistUserPreferences\x12\x13\n\x06pinned\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x13GetWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\"\x99\x01\n\x15ListWatchlistsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"u\n\x16ListWatchlistsResponse\x12=\n\nwatchlists\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n\x16\x43reateWatchlistRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\x12\x19\n\x0cwatchlist_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12<\n\twatchlist\x18\x03 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\"\x8c\x01\n\x16UpdateWatchlistRequest\x12<\n\twatchlist\x18\x01 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x16\x44\x65leteWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x32\xbe\x08\n\rEntityService\x12\xaf\x01\n\x0cGetWatchlist\x12..google.cloud.chronicle.v1.GetWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x12\xc2\x01\n\x0eListWatchlists\x12\x30.google.cloud.chronicle.v1.ListWatchlistsRequest\x1a\x31.google.cloud.chronicle.v1.ListWatchlistsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/watchlists\x12\xd9\x01\n\x0f\x43reateWatchlist\x12\x31.google.cloud.chronicle.v1.CreateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"m\xda\x41\x1dparent,watchlist,watchlist_id\x82\xd3\xe4\x93\x02G\":/v1/{parent=projects/*/locations/*/instances/*}/watchlists:\twatchlist\x12\xdb\x01\n\x0fUpdateWatchlist\x12\x31.google.cloud.chronicle.v1.UpdateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"o\xda\x41\x15watchlist,update_mask\x82\xd3\xe4\x93\x02Q2D/v1/{watchlist.name=projects/*/locations/*/instances/*/watchlists/*}:\twatchlist\x12\xad\x01\n\x0f\x44\x65leteWatchlist\x12\x31.google.cloud.chronicle.v1.DeleteWatchlistRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\nname,force\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc2\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0b\x45ntityProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + Watchlist = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist").msgclass + Watchlist::EntityPopulationMechanism = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism").msgclass + Watchlist::EntityPopulationMechanism::Manual = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual").msgclass + Watchlist::EntityCount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityCount").msgclass + WatchlistUserPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.WatchlistUserPreferences").msgclass + GetWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetWatchlistRequest").msgclass + ListWatchlistsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsRequest").msgclass + ListWatchlistsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsResponse").msgclass + CreateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateWatchlistRequest").msgclass + UpdateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateWatchlistRequest").msgclass + DeleteWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteWatchlistRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb new file mode 100644 index 000000000000..5dd703d38f49 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/entity_service/credentials" +require "google/cloud/chronicle/v1/entity_service/paths" +require "google/cloud/chronicle/v1/entity_service/client" +require "google/cloud/chronicle/v1/entity_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # EntityService contains apis for finding entities. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/entity_service" + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/entity_service/rest" + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + module EntityService + end + end + end + end +end + +helper_path = ::File.join __dir__, "entity_service", "helpers.rb" +require "google/cloud/chronicle/v1/entity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb new file mode 100644 index 000000000000..58bdcbe09913 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb @@ -0,0 +1,908 @@ +# 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/chronicle/v1/entity_pb" + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + ## + # Client for the EntityService service. + # + # EntityService contains apis for finding entities. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :entity_service_stub + + ## + # Configure the EntityService Client class. + # + # See {::Google::Cloud::Chronicle::V1::EntityService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EntityService clients + # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] + 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.get_watchlist.timeout = 90.0 + default_config.rpcs.get_watchlist.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_watchlists.timeout = 90.0 + default_config.rpcs.list_watchlists.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_watchlist.timeout = 90.0 + + default_config.rpcs.update_watchlist.timeout = 90.0 + + default_config.rpcs.delete_watchlist.timeout = 90.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EntityService 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::Chronicle::V1::EntityService::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 + @entity_service_stub.universe_domain + end + + ## + # Create a new EntityService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EntityService 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/chronicle/v1/entity_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 + + @entity_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::EntityService::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 + ) + + @entity_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @entity_service_stub.logger + end + + # Service calls + + ## + # Gets watchlist details for the given watchlist ID. + # + # @overload get_watchlist(request, options = nil) + # Pass arguments to `get_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::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_watchlist(name: nil) + # Pass arguments to `get_watchlist` 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 parent, which owns this collection of watchlists. + # The name of the watchlist to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new + # + # # Call the get_watchlist method. + # result = client.get_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def get_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :get_watchlist, 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 all watchlists for the given instance. + # + # @overload list_watchlists(request, options = nil) + # Pass arguments to `list_watchlists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_watchlists` 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 parent, which owns this collection of watchlists. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # Optional. The maximum number of watchlists to return. + # The service may return fewer than this value. + # If unspecified, at most 200 watchlists will be returned. + # The maximum value is 200; values above 200 will be coerced to 200. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListWatchlists` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListWatchlists` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Which watchlist to return in aip.dev/160 form. + # Currently, only the following filters are supported: + # - `watchlist_user_preferences.pinned=true` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new + # + # # Call the list_watchlists method. + # result = client.list_watchlists 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::Chronicle::V1::Watchlist. + # p item + # end + # + def list_watchlists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest + + # 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_watchlists.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::Chronicle::V1::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_watchlists.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_watchlists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :list_watchlists, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @entity_service_stub, :list_watchlists, 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 + + ## + # Creates a watchlist for the given instance. + # Note that there can be at most 200 watchlists per instance. + # + # @overload create_watchlist(request, options = nil) + # Pass arguments to `create_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) + # Pass arguments to `create_watchlist` 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 parent resource where this watchlist will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param watchlist_id [::String] + # Optional. The ID to use for the watchlist, + # which will become the final component of the watchlist's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new + # + # # Call the create_watchlist method. + # result = client.create_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def create_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :create_watchlist, 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 + + ## + # Updates the watchlist for the given instance. + # + # @overload update_watchlist(request, options = nil) + # Pass arguments to `update_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::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_watchlist(watchlist: nil, update_mask: nil) + # Pass arguments to `update_watchlist` 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 watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to update. + # + # The watchlist's `name` field is used to identify the watchlist to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new + # + # # Call the update_watchlist method. + # result = client.update_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def update_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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.watchlist&.name + header_params["watchlist.name"] = request.watchlist.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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :update_watchlist, 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 the watchlist for the given instance. + # + # @overload delete_watchlist(request, options = nil) + # Pass arguments to `delete_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::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_watchlist(name: nil, force: nil) + # Pass arguments to `delete_watchlist` 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 name of the watchlist to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param force [::Boolean] + # Optional. If set to true, any entities under this watchlist will also be + # deleted. (Otherwise, the request will only work if the watchlist has no + # entities.) + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new + # + # # Call the delete_watchlist method. + # result = client.delete_watchlist request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :delete_watchlist, 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 + + ## + # Configuration class for the EntityService API. + # + # This class represents the configuration for EntityService, + # 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::Chronicle::V1::EntityService::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 + # # get_watchlist to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::EntityService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.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::Chronicle::V1::EntityService::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. + # * `: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 = "chronicle.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 EntityService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :get_watchlist + ## + # RPC-specific configuration for `list_watchlists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_watchlists + ## + # RPC-specific configuration for `create_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :create_watchlist + ## + # RPC-specific configuration for `update_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :update_watchlist + ## + # RPC-specific configuration for `delete_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_watchlist + + # @private + def initialize parent_rpcs = nil + get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist + @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config + list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists + @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config + create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist + @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config + update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist + @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config + delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist + @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb new file mode 100644 index 000000000000..d22648b53244 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + module EntityService + # Credentials for the EntityService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb new file mode 100644 index 000000000000..21433575930f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb @@ -0,0 +1,73 @@ +# 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 Chronicle + module V1 + module EntityService + # Path helper methods for the EntityService API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified Watchlist resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param watchlist [String] + # + # @return [::String] + def watchlist_path project:, location:, instance:, watchlist: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/watchlists/#{watchlist}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb new file mode 100644 index 000000000000..5e1f8b48cf66 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/entity_service/credentials" +require "google/cloud/chronicle/v1/entity_service/paths" +require "google/cloud/chronicle/v1/entity_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # EntityService contains apis for finding entities. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/entity_service/rest" + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + module EntityService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/entity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb new file mode 100644 index 000000000000..fc82038f4319 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb @@ -0,0 +1,830 @@ +# 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/chronicle/v1/entity_pb" +require "google/cloud/chronicle/v1/entity_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + module Rest + ## + # REST client for the EntityService service. + # + # EntityService contains apis for finding entities. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :entity_service_stub + + ## + # Configure the EntityService Client class. + # + # See {::Google::Cloud::Chronicle::V1::EntityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EntityService clients + # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] + 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.get_watchlist.timeout = 90.0 + default_config.rpcs.get_watchlist.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_watchlists.timeout = 90.0 + default_config.rpcs.list_watchlists.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_watchlist.timeout = 90.0 + + default_config.rpcs.update_watchlist.timeout = 90.0 + + default_config.rpcs.delete_watchlist.timeout = 90.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EntityService 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::Chronicle::V1::EntityService::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 + @entity_service_stub.universe_domain + end + + ## + # Create a new EntityService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EntityService 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 + + @entity_service_stub = ::Google::Cloud::Chronicle::V1::EntityService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @entity_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @entity_service_stub.logger + end + + # Service calls + + ## + # Gets watchlist details for the given watchlist ID. + # + # @overload get_watchlist(request, options = nil) + # Pass arguments to `get_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::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_watchlist(name: nil) + # Pass arguments to `get_watchlist` 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 parent, which owns this collection of watchlists. + # The name of the watchlist to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new + # + # # Call the get_watchlist method. + # result = client.get_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def get_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.get_watchlist 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 all watchlists for the given instance. + # + # @overload list_watchlists(request, options = nil) + # Pass arguments to `list_watchlists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_watchlists` 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 parent, which owns this collection of watchlists. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # Optional. The maximum number of watchlists to return. + # The service may return fewer than this value. + # If unspecified, at most 200 watchlists will be returned. + # The maximum value is 200; values above 200 will be coerced to 200. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListWatchlists` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListWatchlists` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Which watchlist to return in aip.dev/160 form. + # Currently, only the following filters are supported: + # - `watchlist_user_preferences.pinned=true` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new + # + # # Call the list_watchlists method. + # result = client.list_watchlists 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::Chronicle::V1::Watchlist. + # p item + # end + # + def list_watchlists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest + + # 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_watchlists.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::Chronicle::V1::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_watchlists.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_watchlists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.list_watchlists request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @entity_service_stub, :list_watchlists, "watchlists", 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 + + ## + # Creates a watchlist for the given instance. + # Note that there can be at most 200 watchlists per instance. + # + # @overload create_watchlist(request, options = nil) + # Pass arguments to `create_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) + # Pass arguments to `create_watchlist` 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 parent resource where this watchlist will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param watchlist_id [::String] + # Optional. The ID to use for the watchlist, + # which will become the final component of the watchlist's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new + # + # # Call the create_watchlist method. + # result = client.create_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def create_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.create_watchlist 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 + + ## + # Updates the watchlist for the given instance. + # + # @overload update_watchlist(request, options = nil) + # Pass arguments to `update_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::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_watchlist(watchlist: nil, update_mask: nil) + # Pass arguments to `update_watchlist` 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 watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to update. + # + # The watchlist's `name` field is used to identify the watchlist to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new + # + # # Call the update_watchlist method. + # result = client.update_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def update_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.update_watchlist 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 the watchlist for the given instance. + # + # @overload delete_watchlist(request, options = nil) + # Pass arguments to `delete_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::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_watchlist(name: nil, force: nil) + # Pass arguments to `delete_watchlist` 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 name of the watchlist to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param force [::Boolean] + # Optional. If set to true, any entities under this watchlist will also be + # deleted. (Otherwise, the request will only work if the watchlist has no + # entities.) + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new + # + # # Call the delete_watchlist method. + # result = client.delete_watchlist request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.delete_watchlist 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 + + ## + # Configuration class for the EntityService REST API. + # + # This class represents the configuration for EntityService 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::Chronicle::V1::EntityService::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 + # # get_watchlist to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.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. + # * `: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 = "chronicle.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 EntityService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :get_watchlist + ## + # RPC-specific configuration for `list_watchlists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_watchlists + ## + # RPC-specific configuration for `create_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :create_watchlist + ## + # RPC-specific configuration for `update_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :update_watchlist + ## + # RPC-specific configuration for `delete_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_watchlist + + # @private + def initialize parent_rpcs = nil + get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist + @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config + list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists + @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config + create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist + @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config + update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist + @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config + delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist + @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb new file mode 100644 index 000000000000..526e1e685af9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb @@ -0,0 +1,388 @@ +# 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/chronicle/v1/entity_pb" + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + module Rest + ## + # REST service stub for the EntityService 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 get_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] + # 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::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # A result object deserialized from the server's reply + def get_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_watchlist_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_watchlist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] + # 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::Chronicle::V1::ListWatchlistsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListWatchlistsResponse] + # A result object deserialized from the server's reply + def list_watchlists request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_watchlists_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_watchlists", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] + # 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::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # A result object deserialized from the server's reply + def create_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_watchlist_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_watchlist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] + # 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::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # A result object deserialized from the server's reply + def update_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_watchlist_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_watchlist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] + # 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_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_watchlist_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_watchlist", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the get_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_watchlists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] + # 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_watchlists_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/watchlists", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/watchlists", + body: "watchlist", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{watchlist.name}", + body: "watchlist", + matches: [ + ["watchlist.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb new file mode 100644 index 000000000000..c59e9b0b6f56 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/entity.proto for package 'Google.Cloud.Chronicle.V1' +# 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/chronicle/v1/entity_pb' + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + # EntityService contains apis for finding entities. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.EntityService' + + # Gets watchlist details for the given watchlist ID. + rpc :GetWatchlist, ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist + # Lists all watchlists for the given instance. + rpc :ListWatchlists, ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse + # Creates a watchlist for the given instance. + # Note that there can be at most 200 watchlists per instance. + rpc :CreateWatchlist, ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist + # Updates the watchlist for the given instance. + rpc :UpdateWatchlist, ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist + # Deletes the watchlist for the given instance. + rpc :DeleteWatchlist, ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb new file mode 100644 index 000000000000..3248928b99dd --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/featured_content_metadata.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/cloud/chronicle/v1/featured_content_metadata.proto\x12\x19google.cloud.chronicle.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x04\n\x17\x46\x65\x61turedContentMetadata\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcertified\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ncategories\x18\x08 \x03(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\x08verified\x18\n \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12^\n\x0bsource_type\x18\x0b \x01(\x0e\x32\x44.google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceTypeB\x03\xe0\x41\x03\"`\n\x11\x43ontentSourceType\x12#\n\x1f\x43ONTENT_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOOGLE\x10\x01\x12\r\n\tCOMMUNITY\x10\x02\x12\x0b\n\x07PARTNER\x10\x03\x42\x0b\n\t_verifiedB\xd3\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x1c\x46\x65\x61turedContentMetadataProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + FeaturedContentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FeaturedContentMetadata").msgclass + FeaturedContentMetadata::ContentSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb new file mode 100644 index 000000000000..bd3faf5f2172 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/featured_content_native_dashboard.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/chronicle/v1/featured_content_metadata_pb' +require 'google/cloud/chronicle/v1/native_dashboard_pb' + + +descriptor_data = "\nAgoogle/cloud/chronicle/v1/featured_content_native_dashboard.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x39google/cloud/chronicle/v1/featured_content_metadata.proto\x1a\x30google/cloud/chronicle/v1/native_dashboard.proto\"\xf5\x03\n\x1e\x46\x65\x61turedContentNativeDashboard\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Q\n\x10\x63ontent_metadata\x18\x02 \x01(\x0b\x32\x32.google.cloud.chronicle.v1.FeaturedContentMetadataB\x03\xe0\x41\x03\x12^\n\x11\x64\x61shboard_content\x18\x03 \x01(\x0b\x32>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueriesB\x03\xe0\x41\x01:\x8c\x02\xea\x41\x88\x02\n7chronicle.googleapis.com/FeaturedContentNativeDashboard\x12\x8b\x01projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}*\x1f\x66\x65\x61turedContentNativeDashboards2\x1e\x66\x65\x61turedContentNativeDashboard\"y\n(GetFeaturedContentNativeDashboardRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7chronicle.googleapis.com/FeaturedContentNativeDashboard\"\xc3\x01\n*ListFeaturedContentNativeDashboardsRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37\x63hronicle.googleapis.com/FeaturedContentNativeDashboard\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n+ListFeaturedContentNativeDashboardsResponse\x12\x65\n\"featured_content_native_dashboards\x18\x01 \x03(\x0b\x32\x39.google.cloud.chronicle.v1.FeaturedContentNativeDashboard\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe8\x01\n,InstallFeaturedContentNativeDashboardRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7chronicle.googleapis.com/FeaturedContentNativeDashboard\x12i\n!featured_content_native_dashboard\x18\x02 \x01(\x0b\x32\x39.google.cloud.chronicle.v1.FeaturedContentNativeDashboardB\x03\xe0\x41\x01\"{\n-InstallFeaturedContentNativeDashboardResponse\x12J\n\x10native_dashboard\x18\x01 \x01(\tB0\xe0\x41\x01\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard2\xbc\x08\n%FeaturedContentNativeDashboardService\x12\x8e\x02\n!GetFeaturedContentNativeDashboard\x12\x43.google.cloud.chronicle.v1.GetFeaturedContentNativeDashboardRequest\x1a\x39.google.cloud.chronicle.v1.FeaturedContentNativeDashboard\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\x12Z/v1/{name=projects/*/locations/*/instances/*/contentHub/featuredContentNativeDashboards/*}\x12\xa1\x02\n#ListFeaturedContentNativeDashboards\x12\x45.google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsRequest\x1a\x46.google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsResponse\"k\xda\x41\x06parent\x82\xd3\xe4\x93\x02\\\x12Z/v1/{parent=projects/*/locations/*/instances/*/contentHub}/featuredContentNativeDashboards\x12\xb0\x02\n%InstallFeaturedContentNativeDashboard\x12G.google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardRequest\x1aH.google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardResponse\"t\xda\x41\x04name\x82\xd3\xe4\x93\x02g\"b/v1/{name=projects/*/locations/*/instances/*/contentHub/featuredContentNativeDashboards/*}:install:\x01*\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xe4\x02\n\x1d\x63om.google.cloud.chronicle.v1B#FeaturedContentNativeDashboardProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1\xea\x41\x86\x01\n#chronicle.googleapis.com/ContentHub\x12Gprojects/{project}/locations/{location}/instances/{instance}/contentHub*\ncontentHub2\ncontentHubb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + FeaturedContentNativeDashboard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FeaturedContentNativeDashboard").msgclass + GetFeaturedContentNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetFeaturedContentNativeDashboardRequest").msgclass + ListFeaturedContentNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsRequest").msgclass + ListFeaturedContentNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsResponse").msgclass + InstallFeaturedContentNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardRequest").msgclass + InstallFeaturedContentNativeDashboardResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb new file mode 100644 index 000000000000..d9b60adfefbe --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb @@ -0,0 +1,56 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/client" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # This service provides functionality for managing + # FeaturedContentNativeDashboard. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + module FeaturedContentNativeDashboardService + end + end + end + end +end + +helper_path = ::File.join __dir__, "featured_content_native_dashboard_service", "helpers.rb" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb new file mode 100644 index 000000000000..5da633a058dc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb @@ -0,0 +1,717 @@ +# 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/chronicle/v1/featured_content_native_dashboard_pb" + +module Google + module Cloud + module Chronicle + module V1 + module FeaturedContentNativeDashboardService + ## + # Client for the FeaturedContentNativeDashboardService service. + # + # This service provides functionality for managing + # FeaturedContentNativeDashboard. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :featured_content_native_dashboard_service_stub + + ## + # Configure the FeaturedContentNativeDashboardService Client class. + # + # See {::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FeaturedContentNativeDashboardService clients + # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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", "Chronicle", "V1"] + 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.get_featured_content_native_dashboard.timeout = 60.0 + default_config.rpcs.get_featured_content_native_dashboard.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_featured_content_native_dashboards.timeout = 60.0 + default_config.rpcs.list_featured_content_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 + @featured_content_native_dashboard_service_stub.universe_domain + end + + ## + # Create a new FeaturedContentNativeDashboardService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FeaturedContentNativeDashboardService 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/chronicle/v1/featured_content_native_dashboard_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 + + @featured_content_native_dashboard_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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 + ) + + @featured_content_native_dashboard_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @featured_content_native_dashboard_service_stub.logger + end + + # Service calls + + ## + # Get a native dashboard featured content. + # + # @overload get_featured_content_native_dashboard(request, options = nil) + # Pass arguments to `get_featured_content_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, ::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_featured_content_native_dashboard(name: nil) + # Pass arguments to `get_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to + # retrieve. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new + # + # # Call the get_featured_content_native_dashboard method. + # result = client.get_featured_content_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard. + # p result + # + def get_featured_content_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest + + # 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_featured_content_native_dashboard.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::Chronicle::V1::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_featured_content_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_featured_content_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.call_rpc :get_featured_content_native_dashboard, 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 + + ## + # List all native dashboards featured content. + # + # @overload list_featured_content_native_dashboards(request, options = nil) + # Pass arguments to `list_featured_content_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, ::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_featured_content_native_dashboards(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_featured_content_native_dashboards` 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 parent, which owns this collection of + # FeaturedContentNativeDashboards. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub + # @param page_size [::Integer] + # Optional. The maximum number of FeaturedContentNativeDashboards to return. + # The service may return fewer than this value. If unspecified, at most 100 + # FeaturedContentNativeDashboards will be returned. The maximum value is 100; + # values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListFeaturedContentNativeDashboards` must match the call that provided the + # page token. + # @param filter [::String] + # Optional. The filter to apply to list the FeaturedContentNativeDashboards. + # + # The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. + # + # Supported fields for filtering: + # + # * `name`: The resource name of the featured content. + # * `content_metadata.description`: The description of the featured + # content. + # + # When a literal value is provided without a field, it will perform a + # substring search across both `name` and `content_metadata.description`. + # + # Examples: + # + # * `"test"`: Matches featured content where either the name or description + # contains "test" as a substring. + # * `name="test"`: Matches featured content where the name contains "test". + # * `content_metadata.description="test"`: Matches featured content where + # the description contains "test". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new + # + # # Call the list_featured_content_native_dashboards method. + # result = client.list_featured_content_native_dashboards 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::Chronicle::V1::FeaturedContentNativeDashboard. + # p item + # end + # + def list_featured_content_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest + + # 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_featured_content_native_dashboards.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::Chronicle::V1::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_featured_content_native_dashboards.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_featured_content_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.call_rpc :list_featured_content_native_dashboards, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @featured_content_native_dashboard_service_stub, :list_featured_content_native_dashboards, 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 + + ## + # Install a native dashboard featured content. + # + # @overload install_featured_content_native_dashboard(request, options = nil) + # Pass arguments to `install_featured_content_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, ::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 install_featured_content_native_dashboard(name: nil, featured_content_native_dashboard: nil) + # Pass arguments to `install_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to + # install. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # @param featured_content_native_dashboard [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard, ::Hash] + # Optional. The FeaturedContentNativeDashboard to install. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new + # + # # Call the install_featured_content_native_dashboard method. + # result = client.install_featured_content_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse. + # p result + # + def install_featured_content_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest + + # 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.install_featured_content_native_dashboard.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::Chronicle::V1::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.install_featured_content_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.install_featured_content_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.call_rpc :install_featured_content_native_dashboard, 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 + + ## + # Configuration class for the FeaturedContentNativeDashboardService API. + # + # This class represents the configuration for FeaturedContentNativeDashboardService, + # 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 + # # get_featured_content_native_dashboard to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_featured_content_native_dashboard.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_featured_content_native_dashboard.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::Chronicle::V1::FeaturedContentNativeDashboardService::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. + # * `: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 = "chronicle.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 FeaturedContentNativeDashboardService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_featured_content_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :get_featured_content_native_dashboard + ## + # RPC-specific configuration for `list_featured_content_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :list_featured_content_native_dashboards + ## + # RPC-specific configuration for `install_featured_content_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :install_featured_content_native_dashboard + + # @private + def initialize parent_rpcs = nil + get_featured_content_native_dashboard_config = parent_rpcs.get_featured_content_native_dashboard if parent_rpcs.respond_to? :get_featured_content_native_dashboard + @get_featured_content_native_dashboard = ::Gapic::Config::Method.new get_featured_content_native_dashboard_config + list_featured_content_native_dashboards_config = parent_rpcs.list_featured_content_native_dashboards if parent_rpcs.respond_to? :list_featured_content_native_dashboards + @list_featured_content_native_dashboards = ::Gapic::Config::Method.new list_featured_content_native_dashboards_config + install_featured_content_native_dashboard_config = parent_rpcs.install_featured_content_native_dashboard if parent_rpcs.respond_to? :install_featured_content_native_dashboard + @install_featured_content_native_dashboard = ::Gapic::Config::Method.new install_featured_content_native_dashboard_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb new file mode 100644 index 000000000000..2989f4bffb1d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module FeaturedContentNativeDashboardService + # Credentials for the FeaturedContentNativeDashboardService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb new file mode 100644 index 000000000000..a71c8d10fcf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb @@ -0,0 +1,136 @@ +# 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 Chronicle + module V1 + module FeaturedContentNativeDashboardService + # Path helper methods for the FeaturedContentNativeDashboardService API. + module Paths + ## + # Create a fully-qualified ContentHub resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/contentHub` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def content_hub_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/contentHub" + end + + ## + # Create a fully-qualified DashboardChart resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param chart [String] + # + # @return [::String] + def dashboard_chart_path project:, location:, instance:, chart: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" + end + + ## + # Create a fully-qualified DashboardQuery resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param query [String] + # + # @return [::String] + def dashboard_query_path project:, location:, instance:, query: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardQueries/#{query}" + end + + ## + # Create a fully-qualified FeaturedContentNativeDashboard resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param featured_content_native_dashboard [String] + # + # @return [::String] + def featured_content_native_dashboard_path project:, location:, instance:, featured_content_native_dashboard: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/contentHub/featuredContentNativeDashboards/#{featured_content_native_dashboard}" + end + + ## + # Create a fully-qualified NativeDashboard resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param dashboard [String] + # + # @return [::String] + def native_dashboard_path project:, location:, instance:, dashboard: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/nativeDashboards/#{dashboard}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb new file mode 100644 index 000000000000..f3fc177c90e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb @@ -0,0 +1,53 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # This service provides functionality for managing + # FeaturedContentNativeDashboard. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + module FeaturedContentNativeDashboardService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb new file mode 100644 index 000000000000..77ac512963a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb @@ -0,0 +1,653 @@ +# 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/chronicle/v1/featured_content_native_dashboard_pb" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module FeaturedContentNativeDashboardService + module Rest + ## + # REST client for the FeaturedContentNativeDashboardService service. + # + # This service provides functionality for managing + # FeaturedContentNativeDashboard. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :featured_content_native_dashboard_service_stub + + ## + # Configure the FeaturedContentNativeDashboardService Client class. + # + # See {::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FeaturedContentNativeDashboardService clients + # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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", "Chronicle", "V1"] + 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.get_featured_content_native_dashboard.timeout = 60.0 + default_config.rpcs.get_featured_content_native_dashboard.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_featured_content_native_dashboards.timeout = 60.0 + default_config.rpcs.list_featured_content_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 + @featured_content_native_dashboard_service_stub.universe_domain + end + + ## + # Create a new FeaturedContentNativeDashboardService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FeaturedContentNativeDashboardService 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 + + @featured_content_native_dashboard_service_stub = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @featured_content_native_dashboard_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @featured_content_native_dashboard_service_stub.logger + end + + # Service calls + + ## + # Get a native dashboard featured content. + # + # @overload get_featured_content_native_dashboard(request, options = nil) + # Pass arguments to `get_featured_content_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, ::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_featured_content_native_dashboard(name: nil) + # Pass arguments to `get_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to + # retrieve. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new + # + # # Call the get_featured_content_native_dashboard method. + # result = client.get_featured_content_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard. + # p result + # + def get_featured_content_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest + + # 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_featured_content_native_dashboard.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::Chronicle::V1::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_featured_content_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_featured_content_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.get_featured_content_native_dashboard 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 + + ## + # List all native dashboards featured content. + # + # @overload list_featured_content_native_dashboards(request, options = nil) + # Pass arguments to `list_featured_content_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, ::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_featured_content_native_dashboards(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_featured_content_native_dashboards` 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 parent, which owns this collection of + # FeaturedContentNativeDashboards. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub + # @param page_size [::Integer] + # Optional. The maximum number of FeaturedContentNativeDashboards to return. + # The service may return fewer than this value. If unspecified, at most 100 + # FeaturedContentNativeDashboards will be returned. The maximum value is 100; + # values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListFeaturedContentNativeDashboards` must match the call that provided the + # page token. + # @param filter [::String] + # Optional. The filter to apply to list the FeaturedContentNativeDashboards. + # + # The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. + # + # Supported fields for filtering: + # + # * `name`: The resource name of the featured content. + # * `content_metadata.description`: The description of the featured + # content. + # + # When a literal value is provided without a field, it will perform a + # substring search across both `name` and `content_metadata.description`. + # + # Examples: + # + # * `"test"`: Matches featured content where either the name or description + # contains "test" as a substring. + # * `name="test"`: Matches featured content where the name contains "test". + # * `content_metadata.description="test"`: Matches featured content where + # the description contains "test". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new + # + # # Call the list_featured_content_native_dashboards method. + # result = client.list_featured_content_native_dashboards 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::Chronicle::V1::FeaturedContentNativeDashboard. + # p item + # end + # + def list_featured_content_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest + + # 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_featured_content_native_dashboards.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::Chronicle::V1::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_featured_content_native_dashboards.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_featured_content_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.list_featured_content_native_dashboards request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @featured_content_native_dashboard_service_stub, :list_featured_content_native_dashboards, "featured_content_native_dashboards", 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 + + ## + # Install a native dashboard featured content. + # + # @overload install_featured_content_native_dashboard(request, options = nil) + # Pass arguments to `install_featured_content_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, ::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 install_featured_content_native_dashboard(name: nil, featured_content_native_dashboard: nil) + # Pass arguments to `install_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to + # install. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # @param featured_content_native_dashboard [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard, ::Hash] + # Optional. The FeaturedContentNativeDashboard to install. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new + # + # # Call the install_featured_content_native_dashboard method. + # result = client.install_featured_content_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse. + # p result + # + def install_featured_content_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest + + # 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.install_featured_content_native_dashboard.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::Chronicle::V1::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.install_featured_content_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.install_featured_content_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.install_featured_content_native_dashboard 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 + + ## + # Configuration class for the FeaturedContentNativeDashboardService REST API. + # + # This class represents the configuration for FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 + # # get_featured_content_native_dashboard to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_featured_content_native_dashboard.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_featured_content_native_dashboard.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. + # * `: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 = "chronicle.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 FeaturedContentNativeDashboardService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_featured_content_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :get_featured_content_native_dashboard + ## + # RPC-specific configuration for `list_featured_content_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :list_featured_content_native_dashboards + ## + # RPC-specific configuration for `install_featured_content_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :install_featured_content_native_dashboard + + # @private + def initialize parent_rpcs = nil + get_featured_content_native_dashboard_config = parent_rpcs.get_featured_content_native_dashboard if parent_rpcs.respond_to? :get_featured_content_native_dashboard + @get_featured_content_native_dashboard = ::Gapic::Config::Method.new get_featured_content_native_dashboard_config + list_featured_content_native_dashboards_config = parent_rpcs.list_featured_content_native_dashboards if parent_rpcs.respond_to? :list_featured_content_native_dashboards + @list_featured_content_native_dashboards = ::Gapic::Config::Method.new list_featured_content_native_dashboards_config + install_featured_content_native_dashboard_config = parent_rpcs.install_featured_content_native_dashboard if parent_rpcs.respond_to? :install_featured_content_native_dashboard + @install_featured_content_native_dashboard = ::Gapic::Config::Method.new install_featured_content_native_dashboard_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb new file mode 100644 index 000000000000..87f450115dc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb @@ -0,0 +1,265 @@ +# 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/chronicle/v1/featured_content_native_dashboard_pb" + +module Google + module Cloud + module Chronicle + module V1 + module FeaturedContentNativeDashboardService + module Rest + ## + # REST service stub for the FeaturedContentNativeDashboardService 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 get_featured_content_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest] + # 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::Chronicle::V1::FeaturedContentNativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # A result object deserialized from the server's reply + def get_featured_content_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_featured_content_native_dashboard_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_featured_content_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard.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_featured_content_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest] + # 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::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse] + # A result object deserialized from the server's reply + def list_featured_content_native_dashboards request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_featured_content_native_dashboards_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_featured_content_native_dashboards", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the install_featured_content_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest] + # 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::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # A result object deserialized from the server's reply + def install_featured_content_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_install_featured_content_native_dashboard_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: "install_featured_content_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse.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 get_featured_content_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest] + # 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_featured_content_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/contentHub/featuredContentNativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_featured_content_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest] + # 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_featured_content_native_dashboards_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/featuredContentNativeDashboards", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/contentHub/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the install_featured_content_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_install_featured_content_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:install", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/contentHub/featuredContentNativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb new file mode 100644 index 000000000000..8f949b5ddb61 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/featured_content_native_dashboard.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/featured_content_native_dashboard_pb' + +module Google + module Cloud + module Chronicle + module V1 + module FeaturedContentNativeDashboardService + # This service provides functionality for managing + # FeaturedContentNativeDashboard. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.FeaturedContentNativeDashboardService' + + # Get a native dashboard featured content. + rpc :GetFeaturedContentNativeDashboard, ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard + # List all native dashboards featured content. + rpc :ListFeaturedContentNativeDashboards, ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse + # Install a native dashboard featured content. + rpc :InstallFeaturedContentNativeDashboard, ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb new file mode 100644 index 000000000000..93db557b2ce9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/instance.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' + + +descriptor_data = "\n(google/cloud/chronicle/v1/instance.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x01\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:y\xea\x41v\n!chronicle.googleapis.com/Instance\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the InstanceService API. + # + # This class represents the configuration for InstanceService, + # 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::Chronicle::V1::InstanceService::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 + # # get_instance to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::InstanceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.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::Chronicle::V1::InstanceService::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. + # * `: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 = "chronicle.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 InstanceService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + + # @private + def initialize parent_rpcs = nil + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb new file mode 100644 index 000000000000..63fbe3b5b5fb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + module InstanceService + # Credentials for the InstanceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb new file mode 100644 index 000000000000..71d7213a0c6d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb @@ -0,0 +1,52 @@ +# 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 Chronicle + module V1 + module InstanceService + # Path helper methods for the InstanceService API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb new file mode 100644 index 000000000000..40b1913eead4 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/instance_service/credentials" +require "google/cloud/chronicle/v1/instance_service/paths" +require "google/cloud/chronicle/v1/instance_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # InstanceService provides the entry interface for the Chronicle API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/instance_service/rest" + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new + # + module InstanceService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/instance_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb new file mode 100644 index 000000000000..4b6f95ea6cbb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb @@ -0,0 +1,431 @@ +# 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/chronicle/v1/instance_pb" +require "google/cloud/chronicle/v1/instance_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module InstanceService + module Rest + ## + # REST client for the InstanceService service. + # + # InstanceService provides the entry interface for the Chronicle API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :instance_service_stub + + ## + # Configure the InstanceService Client class. + # + # See {::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InstanceService clients + # ::Google::Cloud::Chronicle::V1::InstanceService::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", "Chronicle", "V1"] + 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.get_instance.timeout = 60.0 + default_config.rpcs.get_instance.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InstanceService 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::Chronicle::V1::InstanceService::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 + @instance_service_stub.universe_domain + end + + ## + # Create a new InstanceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InstanceService 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 + + @instance_service_stub = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @instance_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @instance_service_stub.logger + end + + # Service calls + + ## + # Gets a Instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::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_instance(name: nil) + # Pass arguments to `get_instance` 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 name of the instance to retrieve. + # Format: + # `projects/{project_id}/locations/{location}/instances/{instance}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetInstanceRequest + + # 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_instance.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::Chronicle::V1::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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_service_stub.get_instance 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 + + ## + # Configuration class for the InstanceService REST API. + # + # This class represents the configuration for InstanceService 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::Chronicle::V1::InstanceService::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 + # # get_instance to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.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. + # * `: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 = "chronicle.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 InstanceService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + + # @private + def initialize parent_rpcs = nil + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb new file mode 100644 index 000000000000..54fc5b580ded --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb @@ -0,0 +1,142 @@ +# 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/chronicle/v1/instance_pb" + +module Google + module Cloud + module Chronicle + module V1 + module InstanceService + module Rest + ## + # REST service stub for the InstanceService 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 get_instance REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] + # 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::Chronicle::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Instance] + # A result object deserialized from the server's reply + def get_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_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_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Instance.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 get_instance REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb new file mode 100644 index 000000000000..3465f58ac427 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb @@ -0,0 +1,45 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/instance.proto for package 'Google.Cloud.Chronicle.V1' +# 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/chronicle/v1/instance_pb' + +module Google + module Cloud + module Chronicle + module V1 + module InstanceService + # InstanceService provides the entry interface for the Chronicle API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.InstanceService' + + # Gets a Instance. + rpc :GetInstance, ::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::Google::Cloud::Chronicle::V1::Instance + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb new file mode 100644 index 000000000000..d5d773013043 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/native_dashboard.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/chronicle/v1/dashboard_chart_pb' +require 'google/cloud/chronicle/v1/dashboard_query_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n0google/cloud/chronicle/v1/native_dashboard.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/chronicle/v1/dashboard_chart.proto\x1a/google/cloud/chronicle/v1/dashboard_query.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"u\n\x1d\x45xportNativeDashboardsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12\x12\n\x05names\x18\x02 \x03(\tB\x03\xe0\x41\x02\"{\n\x1e\x45xportNativeDashboardsResponse\x12J\n\x12inline_destination\x18\x01 \x01(\x0b\x32,.google.cloud.chronicle.v1.InlineDestinationH\x00\x42\r\n\x0b\x64\x65stination\"g\n\x11InlineDestination\x12R\n\ndashboards\x18\x01 \x03(\x0b\x32>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries\"\xfe\x01\n#NativeDashboardWithChartsAndQueries\x12\x42\n\tdashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x01\x12H\n\x10\x64\x61shboard_charts\x18\x02 \x03(\x0b\x32).google.cloud.chronicle.v1.DashboardChartB\x03\xe0\x41\x01\x12I\n\x11\x64\x61shboard_queries\x18\x03 \x03(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x01\"\xb5\x01\n\x1dImportNativeDashboardsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12R\n\x06source\x18\x02 \x01(\x0b\x32=.google.cloud.chronicle.v1.ImportNativeDashboardsInlineSourceB\x03\xe0\x41\x02\"}\n\"ImportNativeDashboardsInlineSource\x12W\n\ndashboards\x18\x01 \x03(\x0b\x32>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueriesB\x03\xe0\x41\x02\"e\n\x1eImportNativeDashboardsResponse\x12\x43\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.chronicle.v1.ImportExportStatusB\x03\xe0\x41\x03\"P\n\x12ImportExportStatus\x12\x11\n\tdashboard\x18\x01 \x01(\t\x12\'\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\"\x85\x06\n\x0fNativeDashboard\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12G\n\ndefinition\x18\x04 \x01(\x0b\x32..google.cloud.chronicle.v1.DashboardDefinitionB\x03\xe0\x41\x01\x12;\n\x04type\x18\x05 \x01(\x0e\x32(.google.cloud.chronicle.v1.DashboardTypeB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0e\x63reate_user_id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0eupdate_user_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12N\n\x13\x64\x61shboard_user_data\x18\n \x01(\x0b\x32,.google.cloud.chronicle.v1.DashboardUserDataB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12?\n\x06\x61\x63\x63\x65ss\x18\x0c \x01(\x0e\x32*.google.cloud.chronicle.v1.DashboardAccessB\x03\xe0\x41\x03:\xac\x01\xea\x41\xa8\x01\n(chronicle.googleapis.com/NativeDashboard\x12Yprojects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}*\x10nativeDashboards2\x0fnativeDashboard\"\xab\x01\n\x1c\x43reateNativeDashboardRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12I\n\x10native_dashboard\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x02\"\x9e\x01\n\x19GetNativeDashboardRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12\x41\n\x04view\x18\x02 \x01(\x0e\x32..google.cloud.chronicle.v1.NativeDashboardViewB\x03\xe0\x41\x01\"\xd3\x01\n\x1bListNativeDashboardsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x04view\x18\x04 \x01(\x0e\x32..google.cloud.chronicle.v1.NativeDashboardViewB\x03\xe0\x41\x01\"~\n\x1cListNativeDashboardsResponse\x12\x45\n\x11native_dashboards\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9f\x01\n\x1cUpdateNativeDashboardRequest\x12I\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xac\x01\n\x1f\x44uplicateNativeDashboardRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12I\n\x10native_dashboard\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x02\"^\n\x1c\x44\x65leteNativeDashboardRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\"\xc6\x02\n\x0f\x41\x64\x64\x43hartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12G\n\x0f\x64\x61shboard_query\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x01\x12G\n\x0f\x64\x61shboard_chart\x18\x03 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChartB\x03\xe0\x41\x02\x12\x61\n\x0c\x63hart_layout\x18\x04 \x01(\x0b\x32\x46.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayoutB\x03\xe0\x41\x02\"\x9c\x01\n\x10\x41\x64\x64\x43hartResponse\x12\x44\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x42\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChart\"\xe4\x02\n\x10\x45\x64itChartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12G\n\x0f\x64\x61shboard_query\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x01\x12G\n\x0f\x64\x61shboard_chart\x18\x03 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChartB\x03\xe0\x41\x01\x12\x32\n\tedit_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12J\n\x11language_features\x18\x05 \x03(\x0e\x32*.google.cloud.chronicle.v1.LanguageFeatureB\x03\xe0\x41\x01\"\x9d\x01\n\x11\x45\x64itChartResponse\x12\x44\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x42\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChart\"\x9e\x01\n\x12RemoveChartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12H\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"\xa1\x01\n\x15\x44uplicateChartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12H\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"\xa2\x01\n\x16\x44uplicateChartResponse\x12\x44\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x42\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChart\"\\\n\x11\x44\x61shboardUserData\x12\x34\n\x10last_viewed_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\tis_pinned\x18\x02 \x01(\x08\"\xf3\x03\n\x13\x44\x61shboardDefinition\x12;\n\x07\x66ilters\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DashboardFilter\x12\x13\n\x0b\x66ingerprint\x18\x02 \x01(\t\x12J\n\x06\x63harts\x18\x04 \x03(\x0b\x32:.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig\x1a\xbd\x02\n\x0b\x43hartConfig\x12H\n\x0f\x64\x61shboard_chart\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\x12\\\n\x0c\x63hart_layout\x18\x02 \x01(\x0b\x32\x46.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout\x12\x13\n\x0b\x66ilters_ids\x18\x04 \x03(\t\x1aq\n\x0b\x43hartLayout\x12\x14\n\x07start_x\x18\t \x01(\x05H\x00\x88\x01\x01\x12\x0e\n\x06span_x\x18\n \x01(\x05\x12\x14\n\x07start_y\x18\x0b \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06span_y\x18\x0c \x01(\x05\x42\n\n\x08_start_xB\n\n\x08_start_y*r\n\rDashboardType\x12\x1e\n\x1a\x44\x41SHBOARD_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43URATED\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\x12\n\n\x06PUBLIC\x10\x03\x12\n\n\x06\x43USTOM\x10\x04\x12\x0f\n\x0bMARKETPLACE\x10\x05*`\n\x0f\x44\x61shboardAccess\x12 \n\x1c\x44\x41SHBOARD_ACCESS_UNSPECIFIED\x10\x00\x12\x15\n\x11\x44\x41SHBOARD_PRIVATE\x10\x01\x12\x14\n\x10\x44\x41SHBOARD_PUBLIC\x10\x02*}\n\x13NativeDashboardView\x12%\n!NATIVE_DASHBOARD_VIEW_UNSPECIFIED\x10\x00\x12\x1f\n\x1bNATIVE_DASHBOARD_VIEW_BASIC\x10\x01\x12\x1e\n\x1aNATIVE_DASHBOARD_VIEW_FULL\x10\x02\x32\x86\x17\n\x16NativeDashboardService\x12\xf2\x01\n\x15\x43reateNativeDashboard\x12\x37.google.cloud.chronicle.v1.CreateNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"t\xda\x41\x17parent,native_dashboard\x82\xd3\xe4\x93\x02T\"@/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:\x10native_dashboard\x12\xc7\x01\n\x12GetNativeDashboard\x12\x34.google.cloud.chronicle.v1.GetNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}\x12\xda\x01\n\x14ListNativeDashboards\x12\x36.google.cloud.chronicle.v1.ListNativeDashboardsRequest\x1a\x37.google.cloud.chronicle.v1.ListNativeDashboardsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards\x12\x89\x02\n\x15UpdateNativeDashboard\x12\x37.google.cloud.chronicle.v1.UpdateNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"\x8a\x01\xda\x41\x1cnative_dashboard,update_mask\x82\xd3\xe4\x93\x02\x65\x32Q/v1/{native_dashboard.name=projects/*/locations/*/instances/*/nativeDashboards/*}:\x10native_dashboard\x12\xf2\x01\n\x18\x44uplicateNativeDashboard\x12:.google.cloud.chronicle.v1.DuplicateNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"n\xda\x41\x16name, native_dashboard\x82\xd3\xe4\x93\x02O\"J/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:duplicate:\x01*\x12\xb9\x01\n\x15\x44\x65leteNativeDashboard\x12\x37.google.cloud.chronicle.v1.DeleteNativeDashboardRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}\x12\xe2\x01\n\x08\x41\x64\x64\x43hart\x12*.google.cloud.chronicle.v1.AddChartRequest\x1a+.google.cloud.chronicle.v1.AddChartResponse\"}\xda\x41&name, dashboard_query, dashboard_chart\x82\xd3\xe4\x93\x02N\"I/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:addChart:\x01*\x12\xc8\x01\n\x0bRemoveChart\x12-.google.cloud.chronicle.v1.RemoveChartRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"^\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:removeChart:\x01*\x12\xf2\x01\n\tEditChart\x12+.google.cloud.chronicle.v1.EditChartRequest\x1a,.google.cloud.chronicle.v1.EditChartResponse\"\x89\x01\xda\x41\x31name, dashboard_query, dashboard_chart, edit_mask\x82\xd3\xe4\x93\x02O\"J/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:editChart:\x01*\x12\xd8\x01\n\x0e\x44uplicateChart\x12\x30.google.cloud.chronicle.v1.DuplicateChartRequest\x1a\x31.google.cloud.chronicle.v1.DuplicateChartResponse\"a\xda\x41\x04name\x82\xd3\xe4\x93\x02T\"O/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:duplicateChart:\x01*\x12\xf1\x01\n\x16\x45xportNativeDashboards\x12\x38.google.cloud.chronicle.v1.ExportNativeDashboardsRequest\x1a\x39.google.cloud.chronicle.v1.ExportNativeDashboardsResponse\"b\xda\x41\rparent, names\x82\xd3\xe4\x93\x02L\"G/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:export:\x01*\x12\xf1\x01\n\x16ImportNativeDashboards\x12\x38.google.cloud.chronicle.v1.ImportNativeDashboardsRequest\x1a\x39.google.cloud.chronicle.v1.ImportNativeDashboardsResponse\"b\xda\x41\rparent,source\x82\xd3\xe4\x93\x02L\"G/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:import:\x01*\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xcb\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x14NativeDashboardProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + ExportNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExportNativeDashboardsRequest").msgclass + ExportNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExportNativeDashboardsResponse").msgclass + InlineDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InlineDestination").msgclass + NativeDashboardWithChartsAndQueries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries").msgclass + ImportNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportNativeDashboardsRequest").msgclass + ImportNativeDashboardsInlineSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportNativeDashboardsInlineSource").msgclass + ImportNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportNativeDashboardsResponse").msgclass + ImportExportStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportExportStatus").msgclass + NativeDashboard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.NativeDashboard").msgclass + CreateNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateNativeDashboardRequest").msgclass + GetNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetNativeDashboardRequest").msgclass + ListNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListNativeDashboardsRequest").msgclass + ListNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListNativeDashboardsResponse").msgclass + UpdateNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateNativeDashboardRequest").msgclass + DuplicateNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DuplicateNativeDashboardRequest").msgclass + DeleteNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteNativeDashboardRequest").msgclass + AddChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AddChartRequest").msgclass + AddChartResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AddChartResponse").msgclass + EditChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.EditChartRequest").msgclass + EditChartResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.EditChartResponse").msgclass + RemoveChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RemoveChartRequest").msgclass + DuplicateChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DuplicateChartRequest").msgclass + DuplicateChartResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DuplicateChartResponse").msgclass + DashboardUserData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardUserData").msgclass + DashboardDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardDefinition").msgclass + DashboardDefinition::ChartConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardDefinition.ChartConfig").msgclass + DashboardDefinition::ChartConfig::ChartLayout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout").msgclass + DashboardType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardType").enummodule + DashboardAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardAccess").enummodule + NativeDashboardView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.NativeDashboardView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb new file mode 100644 index 000000000000..f3a0d86312bc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/native_dashboard_service/credentials" +require "google/cloud/chronicle/v1/native_dashboard_service/paths" +require "google/cloud/chronicle/v1/native_dashboard_service/client" +require "google/cloud/chronicle/v1/native_dashboard_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing native dashboards. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/native_dashboard_service" + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/native_dashboard_service/rest" + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + module NativeDashboardService + end + end + end + end +end + +helper_path = ::File.join __dir__, "native_dashboard_service", "helpers.rb" +require "google/cloud/chronicle/v1/native_dashboard_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb new file mode 100644 index 000000000000..4c00e3fd8a9d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb @@ -0,0 +1,1611 @@ +# 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/chronicle/v1/native_dashboard_pb" + +module Google + module Cloud + module Chronicle + module V1 + module NativeDashboardService + ## + # Client for the NativeDashboardService service. + # + # A service providing functionality for managing native dashboards. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :native_dashboard_service_stub + + ## + # Configure the NativeDashboardService Client class. + # + # See {::Google::Cloud::Chronicle::V1::NativeDashboardService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NativeDashboardService clients + # ::Google::Cloud::Chronicle::V1::NativeDashboardService::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", "Chronicle", "V1"] + 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_native_dashboard.timeout = 60.0 + + default_config.rpcs.get_native_dashboard.timeout = 60.0 + default_config.rpcs.get_native_dashboard.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_native_dashboards.timeout = 60.0 + default_config.rpcs.list_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_native_dashboard.timeout = 60.0 + + default_config.rpcs.duplicate_native_dashboard.timeout = 60.0 + + default_config.rpcs.delete_native_dashboard.timeout = 60.0 + + default_config.rpcs.add_chart.timeout = 60.0 + + default_config.rpcs.remove_chart.timeout = 60.0 + + default_config.rpcs.edit_chart.timeout = 60.0 + + default_config.rpcs.duplicate_chart.timeout = 60.0 + + default_config.rpcs.export_native_dashboards.timeout = 60.0 + default_config.rpcs.export_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.import_native_dashboards.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::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 + @native_dashboard_service_stub.universe_domain + end + + ## + # Create a new NativeDashboardService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NativeDashboardService 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/chronicle/v1/native_dashboard_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 + + @native_dashboard_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::NativeDashboardService::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 + ) + + @native_dashboard_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @native_dashboard_service_stub.logger + end + + # Service calls + + ## + # Create a dashboard. + # + # @overload create_native_dashboard(request, options = nil) + # Pass arguments to `create_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, ::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_native_dashboard(parent: nil, native_dashboard: nil) + # Pass arguments to `create_native_dashboard` 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 parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. The dashboard to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new + # + # # Call the create_native_dashboard method. + # result = client.create_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def create_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :create_native_dashboard, 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 + + ## + # Get a dashboard. + # + # @overload get_native_dashboard(request, options = nil) + # Pass arguments to `get_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, ::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_native_dashboard(name: nil, view: nil) + # Pass arguments to `get_native_dashboard` 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 dashboard name to fetch. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new + # + # # Call the get_native_dashboard method. + # result = client.get_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def get_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :get_native_dashboard, 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 + + ## + # List all dashboards. + # + # @overload list_native_dashboards(request, options = nil) + # Pass arguments to `list_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, ::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_native_dashboards(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_native_dashboards` 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 parent owning this dashboard collection. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param page_size [::Integer] + # Optional. The maximum number of dashboards to return. The service may + # return fewer than this value. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDashboards` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDashboards` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new + # + # # Call the list_native_dashboards method. + # result = client.list_native_dashboards 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::Chronicle::V1::NativeDashboard. + # p item + # end + # + def list_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :list_native_dashboards, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @native_dashboard_service_stub, :list_native_dashboards, 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 + + ## + # Update a dashboard. + # + # @overload update_native_dashboard(request, options = nil) + # Pass arguments to `update_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, ::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_native_dashboard(native_dashboard: nil, update_mask: nil) + # Pass arguments to `update_native_dashboard` 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 native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. The dashboard to update. + # + # The dashboard's `name` field is used to identify the dashboard to update. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. LINT.IfChange(update_mask_values) + # The list of fields to update. + # Supported paths are - + # display_name + # description + # definition.filters + # definition.charts + # type + # access + # dashboard_user_data.is_pinned + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new + # + # # Call the update_native_dashboard method. + # result = client.update_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def update_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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.native_dashboard&.name + header_params["native_dashboard.name"] = request.native_dashboard.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_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :update_native_dashboard, 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 + + ## + # Duplicate a dashboard. + # + # @overload duplicate_native_dashboard(request, options = nil) + # Pass arguments to `duplicate_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, ::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 duplicate_native_dashboard(name: nil, native_dashboard: nil) + # Pass arguments to `duplicate_native_dashboard` 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 dashboard name to duplicate. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. Any fields that need modification can be passed through this like + # name, description etc. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new + # + # # Call the duplicate_native_dashboard method. + # result = client.duplicate_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def duplicate_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest + + # 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.duplicate_native_dashboard.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::Chronicle::V1::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.duplicate_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.duplicate_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :duplicate_native_dashboard, 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 + + ## + # Delete a dashboard. + # + # @overload delete_native_dashboard(request, options = nil) + # Pass arguments to `delete_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, ::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_native_dashboard(name: nil) + # Pass arguments to `delete_native_dashboard` 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 dashboard name to delete. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new + # + # # Call the delete_native_dashboard method. + # result = client.delete_native_dashboard request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :delete_native_dashboard, 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 + + ## + # Add chart in a dashboard. + # + # @overload add_chart(request, options = nil) + # Pass arguments to `add_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::AddChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::AddChartRequest, ::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 add_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, chart_layout: nil) + # Pass arguments to `add_chart` 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 dashboard name to add chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Optional. Query used to create the chart. + # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] + # Required. Chart to be added to the dashboard. + # @param chart_layout [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout, ::Hash] + # Required. ChartLayout for newly added chart. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::AddChartResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::AddChartResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::AddChartRequest.new + # + # # Call the add_chart method. + # result = client.add_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::AddChartResponse. + # p result + # + def add_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::AddChartRequest + + # 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.add_chart.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::Chronicle::V1::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.add_chart.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :add_chart, 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 + + ## + # Remove chart from a dashboard. + # + # @overload remove_chart(request, options = nil) + # Pass arguments to `remove_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::RemoveChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::RemoveChartRequest, ::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 remove_chart(name: nil, dashboard_chart: nil) + # Pass arguments to `remove_chart` 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 dashboard name to remove chart from. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_chart [::String] + # Required. The dashboard chart name to remove. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::RemoveChartRequest.new + # + # # Call the remove_chart method. + # result = client.remove_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def remove_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::RemoveChartRequest + + # 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.remove_chart.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::Chronicle::V1::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.remove_chart.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :remove_chart, 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 + + ## + # Edit chart in a dashboard. + # + # @overload edit_chart(request, options = nil) + # Pass arguments to `edit_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::EditChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::EditChartRequest, ::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 edit_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, edit_mask: nil, language_features: nil) + # Pass arguments to `edit_chart` 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 dashboard name to edit chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Optional. Query for the edited chart. + # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] + # Optional. Edited chart. + # @param edit_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to edit for chart and query. + # Supported paths in chart are - + # dashboard_chart.display_name + # dashboard_chart.description + # dashboard_chart.chart_datasource.data_sources + # dashboard_chart.visualization + # dashboard_chart.visualization.button + # dashboard_chart.visualization.markdown + # dashboard_chart.drill_down_config + # Supported paths in query are - + # dashboard_query.query + # dashboard_query.input + # @param language_features [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] + # Optional. Language Features present in the query. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::EditChartResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::EditChartResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::EditChartRequest.new + # + # # Call the edit_chart method. + # result = client.edit_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::EditChartResponse. + # p result + # + def edit_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::EditChartRequest + + # 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.edit_chart.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::Chronicle::V1::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.edit_chart.timeout, + metadata: metadata, + retry_policy: @config.rpcs.edit_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :edit_chart, 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 + + ## + # Duplicate chart in a dashboard. + # + # @overload duplicate_chart(request, options = nil) + # Pass arguments to `duplicate_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DuplicateChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DuplicateChartRequest, ::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 duplicate_chart(name: nil, dashboard_chart: nil) + # Pass arguments to `duplicate_chart` 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 dashboard name that involves chart duplication. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_chart [::String] + # Required. The dashboard chart name to duplicate. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DuplicateChartRequest.new + # + # # Call the duplicate_chart method. + # result = client.duplicate_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DuplicateChartResponse. + # p result + # + def duplicate_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateChartRequest + + # 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.duplicate_chart.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::Chronicle::V1::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.duplicate_chart.timeout, + metadata: metadata, + retry_policy: @config.rpcs.duplicate_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :duplicate_chart, 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 + + ## + # Exports the dashboards. + # + # @overload export_native_dashboards(request, options = nil) + # Pass arguments to `export_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, names: nil) + # Pass arguments to `export_native_dashboards` 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 parent resource that the dashboards to be exported belong to. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param names [::Array<::String>] + # Required. The resource names of the dashboards to export. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new + # + # # Call the export_native_dashboards method. + # result = client.export_native_dashboards request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse. + # p result + # + def export_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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.export_native_dashboards.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :export_native_dashboards, 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 + + ## + # Imports the dashboards. + # + # @overload import_native_dashboards(request, options = nil) + # Pass arguments to `import_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, source: nil) + # Pass arguments to `import_native_dashboards` 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 parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param source [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource, ::Hash] + # Required. The data will imported from this proto. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new + # + # # Call the import_native_dashboards method. + # result = client.import_native_dashboards request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse. + # p result + # + def import_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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.import_native_dashboards.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :import_native_dashboards, 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 + + ## + # Configuration class for the NativeDashboardService API. + # + # This class represents the configuration for NativeDashboardService, + # 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::Chronicle::V1::NativeDashboardService::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_native_dashboard to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_native_dashboard.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_native_dashboard.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::Chronicle::V1::NativeDashboardService::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. + # * `: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 = "chronicle.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 NativeDashboardService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :create_native_dashboard + ## + # RPC-specific configuration for `get_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :get_native_dashboard + ## + # RPC-specific configuration for `list_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :list_native_dashboards + ## + # RPC-specific configuration for `update_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :update_native_dashboard + ## + # RPC-specific configuration for `duplicate_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :duplicate_native_dashboard + ## + # RPC-specific configuration for `delete_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_native_dashboard + ## + # RPC-specific configuration for `add_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :add_chart + ## + # RPC-specific configuration for `remove_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_chart + ## + # RPC-specific configuration for `edit_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :edit_chart + ## + # RPC-specific configuration for `duplicate_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :duplicate_chart + ## + # RPC-specific configuration for `export_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :export_native_dashboards + ## + # RPC-specific configuration for `import_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :import_native_dashboards + + # @private + def initialize parent_rpcs = nil + create_native_dashboard_config = parent_rpcs.create_native_dashboard if parent_rpcs.respond_to? :create_native_dashboard + @create_native_dashboard = ::Gapic::Config::Method.new create_native_dashboard_config + get_native_dashboard_config = parent_rpcs.get_native_dashboard if parent_rpcs.respond_to? :get_native_dashboard + @get_native_dashboard = ::Gapic::Config::Method.new get_native_dashboard_config + list_native_dashboards_config = parent_rpcs.list_native_dashboards if parent_rpcs.respond_to? :list_native_dashboards + @list_native_dashboards = ::Gapic::Config::Method.new list_native_dashboards_config + update_native_dashboard_config = parent_rpcs.update_native_dashboard if parent_rpcs.respond_to? :update_native_dashboard + @update_native_dashboard = ::Gapic::Config::Method.new update_native_dashboard_config + duplicate_native_dashboard_config = parent_rpcs.duplicate_native_dashboard if parent_rpcs.respond_to? :duplicate_native_dashboard + @duplicate_native_dashboard = ::Gapic::Config::Method.new duplicate_native_dashboard_config + delete_native_dashboard_config = parent_rpcs.delete_native_dashboard if parent_rpcs.respond_to? :delete_native_dashboard + @delete_native_dashboard = ::Gapic::Config::Method.new delete_native_dashboard_config + add_chart_config = parent_rpcs.add_chart if parent_rpcs.respond_to? :add_chart + @add_chart = ::Gapic::Config::Method.new add_chart_config + remove_chart_config = parent_rpcs.remove_chart if parent_rpcs.respond_to? :remove_chart + @remove_chart = ::Gapic::Config::Method.new remove_chart_config + edit_chart_config = parent_rpcs.edit_chart if parent_rpcs.respond_to? :edit_chart + @edit_chart = ::Gapic::Config::Method.new edit_chart_config + duplicate_chart_config = parent_rpcs.duplicate_chart if parent_rpcs.respond_to? :duplicate_chart + @duplicate_chart = ::Gapic::Config::Method.new duplicate_chart_config + export_native_dashboards_config = parent_rpcs.export_native_dashboards if parent_rpcs.respond_to? :export_native_dashboards + @export_native_dashboards = ::Gapic::Config::Method.new export_native_dashboards_config + import_native_dashboards_config = parent_rpcs.import_native_dashboards if parent_rpcs.respond_to? :import_native_dashboards + @import_native_dashboards = ::Gapic::Config::Method.new import_native_dashboards_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb new file mode 100644 index 000000000000..ac3f7512afa5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module NativeDashboardService + # Credentials for the NativeDashboardService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb new file mode 100644 index 000000000000..0b8f9b39f7ea --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb @@ -0,0 +1,115 @@ +# 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 Chronicle + module V1 + module NativeDashboardService + # Path helper methods for the NativeDashboardService API. + module Paths + ## + # Create a fully-qualified DashboardChart resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param chart [String] + # + # @return [::String] + def dashboard_chart_path project:, location:, instance:, chart: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" + end + + ## + # Create a fully-qualified DashboardQuery resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param query [String] + # + # @return [::String] + def dashboard_query_path project:, location:, instance:, query: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardQueries/#{query}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified NativeDashboard resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param dashboard [String] + # + # @return [::String] + def native_dashboard_path project:, location:, instance:, dashboard: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/nativeDashboards/#{dashboard}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb new file mode 100644 index 000000000000..2a050c29ca53 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/native_dashboard_service/credentials" +require "google/cloud/chronicle/v1/native_dashboard_service/paths" +require "google/cloud/chronicle/v1/native_dashboard_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing native dashboards. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/native_dashboard_service/rest" + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + module NativeDashboardService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/native_dashboard_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb new file mode 100644 index 000000000000..0445e075d588 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb @@ -0,0 +1,1484 @@ +# 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/chronicle/v1/native_dashboard_pb" +require "google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module NativeDashboardService + module Rest + ## + # REST client for the NativeDashboardService service. + # + # A service providing functionality for managing native dashboards. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :native_dashboard_service_stub + + ## + # Configure the NativeDashboardService Client class. + # + # See {::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NativeDashboardService clients + # ::Google::Cloud::Chronicle::V1::NativeDashboardService::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", "Chronicle", "V1"] + 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_native_dashboard.timeout = 60.0 + + default_config.rpcs.get_native_dashboard.timeout = 60.0 + default_config.rpcs.get_native_dashboard.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_native_dashboards.timeout = 60.0 + default_config.rpcs.list_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_native_dashboard.timeout = 60.0 + + default_config.rpcs.duplicate_native_dashboard.timeout = 60.0 + + default_config.rpcs.delete_native_dashboard.timeout = 60.0 + + default_config.rpcs.add_chart.timeout = 60.0 + + default_config.rpcs.remove_chart.timeout = 60.0 + + default_config.rpcs.edit_chart.timeout = 60.0 + + default_config.rpcs.duplicate_chart.timeout = 60.0 + + default_config.rpcs.export_native_dashboards.timeout = 60.0 + default_config.rpcs.export_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.import_native_dashboards.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::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 + @native_dashboard_service_stub.universe_domain + end + + ## + # Create a new NativeDashboardService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NativeDashboardService 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 + + @native_dashboard_service_stub = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @native_dashboard_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @native_dashboard_service_stub.logger + end + + # Service calls + + ## + # Create a dashboard. + # + # @overload create_native_dashboard(request, options = nil) + # Pass arguments to `create_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, ::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_native_dashboard(parent: nil, native_dashboard: nil) + # Pass arguments to `create_native_dashboard` 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 parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. The dashboard to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new + # + # # Call the create_native_dashboard method. + # result = client.create_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def create_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.create_native_dashboard 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 + + ## + # Get a dashboard. + # + # @overload get_native_dashboard(request, options = nil) + # Pass arguments to `get_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, ::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_native_dashboard(name: nil, view: nil) + # Pass arguments to `get_native_dashboard` 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 dashboard name to fetch. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new + # + # # Call the get_native_dashboard method. + # result = client.get_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def get_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.get_native_dashboard 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 + + ## + # List all dashboards. + # + # @overload list_native_dashboards(request, options = nil) + # Pass arguments to `list_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, ::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_native_dashboards(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_native_dashboards` 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 parent owning this dashboard collection. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param page_size [::Integer] + # Optional. The maximum number of dashboards to return. The service may + # return fewer than this value. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDashboards` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDashboards` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new + # + # # Call the list_native_dashboards method. + # result = client.list_native_dashboards 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::Chronicle::V1::NativeDashboard. + # p item + # end + # + def list_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.list_native_dashboards request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @native_dashboard_service_stub, :list_native_dashboards, "native_dashboards", 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 + + ## + # Update a dashboard. + # + # @overload update_native_dashboard(request, options = nil) + # Pass arguments to `update_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, ::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_native_dashboard(native_dashboard: nil, update_mask: nil) + # Pass arguments to `update_native_dashboard` 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 native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. The dashboard to update. + # + # The dashboard's `name` field is used to identify the dashboard to update. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. LINT.IfChange(update_mask_values) + # The list of fields to update. + # Supported paths are - + # display_name + # description + # definition.filters + # definition.charts + # type + # access + # dashboard_user_data.is_pinned + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new + # + # # Call the update_native_dashboard method. + # result = client.update_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def update_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.update_native_dashboard 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 + + ## + # Duplicate a dashboard. + # + # @overload duplicate_native_dashboard(request, options = nil) + # Pass arguments to `duplicate_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, ::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 duplicate_native_dashboard(name: nil, native_dashboard: nil) + # Pass arguments to `duplicate_native_dashboard` 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 dashboard name to duplicate. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. Any fields that need modification can be passed through this like + # name, description etc. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new + # + # # Call the duplicate_native_dashboard method. + # result = client.duplicate_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def duplicate_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest + + # 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.duplicate_native_dashboard.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::Chronicle::V1::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.duplicate_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.duplicate_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.duplicate_native_dashboard 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 + + ## + # Delete a dashboard. + # + # @overload delete_native_dashboard(request, options = nil) + # Pass arguments to `delete_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, ::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_native_dashboard(name: nil) + # Pass arguments to `delete_native_dashboard` 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 dashboard name to delete. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new + # + # # Call the delete_native_dashboard method. + # result = client.delete_native_dashboard request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.delete_native_dashboard 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 + + ## + # Add chart in a dashboard. + # + # @overload add_chart(request, options = nil) + # Pass arguments to `add_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::AddChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::AddChartRequest, ::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 add_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, chart_layout: nil) + # Pass arguments to `add_chart` 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 dashboard name to add chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Optional. Query used to create the chart. + # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] + # Required. Chart to be added to the dashboard. + # @param chart_layout [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout, ::Hash] + # Required. ChartLayout for newly added chart. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::AddChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::AddChartResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::AddChartRequest.new + # + # # Call the add_chart method. + # result = client.add_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::AddChartResponse. + # p result + # + def add_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::AddChartRequest + + # 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.add_chart.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::Chronicle::V1::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.add_chart.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.add_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.add_chart 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 + + ## + # Remove chart from a dashboard. + # + # @overload remove_chart(request, options = nil) + # Pass arguments to `remove_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::RemoveChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::RemoveChartRequest, ::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 remove_chart(name: nil, dashboard_chart: nil) + # Pass arguments to `remove_chart` 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 dashboard name to remove chart from. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_chart [::String] + # Required. The dashboard chart name to remove. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::RemoveChartRequest.new + # + # # Call the remove_chart method. + # result = client.remove_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def remove_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::RemoveChartRequest + + # 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.remove_chart.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::Chronicle::V1::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.remove_chart.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.remove_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.remove_chart 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 + + ## + # Edit chart in a dashboard. + # + # @overload edit_chart(request, options = nil) + # Pass arguments to `edit_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::EditChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::EditChartRequest, ::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 edit_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, edit_mask: nil, language_features: nil) + # Pass arguments to `edit_chart` 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 dashboard name to edit chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Optional. Query for the edited chart. + # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] + # Optional. Edited chart. + # @param edit_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to edit for chart and query. + # Supported paths in chart are - + # dashboard_chart.display_name + # dashboard_chart.description + # dashboard_chart.chart_datasource.data_sources + # dashboard_chart.visualization + # dashboard_chart.visualization.button + # dashboard_chart.visualization.markdown + # dashboard_chart.drill_down_config + # Supported paths in query are - + # dashboard_query.query + # dashboard_query.input + # @param language_features [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] + # Optional. Language Features present in the query. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::EditChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::EditChartResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::EditChartRequest.new + # + # # Call the edit_chart method. + # result = client.edit_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::EditChartResponse. + # p result + # + def edit_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::EditChartRequest + + # 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.edit_chart.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::Chronicle::V1::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.edit_chart.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.edit_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.edit_chart 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 + + ## + # Duplicate chart in a dashboard. + # + # @overload duplicate_chart(request, options = nil) + # Pass arguments to `duplicate_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DuplicateChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DuplicateChartRequest, ::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 duplicate_chart(name: nil, dashboard_chart: nil) + # Pass arguments to `duplicate_chart` 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 dashboard name that involves chart duplication. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_chart [::String] + # Required. The dashboard chart name to duplicate. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DuplicateChartRequest.new + # + # # Call the duplicate_chart method. + # result = client.duplicate_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DuplicateChartResponse. + # p result + # + def duplicate_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateChartRequest + + # 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.duplicate_chart.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::Chronicle::V1::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.duplicate_chart.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.duplicate_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.duplicate_chart 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 + + ## + # Exports the dashboards. + # + # @overload export_native_dashboards(request, options = nil) + # Pass arguments to `export_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, names: nil) + # Pass arguments to `export_native_dashboards` 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 parent resource that the dashboards to be exported belong to. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param names [::Array<::String>] + # Required. The resource names of the dashboards to export. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new + # + # # Call the export_native_dashboards method. + # result = client.export_native_dashboards request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse. + # p result + # + def export_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.export_native_dashboards 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 + + ## + # Imports the dashboards. + # + # @overload import_native_dashboards(request, options = nil) + # Pass arguments to `import_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, source: nil) + # Pass arguments to `import_native_dashboards` 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 parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param source [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource, ::Hash] + # Required. The data will imported from this proto. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new + # + # # Call the import_native_dashboards method. + # result = client.import_native_dashboards request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse. + # p result + # + def import_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.import_native_dashboards 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 + + ## + # Configuration class for the NativeDashboardService REST API. + # + # This class represents the configuration for NativeDashboardService 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::Chronicle::V1::NativeDashboardService::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_native_dashboard to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_native_dashboard.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_native_dashboard.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. + # * `: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 = "chronicle.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 NativeDashboardService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :create_native_dashboard + ## + # RPC-specific configuration for `get_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :get_native_dashboard + ## + # RPC-specific configuration for `list_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :list_native_dashboards + ## + # RPC-specific configuration for `update_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :update_native_dashboard + ## + # RPC-specific configuration for `duplicate_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :duplicate_native_dashboard + ## + # RPC-specific configuration for `delete_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_native_dashboard + ## + # RPC-specific configuration for `add_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :add_chart + ## + # RPC-specific configuration for `remove_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_chart + ## + # RPC-specific configuration for `edit_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :edit_chart + ## + # RPC-specific configuration for `duplicate_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :duplicate_chart + ## + # RPC-specific configuration for `export_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :export_native_dashboards + ## + # RPC-specific configuration for `import_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :import_native_dashboards + + # @private + def initialize parent_rpcs = nil + create_native_dashboard_config = parent_rpcs.create_native_dashboard if parent_rpcs.respond_to? :create_native_dashboard + @create_native_dashboard = ::Gapic::Config::Method.new create_native_dashboard_config + get_native_dashboard_config = parent_rpcs.get_native_dashboard if parent_rpcs.respond_to? :get_native_dashboard + @get_native_dashboard = ::Gapic::Config::Method.new get_native_dashboard_config + list_native_dashboards_config = parent_rpcs.list_native_dashboards if parent_rpcs.respond_to? :list_native_dashboards + @list_native_dashboards = ::Gapic::Config::Method.new list_native_dashboards_config + update_native_dashboard_config = parent_rpcs.update_native_dashboard if parent_rpcs.respond_to? :update_native_dashboard + @update_native_dashboard = ::Gapic::Config::Method.new update_native_dashboard_config + duplicate_native_dashboard_config = parent_rpcs.duplicate_native_dashboard if parent_rpcs.respond_to? :duplicate_native_dashboard + @duplicate_native_dashboard = ::Gapic::Config::Method.new duplicate_native_dashboard_config + delete_native_dashboard_config = parent_rpcs.delete_native_dashboard if parent_rpcs.respond_to? :delete_native_dashboard + @delete_native_dashboard = ::Gapic::Config::Method.new delete_native_dashboard_config + add_chart_config = parent_rpcs.add_chart if parent_rpcs.respond_to? :add_chart + @add_chart = ::Gapic::Config::Method.new add_chart_config + remove_chart_config = parent_rpcs.remove_chart if parent_rpcs.respond_to? :remove_chart + @remove_chart = ::Gapic::Config::Method.new remove_chart_config + edit_chart_config = parent_rpcs.edit_chart if parent_rpcs.respond_to? :edit_chart + @edit_chart = ::Gapic::Config::Method.new edit_chart_config + duplicate_chart_config = parent_rpcs.duplicate_chart if parent_rpcs.respond_to? :duplicate_chart + @duplicate_chart = ::Gapic::Config::Method.new duplicate_chart_config + export_native_dashboards_config = parent_rpcs.export_native_dashboards if parent_rpcs.respond_to? :export_native_dashboards + @export_native_dashboards = ::Gapic::Config::Method.new export_native_dashboards_config + import_native_dashboards_config = parent_rpcs.import_native_dashboards if parent_rpcs.respond_to? :import_native_dashboards + @import_native_dashboards = ::Gapic::Config::Method.new import_native_dashboards_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb new file mode 100644 index 000000000000..86cf453f442d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb @@ -0,0 +1,822 @@ +# 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/chronicle/v1/native_dashboard_pb" + +module Google + module Cloud + module Chronicle + module V1 + module NativeDashboardService + module Rest + ## + # REST service stub for the NativeDashboardService 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_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest] + # 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::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # A result object deserialized from the server's reply + def create_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_native_dashboard_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_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::NativeDashboard.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_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest] + # 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::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # A result object deserialized from the server's reply + def get_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_native_dashboard_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_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::NativeDashboard.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_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest] + # 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::Chronicle::V1::ListNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse] + # A result object deserialized from the server's reply + def list_native_dashboards request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_native_dashboards_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_native_dashboards", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse.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_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest] + # 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::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # A result object deserialized from the server's reply + def update_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_native_dashboard_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_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::NativeDashboard.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the duplicate_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest] + # 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::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # A result object deserialized from the server's reply + def duplicate_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_duplicate_native_dashboard_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: "duplicate_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::NativeDashboard.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_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest] + # 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_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_native_dashboard_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_native_dashboard", + 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 add_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::AddChartRequest] + # 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::Chronicle::V1::AddChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::AddChartResponse] + # A result object deserialized from the server's reply + def add_chart request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_add_chart_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: "add_chart", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::AddChartResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the remove_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::RemoveChartRequest] + # 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::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # A result object deserialized from the server's reply + def remove_chart request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_remove_chart_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: "remove_chart", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::NativeDashboard.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the edit_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::EditChartRequest] + # 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::Chronicle::V1::EditChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::EditChartResponse] + # A result object deserialized from the server's reply + def edit_chart request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_edit_chart_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: "edit_chart", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::EditChartResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the duplicate_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateChartRequest] + # 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::Chronicle::V1::DuplicateChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] + # A result object deserialized from the server's reply + def duplicate_chart request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_duplicate_chart_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: "duplicate_chart", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DuplicateChartResponse.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_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest] + # 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::Chronicle::V1::ExportNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] + # A result object deserialized from the server's reply + def export_native_dashboards request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_native_dashboards_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_native_dashboards", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse.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_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest] + # 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::Chronicle::V1::ImportNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] + # A result object deserialized from the server's reply + def import_native_dashboards request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_native_dashboards_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_native_dashboards", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse.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_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest] + # 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_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/nativeDashboards", + body: "native_dashboard", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest] + # 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_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest] + # 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_native_dashboards_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/nativeDashboards", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest] + # 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_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{native_dashboard.name}", + body: "native_dashboard", + matches: [ + ["native_dashboard.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the duplicate_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_duplicate_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:duplicate", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest] + # 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_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the add_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::AddChartRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_add_chart_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:addChart", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the remove_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::RemoveChartRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_remove_chart_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:removeChart", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the edit_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::EditChartRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_edit_chart_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:editChart", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the duplicate_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateChartRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_duplicate_chart_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:duplicateChart", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest] + # 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_native_dashboards_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/nativeDashboards:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest] + # 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_native_dashboards_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/nativeDashboards:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb new file mode 100644 index 000000000000..c0256a88d967 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb @@ -0,0 +1,67 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/native_dashboard.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/native_dashboard_pb' + +module Google + module Cloud + module Chronicle + module V1 + module NativeDashboardService + # A service providing functionality for managing native dashboards. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.NativeDashboardService' + + # Create a dashboard. + rpc :CreateNativeDashboard, ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard + # Get a dashboard. + rpc :GetNativeDashboard, ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard + # List all dashboards. + rpc :ListNativeDashboards, ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse + # Update a dashboard. + rpc :UpdateNativeDashboard, ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard + # Duplicate a dashboard. + rpc :DuplicateNativeDashboard, ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard + # Delete a dashboard. + rpc :DeleteNativeDashboard, ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, ::Google::Protobuf::Empty + # Add chart in a dashboard. + rpc :AddChart, ::Google::Cloud::Chronicle::V1::AddChartRequest, ::Google::Cloud::Chronicle::V1::AddChartResponse + # Remove chart from a dashboard. + rpc :RemoveChart, ::Google::Cloud::Chronicle::V1::RemoveChartRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard + # Edit chart in a dashboard. + rpc :EditChart, ::Google::Cloud::Chronicle::V1::EditChartRequest, ::Google::Cloud::Chronicle::V1::EditChartResponse + # Duplicate chart in a dashboard. + rpc :DuplicateChart, ::Google::Cloud::Chronicle::V1::DuplicateChartRequest, ::Google::Cloud::Chronicle::V1::DuplicateChartResponse + # Exports the dashboards. + rpc :ExportNativeDashboards, ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse + # Imports the dashboards. + rpc :ImportNativeDashboards, ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb new file mode 100644 index 000000000000..7cd0fc43edd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/reference_list.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/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/chronicle/v1/reference_list.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"]\n\tScopeInfo\x12P\n\x14reference_list_scope\x18\x02 \x01(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListScopeB\x03\xe0\x41\x02\".\n\x12ReferenceListScope\x12\x18\n\x0bscope_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x93\x01\n\x17GetReferenceListRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12:\n\x04view\x18\x02 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"\xbe\x01\n\x19ListReferenceListsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12:\n\x04view\x18\x04 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"x\n\x1aListReferenceListsResponse\x12\x41\n\x0freference_lists\x18\x01 \x03(\x0b\x32(.google.cloud.chronicle.v1.ReferenceList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1a\x43reateReferenceListRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x45\n\x0ereference_list\x18\x02 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12\x1e\n\x11reference_list_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1aUpdateReferenceListRequest\x12\x45\n\x0ereference_list\x18\x01 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xaa\x04\n\rReferenceList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07\x65ntries\x18\x05 \x03(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xe0\x41\x02\x12\x12\n\x05rules\x18\x06 \x03(\tB\x03\xe0\x41\x03\x12L\n\x0bsyntax_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xe0\x41\x02\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x38\n\nscope_info\x18\x0b \x01(\x0b\x32$.google.cloud.chronicle.v1.ScopeInfo:\x8a\x01\xea\x41\x86\x01\n&chronicle.googleapis.com/ReferenceList\x12\\projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}\"(\n\x12ReferenceListEntry\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02*\xc2\x01\n\x17ReferenceListSyntaxType\x12*\n&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\x10\x00\x12\x30\n,REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\x10\x01\x12$\n REFERENCE_LIST_SYNTAX_TYPE_REGEX\x10\x02\x12#\n\x1fREFERENCE_LIST_SYNTAX_TYPE_CIDR\x10\x03*u\n\x11ReferenceListView\x12#\n\x1fREFERENCE_LIST_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19REFERENCE_LIST_VIEW_BASIC\x10\x01\x12\x1c\n\x18REFERENCE_LIST_VIEW_FULL\x10\x02\x32\xf5\x07\n\x14ReferenceListService\x12\xbf\x01\n\x10GetReferenceList\x12\x32.google.cloud.chronicle.v1.GetReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\x12\xd2\x01\n\x12ListReferenceLists\x12\x34.google.cloud.chronicle.v1.ListReferenceListsRequest\x1a\x35.google.cloud.chronicle.v1.ListReferenceListsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/referenceLists\x12\xf9\x01\n\x13\x43reateReferenceList\x12\x35.google.cloud.chronicle.v1.CreateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x80\x01\xda\x41\'parent,reference_list,reference_list_id\x82\xd3\xe4\x93\x02P\">/v1/{parent=projects/*/locations/*/instances/*}/referenceLists:\x0ereference_list\x12\xfb\x01\n\x13UpdateReferenceList\x12\x35.google.cloud.chronicle.v1.UpdateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x82\x01\xda\x41\x1areference_list,update_mask\x82\xd3\xe4\x93\x02_2M/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}:\x0ereference_list\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc9\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x12ReferenceListProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + ScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ScopeInfo").msgclass + ReferenceListScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListScope").msgclass + GetReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetReferenceListRequest").msgclass + ListReferenceListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsRequest").msgclass + ListReferenceListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsResponse").msgclass + CreateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateReferenceListRequest").msgclass + UpdateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateReferenceListRequest").msgclass + ReferenceList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceList").msgclass + ReferenceListEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListEntry").msgclass + ReferenceListSyntaxType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListSyntaxType").enummodule + ReferenceListView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb new file mode 100644 index 000000000000..e88bb3a15142 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/reference_list_service/credentials" +require "google/cloud/chronicle/v1/reference_list_service/paths" +require "google/cloud/chronicle/v1/reference_list_service/client" +require "google/cloud/chronicle/v1/reference_list_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # ReferenceListService provides an interface for managing reference lists. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/reference_list_service" + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/reference_list_service/rest" + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + module ReferenceListService + end + end + end + end +end + +helper_path = ::File.join __dir__, "reference_list_service", "helpers.rb" +require "google/cloud/chronicle/v1/reference_list_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb new file mode 100644 index 000000000000..7472a7315b5a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb @@ -0,0 +1,809 @@ +# 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/chronicle/v1/reference_list_pb" + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + ## + # Client for the ReferenceListService service. + # + # ReferenceListService provides an interface for managing reference lists. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reference_list_service_stub + + ## + # Configure the ReferenceListService Client class. + # + # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReferenceListService clients + # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] + 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.get_reference_list.timeout = 60.0 + default_config.rpcs.get_reference_list.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_reference_lists.timeout = 60.0 + default_config.rpcs.list_reference_lists.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_reference_list.timeout = 60.0 + + default_config.rpcs.update_reference_list.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 + @reference_list_service_stub.universe_domain + end + + ## + # Create a new ReferenceListService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReferenceListService 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/chronicle/v1/reference_list_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 + + @reference_list_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::ReferenceListService::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 + ) + + @reference_list_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reference_list_service_stub.logger + end + + # Service calls + + ## + # Gets a single reference list. + # + # @overload get_reference_list(request, options = nil) + # Pass arguments to `get_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::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_reference_list(name: nil, view: nil) + # Pass arguments to `get_reference_list` 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 reference list to retrieve. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of the ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_FULL. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new + # + # # Call the get_reference_list method. + # result = client.get_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def get_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :get_reference_list, 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 a collection of reference lists. + # + # @overload list_reference_lists(request, options = nil) + # Pass arguments to `list_reference_lists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_reference_lists` 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 parent, which owns this collection of reference lists. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of reference lists to return. + # The service may return fewer than this value. + # If unspecified, at most 100 reference lists will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListReferenceLists` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListReferenceLists` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of each ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new + # + # # Call the list_reference_lists method. + # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. + # p item + # end + # + def list_reference_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest + + # 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_reference_lists.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::Chronicle::V1::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_reference_lists.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reference_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :list_reference_lists, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, 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 + + ## + # Creates a new reference list. + # + # @overload create_reference_list(request, options = nil) + # Pass arguments to `create_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) + # Pass arguments to `create_reference_list` 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 parent resource where this reference list will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to create. + # @param reference_list_id [::String] + # Required. The ID to use for the reference list. This is also the display + # name for the reference list. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Has length less than 256. + # - Must be unique. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new + # + # # Call the create_reference_list method. + # result = client.create_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def create_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :create_reference_list, 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 + + ## + # Updates an existing reference list. + # + # @overload update_reference_list(request, options = nil) + # Pass arguments to `update_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::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_reference_list(reference_list: nil, update_mask: nil) + # Pass arguments to `update_reference_list` 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 reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to update. + # + # The reference list's `name` field is used to identify the reference list to + # update. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # When no field mask is supplied, all non-empty fields will be updated. + # A field mask of "*" will update all fields, whether empty or not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new + # + # # Call the update_reference_list method. + # result = client.update_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def update_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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.reference_list&.name + header_params["reference_list.name"] = request.reference_list.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_reference_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :update_reference_list, 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 + + ## + # Configuration class for the ReferenceListService API. + # + # This class represents the configuration for ReferenceListService, + # 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::Chronicle::V1::ReferenceListService::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 + # # get_reference_list to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.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::Chronicle::V1::ReferenceListService::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. + # * `: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 = "chronicle.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 ReferenceListService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reference_list + ## + # RPC-specific configuration for `list_reference_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reference_lists + ## + # RPC-specific configuration for `create_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reference_list + ## + # RPC-specific configuration for `update_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :update_reference_list + + # @private + def initialize parent_rpcs = nil + get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list + @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config + list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists + @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config + create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list + @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config + update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list + @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb new file mode 100644 index 000000000000..bc9bb656539c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + module ReferenceListService + # Credentials for the ReferenceListService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb new file mode 100644 index 000000000000..0655f1b591bb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb @@ -0,0 +1,73 @@ +# 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 Chronicle + module V1 + module ReferenceListService + # Path helper methods for the ReferenceListService API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified ReferenceList resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param reference_list [String] + # + # @return [::String] + def reference_list_path project:, location:, instance:, reference_list: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb new file mode 100644 index 000000000000..72c3da5feecc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/reference_list_service/credentials" +require "google/cloud/chronicle/v1/reference_list_service/paths" +require "google/cloud/chronicle/v1/reference_list_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # ReferenceListService provides an interface for managing reference lists. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/reference_list_service/rest" + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + module ReferenceListService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/reference_list_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb new file mode 100644 index 000000000000..31d0d82a8c4c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb @@ -0,0 +1,738 @@ +# 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/chronicle/v1/reference_list_pb" +require "google/cloud/chronicle/v1/reference_list_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + module Rest + ## + # REST client for the ReferenceListService service. + # + # ReferenceListService provides an interface for managing reference lists. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reference_list_service_stub + + ## + # Configure the ReferenceListService Client class. + # + # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReferenceListService clients + # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] + 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.get_reference_list.timeout = 60.0 + default_config.rpcs.get_reference_list.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_reference_lists.timeout = 60.0 + default_config.rpcs.list_reference_lists.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_reference_list.timeout = 60.0 + + default_config.rpcs.update_reference_list.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 + @reference_list_service_stub.universe_domain + end + + ## + # Create a new ReferenceListService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReferenceListService 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 + + @reference_list_service_stub = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @reference_list_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reference_list_service_stub.logger + end + + # Service calls + + ## + # Gets a single reference list. + # + # @overload get_reference_list(request, options = nil) + # Pass arguments to `get_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::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_reference_list(name: nil, view: nil) + # Pass arguments to `get_reference_list` 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 reference list to retrieve. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of the ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_FULL. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new + # + # # Call the get_reference_list method. + # result = client.get_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def get_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.get_reference_list 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 a collection of reference lists. + # + # @overload list_reference_lists(request, options = nil) + # Pass arguments to `list_reference_lists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_reference_lists` 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 parent, which owns this collection of reference lists. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of reference lists to return. + # The service may return fewer than this value. + # If unspecified, at most 100 reference lists will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListReferenceLists` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListReferenceLists` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of each ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new + # + # # Call the list_reference_lists method. + # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. + # p item + # end + # + def list_reference_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest + + # 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_reference_lists.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::Chronicle::V1::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_reference_lists.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reference_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.list_reference_lists request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, "reference_lists", 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 + + ## + # Creates a new reference list. + # + # @overload create_reference_list(request, options = nil) + # Pass arguments to `create_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) + # Pass arguments to `create_reference_list` 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 parent resource where this reference list will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to create. + # @param reference_list_id [::String] + # Required. The ID to use for the reference list. This is also the display + # name for the reference list. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Has length less than 256. + # - Must be unique. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new + # + # # Call the create_reference_list method. + # result = client.create_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def create_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.create_reference_list 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 + + ## + # Updates an existing reference list. + # + # @overload update_reference_list(request, options = nil) + # Pass arguments to `update_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::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_reference_list(reference_list: nil, update_mask: nil) + # Pass arguments to `update_reference_list` 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 reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to update. + # + # The reference list's `name` field is used to identify the reference list to + # update. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # When no field mask is supplied, all non-empty fields will be updated. + # A field mask of "*" will update all fields, whether empty or not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new + # + # # Call the update_reference_list method. + # result = client.update_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def update_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.update_reference_list 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 + + ## + # Configuration class for the ReferenceListService REST API. + # + # This class represents the configuration for ReferenceListService 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::Chronicle::V1::ReferenceListService::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 + # # get_reference_list to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.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. + # * `: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 = "chronicle.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 ReferenceListService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reference_list + ## + # RPC-specific configuration for `list_reference_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reference_lists + ## + # RPC-specific configuration for `create_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reference_list + ## + # RPC-specific configuration for `update_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :update_reference_list + + # @private + def initialize parent_rpcs = nil + get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list + @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config + list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists + @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config + create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list + @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config + update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list + @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb new file mode 100644 index 000000000000..718ce68bd0d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb @@ -0,0 +1,327 @@ +# 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/chronicle/v1/reference_list_pb" + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + module Rest + ## + # REST service stub for the ReferenceListService 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 get_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] + # 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::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # A result object deserialized from the server's reply + def get_reference_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_reference_list_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_reference_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_lists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] + # 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::Chronicle::V1::ListReferenceListsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListReferenceListsResponse] + # A result object deserialized from the server's reply + def list_reference_lists request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reference_lists_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_reference_lists", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] + # 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::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # A result object deserialized from the server's reply + def create_reference_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_reference_list_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_reference_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] + # 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::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # A result object deserialized from the server's reply + def update_reference_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_reference_list_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_reference_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ReferenceList.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 get_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] + # 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_reference_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reference_lists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] + # 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_reference_lists_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/referenceLists", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] + # 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_reference_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/referenceLists", + body: "reference_list", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] + # 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_reference_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{reference_list.name}", + body: "reference_list", + matches: [ + ["reference_list.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb new file mode 100644 index 000000000000..aa0cb32e7359 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/reference_list.proto for package 'Google.Cloud.Chronicle.V1' +# 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/chronicle/v1/reference_list_pb' + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + # ReferenceListService provides an interface for managing reference lists. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.ReferenceListService' + + # Gets a single reference list. + rpc :GetReferenceList, ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList + # Lists a collection of reference lists. + rpc :ListReferenceLists, ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse + # Creates a new reference list. + rpc :CreateReferenceList, ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList + # Updates an existing reference list. + rpc :UpdateReferenceList, ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb new file mode 100644 index 000000000000..9311811310c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb @@ -0,0 +1,46 @@ +# 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/chronicle/v1/dashboard_query_service/rest" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest" +require "google/cloud/chronicle/v1/data_access_control_service/rest" +require "google/cloud/chronicle/v1/data_table_service/rest" +require "google/cloud/chronicle/v1/entity_service/rest" +require "google/cloud/chronicle/v1/native_dashboard_service/rest" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" +require "google/cloud/chronicle/v1/instance_service/rest" +require "google/cloud/chronicle/v1/reference_list_service/rest" +require "google/cloud/chronicle/v1/rule_service/rest" +require "google/cloud/chronicle/v1/version" + +module Google + module Cloud + module Chronicle + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/chronicle/v1/rest" + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb new file mode 100644 index 000000000000..e4b4236afdf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/rule.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/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n$google/cloud/chronicle/v1/rule.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\x91\t\n\x04Rule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04text\x18\x04 \x01(\t\x12\x13\n\x06\x61uthor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12:\n\x08severity\x18\x06 \x01(\x0b\x32#.google.cloud.chronicle.v1.SeverityB\x03\xe0\x41\x03\x12\x44\n\x08metadata\x18\x07 \x03(\x0b\x32-.google.cloud.chronicle.v1.Rule.MetadataEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x11\x63ompilation_state\x18\n \x01(\x0e\x32\x30.google.cloud.chronicle.v1.Rule.CompilationStateB\x03\xe0\x41\x03\x12\x36\n\x04type\x18\x0c \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleTypeB\x03\xe0\x41\x03\x12G\n\x0freference_lists\x18\r \x03(\tB.\xe0\x41\x03\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12M\n\x17\x61llowed_run_frequencies\x18\x0e \x03(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequencyB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0f \x01(\t\x12<\n\x05scope\x18\x10 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12V\n\x17\x63ompilation_diagnostics\x18\x11 \x03(\x0b\x32\x30.google.cloud.chronicle.v1.CompilationDiagnosticB\x03\xe0\x41\x03\x12.\n!near_real_time_live_rule_eligible\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0binputs_used\x18\x14 \x01(\x0b\x32%.google.cloud.chronicle.v1.InputsUsedB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"P\n\x10\x43ompilationState\x12!\n\x1d\x43OMPILATION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02:m\xea\x41j\n\x1d\x63hronicle.googleapis.com/Rule\x12Iprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}\"\xcb\x05\n\x0eRuleDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x12\x10\n\x08\x61lerting\x18\x03 \x01(\x08\x12\x10\n\x08\x61rchived\x18\x04 \x01(\x08\x12\x35\n\x0c\x61rchive_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\rrun_frequency\x18\x06 \x01(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequency\x12V\n\x0f\x65xecution_state\x18\x07 \x01(\x0e\x32\x38.google.cloud.chronicle.v1.RuleDeployment.ExecutionStateB\x03\xe0\x41\x03\x12=\n\x0eproducer_rules\x18\x08 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12=\n\x0e\x63onsumer_rules\x18\t \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x46\n\x1dlast_alert_status_change_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"W\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0b\n\x07LIMITED\x10\x02\x12\n\n\x06PAUSED\x10\x03:\x82\x01\xea\x41\x7f\n\'chronicle.googleapis.com/RuleDeployment\x12Tprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment\"\xc8\x03\n\tRetrohunt\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x10process_interval\x18\x02 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x36\n\x12\x65xecution_interval\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.cloud.chronicle.v1.Retrohunt.StateB\x03\xe0\x41\x03\x12 \n\x13progress_percentage\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\"P\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x8a\x01\xea\x41\x86\x01\n\"chronicle.googleapis.com/Retrohunt\x12`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}\"~\n\x11\x43reateRuleRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x32\n\x04rule\x18\x02 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\"x\n\x0eGetRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"\xb3\x01\n\x10ListRulesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\\\n\x11ListRulesResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x11UpdateRuleRequest\x12\x32\n\x04rule\x18\x01 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\\\n\x11\x44\x65leteRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa9\x01\n\x18ListRuleRevisionsRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"d\n\x19ListRuleRevisionsResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x01\n\x16\x43reateRetrohuntRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\x12<\n\tretrohunt\x18\x02 \x01(\x0b\x32$.google.cloud.chronicle.v1.RetrohuntB\x03\xe0\x41\x02\"O\n\x13GetRetrohuntRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Retrohunt\"\x8a\x01\n\x15ListRetrohuntsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"k\n\x16ListRetrohuntsResponse\x12\x38\n\nretrohunts\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.Retrohunt\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x18GetRuleDeploymentRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/RuleDeployment\"\x94\x01\n\x1aListRuleDeploymentsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/RuleDeployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"{\n\x1bListRuleDeploymentsResponse\x12\x43\n\x10rule_deployments\x18\x01 \x03(\x0b\x32).google.cloud.chronicle.v1.RuleDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9c\x01\n\x1bUpdateRuleDeploymentRequest\x12G\n\x0frule_deployment\x18\x01 \x01(\x0b\x32).google.cloud.chronicle.v1.RuleDeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"y\n\x13\x43ompilationPosition\x12\x17\n\nstart_line\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cstart_column\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_line\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nend_column\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\"\x96\x02\n\x15\x43ompilationDiagnostic\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x08position\x18\x02 \x01(\x0b\x32..google.cloud.chronicle.v1.CompilationPositionB\x03\xe0\x41\x03\x12P\n\x08severity\x18\x03 \x01(\x0e\x32\x39.google.cloud.chronicle.v1.CompilationDiagnostic.SeverityB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x05 \x01(\tB\x03\xe0\x41\x03\"<\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\" \n\x08Severity\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\"\x9a\x01\n\x11RetrohuntMetadata\x12\x35\n\tretrohunt\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x12\x65xecution_interval\x18\x02 \x01(\x0b\x32\x15.google.type.Interval\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x02\"Z\n\nInputsUsed\x12\x15\n\x08uses_udm\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0buses_entity\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0euses_detection\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01*N\n\x0cRunFrequency\x12\x1d\n\x19RUN_FREQUENCY_UNSPECIFIED\x10\x00\x12\x08\n\x04LIVE\x10\x01\x12\n\n\x06HOURLY\x10\x02\x12\t\n\x05\x44\x41ILY\x10\x03*H\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSINGLE_EVENT\x10\x01\x12\x0f\n\x0bMULTI_EVENT\x10\x02*V\n\x08RuleView\x12\x19\n\x15RULE_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\x1a\n\x16REVISION_METADATA_ONLY\x10\x03\x32\xa9\x13\n\x0bRuleService\x12\xae\x01\n\nCreateRule\x12,.google.cloud.chronicle.v1.CreateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"Q\xda\x41\x0bparent,rule\x82\xd3\xe4\x93\x02=\"5/v1/{parent=projects/*/locations/*/instances/*}/rules:\x04rule\x12\x9b\x01\n\x07GetRule\x12).google.cloud.chronicle.v1.GetRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xae\x01\n\tListRules\x12+.google.cloud.chronicle.v1.ListRulesRequest\x1a,.google.cloud.chronicle.v1.ListRulesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*/instances/*}/rules\x12\xb8\x01\n\nUpdateRule\x12,.google.cloud.chronicle.v1.UpdateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"[\xda\x41\x10rule,update_mask\x82\xd3\xe4\x93\x02\x42\x32:/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}:\x04rule\x12\x98\x01\n\nDeleteRule\x12,.google.cloud.chronicle.v1.DeleteRuleRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xd2\x01\n\x11ListRuleRevisions\x12\x33.google.cloud.chronicle.v1.ListRuleRevisionsRequest\x1a\x34.google.cloud.chronicle.v1.ListRuleRevisionsResponse\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{name=projects/*/locations/*/instances/*/rules/*}:listRevisions\x12\xef\x01\n\x0f\x43reateRetrohunt\x12\x31.google.cloud.chronicle.v1.CreateRetrohuntRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1e\n\tRetrohunt\x12\x11RetrohuntMetadata\xda\x41\x10parent,retrohunt\x82\xd3\xe4\x93\x02O\"B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts:\tretrohunt\x12\xb7\x01\n\x0cGetRetrohunt\x12..google.cloud.chronicle.v1.GetRetrohuntRequest\x1a$.google.cloud.chronicle.v1.Retrohunt\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}\x12\xca\x01\n\x0eListRetrohunts\x12\x30.google.cloud.chronicle.v1.ListRetrohuntsRequest\x1a\x31.google.cloud.chronicle.v1.ListRetrohuntsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts\x12\xc4\x01\n\x11GetRuleDeployment\x12\x33.google.cloud.chronicle.v1.GetRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}\x12\xda\x01\n\x13ListRuleDeployments\x12\x35.google.cloud.chronicle.v1.ListRuleDeploymentsRequest\x1a\x36.google.cloud.chronicle.v1.ListRuleDeploymentsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments\x12\x83\x02\n\x14UpdateRuleDeployment\x12\x36.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"\x87\x01\xda\x41\x1brule_deployment,update_mask\x82\xd3\xe4\x93\x02\x63\x32P/v1/{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}:\x0frule_deployment\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc0\x01\n\x1d\x63om.google.cloud.chronicle.v1B\tRuleProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule").msgclass + Rule::CompilationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule.CompilationState").enummodule + RuleDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment").msgclass + RuleDeployment::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment.ExecutionState").enummodule + Retrohunt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt").msgclass + Retrohunt::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt.State").enummodule + CreateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRuleRequest").msgclass + GetRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleRequest").msgclass + ListRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesRequest").msgclass + ListRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesResponse").msgclass + UpdateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleRequest").msgclass + DeleteRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteRuleRequest").msgclass + ListRuleRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsRequest").msgclass + ListRuleRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsResponse").msgclass + CreateRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRetrohuntRequest").msgclass + GetRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRetrohuntRequest").msgclass + ListRetrohuntsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsRequest").msgclass + ListRetrohuntsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsResponse").msgclass + GetRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleDeploymentRequest").msgclass + ListRuleDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsRequest").msgclass + ListRuleDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsResponse").msgclass + UpdateRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleDeploymentRequest").msgclass + CompilationPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationPosition").msgclass + CompilationDiagnostic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic").msgclass + CompilationDiagnostic::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic.Severity").enummodule + Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Severity").msgclass + RetrohuntMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RetrohuntMetadata").msgclass + InputsUsed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InputsUsed").msgclass + RunFrequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RunFrequency").enummodule + RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleType").enummodule + RuleView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb new file mode 100644 index 000000000000..e84fdd68ca88 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb @@ -0,0 +1,56 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/rule_service/credentials" +require "google/cloud/chronicle/v1/rule_service/paths" +require "google/cloud/chronicle/v1/rule_service/operations" +require "google/cloud/chronicle/v1/rule_service/client" +require "google/cloud/chronicle/v1/rule_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # RuleService provides interface for user-created rules. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/rule_service" + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/rule_service/rest" + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + module RuleService + end + end + end + end +end + +helper_path = ::File.join __dir__, "rule_service", "helpers.rb" +require "google/cloud/chronicle/v1/rule_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb new file mode 100644 index 000000000000..53a82998663a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb @@ -0,0 +1,1691 @@ +# 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/chronicle/v1/rule_pb" + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + ## + # Client for the RuleService service. + # + # RuleService provides interface for user-created rules. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :rule_service_stub + + ## + # Configure the RuleService Client class. + # + # See {::Google::Cloud::Chronicle::V1::RuleService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RuleService clients + # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] + 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_rule.timeout = 60.0 + + default_config.rpcs.get_rule.timeout = 60.0 + default_config.rpcs.get_rule.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rules.timeout = 600.0 + default_config.rpcs.list_rules.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule.timeout = 600.0 + + default_config.rpcs.delete_rule.timeout = 60.0 + + default_config.rpcs.list_rule_revisions.timeout = 600.0 + default_config.rpcs.list_rule_revisions.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_retrohunt.timeout = 600.0 + + default_config.rpcs.get_retrohunt.timeout = 60.0 + default_config.rpcs.get_retrohunt.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_retrohunts.timeout = 60.0 + default_config.rpcs.list_retrohunts.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_rule_deployment.timeout = 600.0 + default_config.rpcs.get_rule_deployment.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rule_deployments.timeout = 600.0 + default_config.rpcs.list_rule_deployments.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule_deployment.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RuleService 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::Chronicle::V1::RuleService::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 + @rule_service_stub.universe_domain + end + + ## + # Create a new RuleService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RuleService 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/chronicle/v1/rule_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 + + @rule_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::RuleService::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 + ) + + @rule_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::Chronicle::V1::RuleService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @rule_service_stub.logger + end + + # Service calls + + ## + # Creates a new Rule. + # + # @overload create_rule(request, options = nil) + # Pass arguments to `create_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::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_rule(parent: nil, rule: nil) + # Pass arguments to `create_rule` 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 parent resource where this rule will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new + # + # # Call the create_rule method. + # result = client.create_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def create_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :create_rule, 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 Rule. + # + # @overload get_rule(request, options = nil) + # Pass arguments to `get_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::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_rule(name: nil, view: nil) + # Pass arguments to `get_rule` 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 name of the rule to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the Rule being + # returned. If unspecified, defaults to FULL. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new + # + # # Call the get_rule method. + # result = client.get_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def get_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :get_rule, 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 Rules. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) + # Pass arguments to `list_rules` 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 parent, which owns this collection of rules. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of rules to return. The service may return fewer than + # this value. If unspecified, at most 100 rules will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRules` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRules` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # view indicates the scope of fields to populate for the Rule being returned. + # If unspecified, defaults to BASIC. + # @param filter [::String] + # Only the following filters are allowed: + # "reference_lists:\\{reference_list_name}" + # "data_tables:\\{data_table_name}" + # "display_name:\\{display_name}" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest + + # 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_rules.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::Chronicle::V1::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_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_rules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rules, 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 Rule. + # + # @overload update_rule(request, options = nil) + # Pass arguments to `update_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::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_rule(rule: nil, update_mask: nil) + # Pass arguments to `update_rule` 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 rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to update. + # + # The rule's `name` field is used to identify the rule to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new + # + # # Call the update_rule method. + # result = client.update_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def update_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest + + # 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_rule.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::Chronicle::V1::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.rule&.name + header_params["rule.name"] = request.rule.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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :update_rule, 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 Rule. + # + # @overload delete_rule(request, options = nil) + # Pass arguments to `delete_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::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_rule(name: nil, force: nil) + # Pass arguments to `delete_rule` 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 name of the rule to delete. A rule revision timestamp cannot + # be specified as part of the name, as deleting specific revisions is not + # supported. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param force [::Boolean] + # Optional. If set to true, any retrohunts and any detections associated with + # the rule will also be deleted. If set to false, the call will only succeed + # if the rule has no associated retrohunts, including completed retrohunts, + # and no associated detections. Regardless of this field's value, the rule + # deployment associated with this rule will also 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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new + # + # # Call the delete_rule method. + # result = client.delete_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :delete_rule, 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 all revisions of the rule. + # + # @overload list_rule_revisions(request, options = nil) + # Pass arguments to `list_rule_revisions` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_rule_revisions` 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 name of the rule to list revisions for. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of revisions to return per page. The service may return + # fewer than this value. If unspecified, at most 100 revisions will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # The page token, received from a previous `ListRuleRevisions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleRevisions` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the revision + # being returned. If unspecified, defaults to BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new + # + # # Call the list_rule_revisions method. + # result = client.list_rule_revisions 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rule_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest + + # 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_rule_revisions.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::Chronicle::V1::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_rule_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rule_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_rule_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, 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 + + ## + # Create a Retrohunt. + # + # @overload create_retrohunt(request, options = nil) + # Pass arguments to `create_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::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_retrohunt(parent: nil, retrohunt: nil) + # Pass arguments to `create_retrohunt` 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 parent of retrohunt, which is a rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] + # Required. The retrohunt 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/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new + # + # # Call the create_retrohunt method. + # result = client.create_retrohunt 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_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest + + # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :create_retrohunt, 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 + + ## + # Get a Retrohunt. + # + # @overload get_retrohunt(request, options = nil) + # Pass arguments to `get_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::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_retrohunt(name: nil) + # Pass arguments to `get_retrohunt` 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 name of the retrohunt to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Retrohunt] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new + # + # # Call the get_retrohunt method. + # result = client.get_retrohunt request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. + # p result + # + def get_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest + + # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :get_retrohunt, 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 + + ## + # List Retrohunts. + # + # @overload list_retrohunts(request, options = nil) + # Pass arguments to `list_retrohunts` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_retrohunts` 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 rule that the retrohunts belong to. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of retrohunt to return. The service may return fewer + # than this value. If unspecified, at most 100 retrohunts will be returned. + # The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRetrohunts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRetrohunts` must + # match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # state + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new + # + # # Call the list_retrohunts method. + # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. + # p item + # end + # + def list_retrohunts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest + + # 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_retrohunts.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::Chronicle::V1::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_retrohunts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_retrohunts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_retrohunts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_retrohunts, 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 + + ## + # Gets a RuleDeployment. + # + # @overload get_rule_deployment(request, options = nil) + # Pass arguments to `get_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::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_rule_deployment(name: nil) + # Pass arguments to `get_rule_deployment` 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 name of the rule deployment to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new + # + # # Call the get_rule_deployment method. + # result = client.get_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def get_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest + + # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :get_rule_deployment, 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 RuleDeployments across all Rules. + # + # @overload list_rule_deployments(request, options = nil) + # Pass arguments to `list_rule_deployments` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_rule_deployments` 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 collection of all parents which own all rule deployments. The + # "-" wildcard token must be used as the rule identifier in the resource + # path. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/-` + # @param page_size [::Integer] + # The maximum number of rule deployments to return. The service may return + # fewer than this value. If unspecified, at most 100 rule deployments will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRuleDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleDeployments` + # must match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # archived, name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new + # + # # Call the list_rule_deployments method. + # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. + # p item + # end + # + def list_rule_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest + + # 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_rule_deployments.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::Chronicle::V1::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_rule_deployments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rule_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_rule_deployments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, 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 RuleDeployment. + # Failures are not necessarily atomic. If there is a request to update + # multiple fields, and any update to a single field fails, an error will be + # returned, but other fields may remain successfully updated. + # + # @overload update_rule_deployment(request, options = nil) + # Pass arguments to `update_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::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_rule_deployment(rule_deployment: nil, update_mask: nil) + # Pass arguments to `update_rule_deployment` 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 rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] + # Required. The rule deployment to update. + # + # The rule deployment's `name` field is used to identify the rule deployment + # to update. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new + # + # # Call the update_rule_deployment method. + # result = client.update_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def update_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest + + # 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_rule_deployment.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::Chronicle::V1::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.rule_deployment&.name + header_params["rule_deployment.name"] = request.rule_deployment.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_rule_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :update_rule_deployment, 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 + + ## + # Configuration class for the RuleService API. + # + # This class represents the configuration for RuleService, + # 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::Chronicle::V1::RuleService::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_rule to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::RuleService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.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::Chronicle::V1::RuleService::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. + # * `: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 = "chronicle.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 RuleService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_rule + ## + # RPC-specific configuration for `get_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `update_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule + ## + # RPC-specific configuration for `delete_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_rule + ## + # RPC-specific configuration for `list_rule_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_revisions + ## + # RPC-specific configuration for `create_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :create_retrohunt + ## + # RPC-specific configuration for `get_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :get_retrohunt + ## + # RPC-specific configuration for `list_retrohunts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_retrohunts + ## + # RPC-specific configuration for `get_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule_deployment + ## + # RPC-specific configuration for `list_rule_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_deployments + ## + # RPC-specific configuration for `update_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule_deployment + + # @private + def initialize parent_rpcs = nil + create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule + @create_rule = ::Gapic::Config::Method.new create_rule_config + get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule + @get_rule = ::Gapic::Config::Method.new get_rule_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule + @update_rule = ::Gapic::Config::Method.new update_rule_config + delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule + @delete_rule = ::Gapic::Config::Method.new delete_rule_config + list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions + @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config + create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt + @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config + get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt + @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config + list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts + @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config + get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment + @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config + list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments + @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config + update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment + @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb new file mode 100644 index 000000000000..a66ae4c0ebf6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + module RuleService + # Credentials for the RuleService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb new file mode 100644 index 000000000000..162ec1fb3163 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb @@ -0,0 +1,841 @@ +# 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 Chronicle + module V1 + module RuleService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the RuleService 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 RuleService 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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + 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. + # * `: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 = "chronicle.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. + # * `: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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb new file mode 100644 index 000000000000..00b03a7b2d54 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb @@ -0,0 +1,159 @@ +# 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 Chronicle + module V1 + module RuleService + # Path helper methods for the RuleService API. + module Paths + ## + # Create a fully-qualified DataAccessScope resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_scope [String] + # + # @return [::String] + def data_access_scope_path project:, location:, instance:, data_access_scope: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified ReferenceList resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param reference_list [String] + # + # @return [::String] + def reference_list_path project:, location:, instance:, reference_list: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" + end + + ## + # Create a fully-qualified Retrohunt resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param rule [String] + # @param retrohunt [String] + # + # @return [::String] + def retrohunt_path project:, location:, instance:, rule:, retrohunt: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + raise ::ArgumentError, "rule cannot contain /" if rule.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/retrohunts/#{retrohunt}" + end + + ## + # Create a fully-qualified Rule resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param rule [String] + # + # @return [::String] + def rule_path project:, location:, instance:, rule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}" + end + + ## + # Create a fully-qualified RuleDeployment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param rule [String] + # + # @return [::String] + def rule_deployment_path project:, location:, instance:, rule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/deployment" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb new file mode 100644 index 000000000000..d27a86220664 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb @@ -0,0 +1,53 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/rule_service/credentials" +require "google/cloud/chronicle/v1/rule_service/paths" +require "google/cloud/chronicle/v1/rule_service/rest/operations" +require "google/cloud/chronicle/v1/rule_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # RuleService provides interface for user-created rules. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/rule_service/rest" + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + module RuleService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/rule_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb new file mode 100644 index 000000000000..e29466693f60 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb @@ -0,0 +1,1564 @@ +# 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + module Rest + ## + # REST client for the RuleService service. + # + # RuleService provides interface for user-created rules. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :rule_service_stub + + ## + # Configure the RuleService Client class. + # + # See {::Google::Cloud::Chronicle::V1::RuleService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RuleService clients + # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] + 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_rule.timeout = 60.0 + + default_config.rpcs.get_rule.timeout = 60.0 + default_config.rpcs.get_rule.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rules.timeout = 600.0 + default_config.rpcs.list_rules.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule.timeout = 600.0 + + default_config.rpcs.delete_rule.timeout = 60.0 + + default_config.rpcs.list_rule_revisions.timeout = 600.0 + default_config.rpcs.list_rule_revisions.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_retrohunt.timeout = 600.0 + + default_config.rpcs.get_retrohunt.timeout = 60.0 + default_config.rpcs.get_retrohunt.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_retrohunts.timeout = 60.0 + default_config.rpcs.list_retrohunts.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_rule_deployment.timeout = 600.0 + default_config.rpcs.get_rule_deployment.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rule_deployments.timeout = 600.0 + default_config.rpcs.list_rule_deployments.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule_deployment.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RuleService 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::Chronicle::V1::RuleService::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 + @rule_service_stub.universe_domain + end + + ## + # Create a new RuleService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RuleService 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::Chronicle::V1::RuleService::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 + + @rule_service_stub = ::Google::Cloud::Chronicle::V1::RuleService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @rule_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::Chronicle::V1::RuleService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @rule_service_stub.logger + end + + # Service calls + + ## + # Creates a new Rule. + # + # @overload create_rule(request, options = nil) + # Pass arguments to `create_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::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_rule(parent: nil, rule: nil) + # Pass arguments to `create_rule` 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 parent resource where this rule will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new + # + # # Call the create_rule method. + # result = client.create_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def create_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.create_rule 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 Rule. + # + # @overload get_rule(request, options = nil) + # Pass arguments to `get_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::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_rule(name: nil, view: nil) + # Pass arguments to `get_rule` 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 name of the rule to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the Rule being + # returned. If unspecified, defaults to FULL. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new + # + # # Call the get_rule method. + # result = client.get_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def get_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.get_rule 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 Rules. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) + # Pass arguments to `list_rules` 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 parent, which owns this collection of rules. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of rules to return. The service may return fewer than + # this value. If unspecified, at most 100 rules will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRules` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRules` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # view indicates the scope of fields to populate for the Rule being returned. + # If unspecified, defaults to BASIC. + # @param filter [::String] + # Only the following filters are allowed: + # "reference_lists:\\{reference_list_name}" + # "data_tables:\\{data_table_name}" + # "display_name:\\{display_name}" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest + + # 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_rules.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::Chronicle::V1::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_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_rules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rules, "rules", 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 Rule. + # + # @overload update_rule(request, options = nil) + # Pass arguments to `update_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::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_rule(rule: nil, update_mask: nil) + # Pass arguments to `update_rule` 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 rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to update. + # + # The rule's `name` field is used to identify the rule to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new + # + # # Call the update_rule method. + # result = client.update_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def update_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.update_rule 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 Rule. + # + # @overload delete_rule(request, options = nil) + # Pass arguments to `delete_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::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_rule(name: nil, force: nil) + # Pass arguments to `delete_rule` 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 name of the rule to delete. A rule revision timestamp cannot + # be specified as part of the name, as deleting specific revisions is not + # supported. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param force [::Boolean] + # Optional. If set to true, any retrohunts and any detections associated with + # the rule will also be deleted. If set to false, the call will only succeed + # if the rule has no associated retrohunts, including completed retrohunts, + # and no associated detections. Regardless of this field's value, the rule + # deployment associated with this rule will also 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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new + # + # # Call the delete_rule method. + # result = client.delete_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.delete_rule 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 all revisions of the rule. + # + # @overload list_rule_revisions(request, options = nil) + # Pass arguments to `list_rule_revisions` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_rule_revisions` 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 name of the rule to list revisions for. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of revisions to return per page. The service may return + # fewer than this value. If unspecified, at most 100 revisions will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # The page token, received from a previous `ListRuleRevisions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleRevisions` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the revision + # being returned. If unspecified, defaults to BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new + # + # # Call the list_rule_revisions method. + # result = client.list_rule_revisions 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rule_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest + + # 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_rule_revisions.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::Chronicle::V1::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_rule_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rule_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_rule_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, "rules", 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 + + ## + # Create a Retrohunt. + # + # @overload create_retrohunt(request, options = nil) + # Pass arguments to `create_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::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_retrohunt(parent: nil, retrohunt: nil) + # Pass arguments to `create_retrohunt` 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 parent of retrohunt, which is a rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] + # Required. The retrohunt 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/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new + # + # # Call the create_retrohunt method. + # result = client.create_retrohunt 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_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest + + # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.create_retrohunt 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 + + ## + # Get a Retrohunt. + # + # @overload get_retrohunt(request, options = nil) + # Pass arguments to `get_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::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_retrohunt(name: nil) + # Pass arguments to `get_retrohunt` 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 name of the retrohunt to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Retrohunt] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new + # + # # Call the get_retrohunt method. + # result = client.get_retrohunt request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. + # p result + # + def get_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest + + # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.get_retrohunt 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 + + ## + # List Retrohunts. + # + # @overload list_retrohunts(request, options = nil) + # Pass arguments to `list_retrohunts` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_retrohunts` 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 rule that the retrohunts belong to. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of retrohunt to return. The service may return fewer + # than this value. If unspecified, at most 100 retrohunts will be returned. + # The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRetrohunts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRetrohunts` must + # match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # state + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new + # + # # Call the list_retrohunts method. + # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. + # p item + # end + # + def list_retrohunts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest + + # 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_retrohunts.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::Chronicle::V1::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_retrohunts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_retrohunts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_retrohunts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_retrohunts, "retrohunts", 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 a RuleDeployment. + # + # @overload get_rule_deployment(request, options = nil) + # Pass arguments to `get_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::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_rule_deployment(name: nil) + # Pass arguments to `get_rule_deployment` 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 name of the rule deployment to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new + # + # # Call the get_rule_deployment method. + # result = client.get_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def get_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest + + # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.get_rule_deployment 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 RuleDeployments across all Rules. + # + # @overload list_rule_deployments(request, options = nil) + # Pass arguments to `list_rule_deployments` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_rule_deployments` 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 collection of all parents which own all rule deployments. The + # "-" wildcard token must be used as the rule identifier in the resource + # path. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/-` + # @param page_size [::Integer] + # The maximum number of rule deployments to return. The service may return + # fewer than this value. If unspecified, at most 100 rule deployments will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRuleDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleDeployments` + # must match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # archived, name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new + # + # # Call the list_rule_deployments method. + # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. + # p item + # end + # + def list_rule_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest + + # 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_rule_deployments.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::Chronicle::V1::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_rule_deployments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rule_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_rule_deployments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, "rule_deployments", 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 RuleDeployment. + # Failures are not necessarily atomic. If there is a request to update + # multiple fields, and any update to a single field fails, an error will be + # returned, but other fields may remain successfully updated. + # + # @overload update_rule_deployment(request, options = nil) + # Pass arguments to `update_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::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_rule_deployment(rule_deployment: nil, update_mask: nil) + # Pass arguments to `update_rule_deployment` 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 rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] + # Required. The rule deployment to update. + # + # The rule deployment's `name` field is used to identify the rule deployment + # to update. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new + # + # # Call the update_rule_deployment method. + # result = client.update_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def update_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest + + # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.update_rule_deployment 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 + + ## + # Configuration class for the RuleService REST API. + # + # This class represents the configuration for RuleService 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::Chronicle::V1::RuleService::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_rule to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.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. + # * `: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 = "chronicle.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 RuleService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_rule + ## + # RPC-specific configuration for `get_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `update_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule + ## + # RPC-specific configuration for `delete_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_rule + ## + # RPC-specific configuration for `list_rule_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_revisions + ## + # RPC-specific configuration for `create_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :create_retrohunt + ## + # RPC-specific configuration for `get_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :get_retrohunt + ## + # RPC-specific configuration for `list_retrohunts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_retrohunts + ## + # RPC-specific configuration for `get_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule_deployment + ## + # RPC-specific configuration for `list_rule_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_deployments + ## + # RPC-specific configuration for `update_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule_deployment + + # @private + def initialize parent_rpcs = nil + create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule + @create_rule = ::Gapic::Config::Method.new create_rule_config + get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule + @get_rule = ::Gapic::Config::Method.new get_rule_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule + @update_rule = ::Gapic::Config::Method.new update_rule_config + delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule + @delete_rule = ::Gapic::Config::Method.new delete_rule_config + list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions + @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config + create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt + @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config + get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt + @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config + list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts + @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config + get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment + @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config + list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments + @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config + update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment + @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb new file mode 100644 index 000000000000..f989eba5c49e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb @@ -0,0 +1,925 @@ +# 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 Chronicle + module V1 + module RuleService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the RuleService 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 RuleService 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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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 + + ## + # 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. + # * `: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 = "chronicle.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. + # * `: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 + + # @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 + + 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 + + ## + # @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: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, 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: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/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: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/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: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb new file mode 100644 index 000000000000..021e04869cad --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb @@ -0,0 +1,817 @@ +# 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/chronicle/v1/rule_pb" + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + module Rest + ## + # REST service stub for the RuleService 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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] + # 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::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # A result object deserialized from the server's reply + def create_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_rule_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_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] + # 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::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # A result object deserialized from the server's reply + def get_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_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_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Rule.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_rules REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] + # 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::Chronicle::V1::ListRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRulesResponse] + # A result object deserialized from the server's reply + def list_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_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_rules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] + # 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::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # A result object deserialized from the server's reply + def update_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_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_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] + # 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_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_rule_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_rule", + 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 list_rule_revisions REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] + # 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::Chronicle::V1::ListRuleRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse] + # A result object deserialized from the server's reply + def list_rule_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_revisions_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_rule_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] + # 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_retrohunt request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_retrohunt_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_retrohunt", + 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_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] + # 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::Chronicle::V1::Retrohunt] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # A result object deserialized from the server's reply + def get_retrohunt request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_retrohunt_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_retrohunt", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunts REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] + # 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::Chronicle::V1::ListRetrohuntsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse] + # A result object deserialized from the server's reply + def list_retrohunts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_retrohunts_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_retrohunts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] + # 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::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # A result object deserialized from the server's reply + def get_rule_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_deployment_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_rule_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployments REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] + # 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::Chronicle::V1::ListRuleDeploymentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse] + # A result object deserialized from the server's reply + def list_rule_deployments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_deployments_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_rule_deployments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] + # 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::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # A result object deserialized from the server's reply + def update_rule_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_deployment_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_rule_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rules", + body: "rule", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rules REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] + # 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_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/rules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rule.name}", + body: "rule", + matches: [ + ["rule.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rule_revisions REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] + # 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_rule_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:listRevisions", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] + # 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_retrohunt_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/retrohunts", + body: "retrohunt", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] + # 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_retrohunt_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/retrohunts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_retrohunts REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] + # 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_retrohunts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/retrohunts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] + # 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_rule_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rule_deployments REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] + # 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_rule_deployments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] + # 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_rule_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rule_deployment.name}", + body: "rule_deployment", + matches: [ + ["rule_deployment.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb new file mode 100644 index 000000000000..a893fb504269 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb @@ -0,0 +1,70 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/rule.proto for package 'Google.Cloud.Chronicle.V1' +# 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/chronicle/v1/rule_pb' + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + # RuleService provides interface for user-created rules. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.RuleService' + + # Creates a new Rule. + rpc :CreateRule, ::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule + # Gets a Rule. + rpc :GetRule, ::Google::Cloud::Chronicle::V1::GetRuleRequest, ::Google::Cloud::Chronicle::V1::Rule + # Lists Rules. + rpc :ListRules, ::Google::Cloud::Chronicle::V1::ListRulesRequest, ::Google::Cloud::Chronicle::V1::ListRulesResponse + # Updates a Rule. + rpc :UpdateRule, ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule + # Deletes a Rule. + rpc :DeleteRule, ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::Google::Protobuf::Empty + # Lists all revisions of the rule. + rpc :ListRuleRevisions, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse + # Create a Retrohunt. + rpc :CreateRetrohunt, ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::Google::Longrunning::Operation + # Get a Retrohunt. + rpc :GetRetrohunt, ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::Google::Cloud::Chronicle::V1::Retrohunt + # List Retrohunts. + rpc :ListRetrohunts, ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse + # Gets a RuleDeployment. + rpc :GetRuleDeployment, ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment + # Lists RuleDeployments across all Rules. + rpc :ListRuleDeployments, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse + # Updates a RuleDeployment. + # Failures are not necessarily atomic. If there is a request to update + # multiple fields, and any update to a single field fails, an error will be + # returned, but other fields may remain successfully updated. + rpc :UpdateRuleDeployment, ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb new file mode 100644 index 000000000000..6224648b9b26 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb @@ -0,0 +1,28 @@ +# 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 Chronicle + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md new file mode 100644 index 000000000000..70a487ac4c0f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Chronicle V1 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb new file mode 100644 index 000000000000..068b7f8c9990 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb @@ -0,0 +1,923 @@ +# 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 Chronicle + module V1 + # DashboardChart resource. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the dashboardChart. + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name/Title of the dashboardChart visible to users. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the dashboardChart. + # @!attribute [r] native_dashboard + # @return [::String] + # Output only. NativeDashboard this chart belongs to. + # @!attribute [rw] tile_type + # @return [::Google::Cloud::Chronicle::V1::TileType] + # Optional. Type of tile i.e., visualization, button or text. + # @!attribute [rw] chart_datasource + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::ChartDatasource] + # Optional. Query and datasource used in the chart. Should be empty for + # Button Tiles. + # @!attribute [rw] visualization + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization] + # Required. Depending on tile_type one of below fields will be required. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [rw] drill_down_config + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig] + # Optional. Drill down configuration. + # @!attribute [rw] tokens + # @return [::Array<::String>] + # Optional. List of Advanced Filter tokens used in this chart's query (e.g., + # "hostname", "ip"). This allows the UI to identify dependencies without + # parsing the query text. The tokens are stored without the wrapping '$' + # characters. + # The number of tokens are not expected to be more than 10. + class DashboardChart + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Datasource of the chart including the query reference and source name. + # @!attribute [rw] dashboard_query + # @return [::String] + # Reference to dashboard query resource used in the chart. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Cloud::Chronicle::V1::DataSource>] + # Name of the datasource used in the chart. + class ChartDatasource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Visualization config for a chart. + # https://echarts.apache.org/en/option.html#series + # @!attribute [rw] x_axes + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Axis>] + # @!attribute [rw] y_axes + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Axis>] + # @!attribute [rw] series + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series>] + # @!attribute [rw] tooltip + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Tooltip] + # @!attribute [rw] legends + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Legend>] + # @!attribute [rw] column_defs + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::ColumnDef>] + # Column Definition to represent chart as a table. + # @!attribute [rw] table_config + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::TableConfig] + # Optional. Configuration for table appearance. + # @!attribute [rw] button + # @return [::Google::Cloud::Chronicle::V1::Button] + # Button config for a chart if tileType is TILE_TYPE_BUTTON. + # @!attribute [rw] markdown + # @return [::Google::Cloud::Chronicle::V1::Markdown] + # Optional. Markdown config for a chart if tileType is TILE_TYPE_MARKDOWN. + # @!attribute [rw] series_column + # @return [::Array<::String>] + # Optional. Selected column for series + # @!attribute [rw] grouping_type + # @return [::String] + # Optional. Selected grouping type for series + # @!attribute [rw] google_maps_config + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig] + # Optional. Google Maps config for a chart if type is GOOGLE MAPS. + # @!attribute [rw] threshold_coloring_enabled + # @return [::Boolean] + # Optional. Whether threshold coloring is enabled for the chart. If it's + # enabled, the chart will be colored based on the values stored in + # VisualMap below. + # @!attribute [rw] visual_maps + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::VisualMap>] + # Optional. Visual maps for the chart. + class Visualization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] axis_type + # @return [::Google::Cloud::Chronicle::V1::AxisType] + # @!attribute [rw] display_name + # @return [::String] + # @!attribute [rw] min + # @return [::Integer] + # Minimum value to be rendered in ECharts as per + # https://echarts.apache.org/en/option.html#xAxis.min + # @!attribute [rw] max + # @return [::Integer] + # Maximum value to be rendered in ECharts as per + # https://echarts.apache.org/en/option.html#xAxis.max + class Axis + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] series_type + # @return [::Google::Cloud::Chronicle::V1::SeriesType] + # @!attribute [rw] series_name + # @return [::String] + # user specified series label + # @!attribute [rw] show_symbol + # @return [::Boolean] + # @!attribute [rw] show_background + # @return [::Boolean] + # @!attribute [rw] stack + # @return [::String] + # @!attribute [rw] series_stack_strategy + # @return [::Google::Cloud::Chronicle::V1::SeriesStackStrategy] + # @!attribute [rw] encode + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::Encode] + # @!attribute [rw] label + # @return [::String] + # @!attribute [rw] field + # @return [::String] + # @!attribute [rw] data_label + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::DataLabel] + # Optional. Data label config for a series. + # Displays data vaule in the chart + # @!attribute [rw] radius + # @return [::Array<::String>] + # Optional. Used to make a pie chart into a douhnut chart + # @!attribute [rw] item_style + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::ItemStyle] + # Optional. Custom styling for chart + # @!attribute [rw] series_unique_value + # @return [::String] + # Optional. Series unique value from the query result + # @!attribute [rw] area_style + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::AreaStyle] + # Optional. Custom styling for area chart + # @!attribute [rw] item_colors + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::ItemColors] + # Optional. Field to be saved for retrieving slice colors for the chart + # @!attribute [rw] gauge_config + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeConfig] + # Optional. Field to be saved for retrieving gauge config for gauge chart + # @!attribute [rw] metric_trend_config + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::MetricTrendConfig] + # Optional. Fields to capture trend config for metric charts + class Series + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] x + # @return [::String] + # @!attribute [rw] y + # @return [::String] + # @!attribute [rw] value + # @return [::String] + # For some type of series that are not in any coordinate system, like + # 'pie' + # @!attribute [rw] item_name + # @return [::String] + # This is useful in charts like 'pie', where data item name can be + # displayed in legend. + class Encode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data label config for a series. + # @!attribute [rw] show + # @return [::Boolean] + # Optional. Whether to show data label. + class DataLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Custom styling for chart + # @!attribute [rw] border_width + # @return [::Integer] + # Optional. Used to add border width + # @!attribute [rw] border_color + # @return [::String] + # Optional. Used to add border color + # @!attribute [rw] color + # @return [::String] + # Optional. Used to add color + class ItemStyle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Custom styling for area chart + # @!attribute [rw] color + # @return [::String] + # Optional. Used to add color + # @!attribute [rw] origin + # @return [::String] + # Optional. Used to add origin + # @!attribute [rw] shadow_blur + # @return [::Integer] + # Optional. Used to add shadow blur + # @!attribute [rw] shadow_color + # @return [::String] + # Optional. Used to add shadow color + # @!attribute [rw] shadow_offset_x + # @return [::Integer] + # Optional. Used to add shadow offsetX + # @!attribute [rw] shadow_offset_y + # @return [::Integer] + # Optional. Used to add shadow offsetY + # @!attribute [rw] opacity + # @return [::Integer] + # Optional. Used to add opacity + class AreaStyle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User selected color and label for the slice of the chart + # @!attribute [rw] color + # @return [::String] + # Optional. User specified color of a pie slice + # @!attribute [rw] label + # @return [::String] + # Optional. User specified label for a pie slice + class UserSelectedValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Slice containing the key and value for a slice in the chart + # @!attribute [rw] key + # @return [::String] + # Optional. Key for the slice + # @!attribute [rw] value + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::UserSelectedValues] + # Optional. Value for the slice + class ChartSliceColor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Field to be saved for retrieving slice colors for the chart + # @!attribute [rw] colors + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::ChartSliceColor>] + # Optional. Slice colors array + class ItemColors + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Field to be saved for retrieving value and color for gauge chart + # @!attribute [rw] value + # @return [::Integer] + # Optional. Value for gauge chart + # @!attribute [rw] color + # @return [::String] + # Optional. Color for gauge chart + class GaugeValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Field to be saved for retrieving value and color for gauge chart + # @!attribute [rw] base_value + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeValue] + # Optional. Base value for gauge chart + # @!attribute [rw] limit_value + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeValue] + # Optional. Limit value for gauge chart + # @!attribute [rw] threshold_values + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeValue>] + # Optional. Threshold values for gauge chart + class GaugeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metric trend config for displaying trend value in Metrics chart + # @!attribute [rw] metric_format + # @return [::Google::Cloud::Chronicle::V1::MetricFormat] + # Optional. Metric chart configuration to display metric trend + # @!attribute [rw] show_metric_trend + # @return [::Boolean] + # Optional. Metric chart configuration to toggle the trend value + # display + # @!attribute [rw] metric_display_trend + # @return [::Google::Cloud::Chronicle::V1::MetricDisplayTrend] + # Optional. Metric chart configuration to display the trend value + # @!attribute [rw] metric_trend_type + # @return [::Google::Cloud::Chronicle::V1::MetricTrendType] + # Optional. Metric chart configuration to display trend type whether + # regular or inverse + class MetricTrendConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] show + # @return [::Boolean] + # @!attribute [rw] tooltip_trigger + # @return [::Google::Cloud::Chronicle::V1::ToolTipTrigger] + class Tooltip + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] id + # @return [::String] + # @!attribute [rw] show + # @return [::Boolean] + # @!attribute [rw] z_level + # @return [::Integer] + # @!attribute [rw] z + # @return [::Integer] + # @!attribute [rw] left + # @return [::Integer] + # @!attribute [rw] top + # @return [::Integer] + # @!attribute [rw] right + # @return [::Integer] + # @!attribute [rw] bottom + # @return [::Integer] + # @!attribute [rw] legend_orient + # @return [::Google::Cloud::Chronicle::V1::LegendOrient] + # @!attribute [rw] legend_align + # @return [::Google::Cloud::Chronicle::V1::LegendAlign] + # @!attribute [rw] padding + # @return [::Array<::Integer>] + class Legend + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Column Definition. + # @!attribute [rw] field + # @return [::String] + # Field key in data. + # @!attribute [rw] header + # @return [::String] + # Header name for column. + class ColumnDef + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Column render type settings. This is used to determine the data render + # type of the column in the table. + # @!attribute [rw] field + # @return [::String] + # Optional. Field key in data. + # @!attribute [rw] column_render_type + # @return [::Google::Cloud::Chronicle::V1::RenderType] + # Optional. Column render type. + class ColumnRenderTypeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for tooltip for column header and cell. + # @!attribute [rw] field + # @return [::String] + # Required. Field key in data. + # @!attribute [rw] header_tooltip_text + # @return [::String] + # Optional. Column header tooltip text. + # @!attribute [rw] cell_tooltip_text + # @return [::String] + # Optional. Column cell tooltip text. + class ColumnTooltipSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for table appearance. + # @!attribute [rw] enable_text_wrap + # @return [::Boolean] + # Optional. Whether to show the table. + # @!attribute [rw] column_render_type_settings + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::ColumnRenderTypeSettings>] + # Optional. Column render type settings. + # @!attribute [rw] column_tooltip_settings + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::ColumnTooltipSettings>] + # Optional. Settings for tooltip for column header and cell. + class TableConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Google Maps config for a chart if chart type is map. + # @!attribute [rw] data_settings + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig::DataSettings] + # Optional. Data settings for the map. + # @!attribute [rw] plot_mode + # @return [::Google::Cloud::Chronicle::V1::PlotMode] + # Optional. Plot mode for the map. This is used to determine whether to + # show points, heatmap or both. + # @!attribute [rw] map_position + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig::MapPosition] + # Optional. Map position settings for the map. + # @!attribute [rw] point_settings + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig::PointSettings] + # Optional. Point settings for the map. + class GoogleMapsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Data settings for the map. + # @!attribute [rw] latitude_column + # @return [::String] + # Optional. Latitude column. + # @!attribute [rw] longitude_column + # @return [::String] + # Optional. Longitude column. + # @!attribute [rw] count_column + # @return [::String] + # Optional. Field to count. + class DataSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Map position settings for the map. + # @!attribute [rw] fit_data + # @return [::Boolean] + # Optional. Whether to fit the map to the data. + # If true, the map will be resized to fit the data. + # If false, langitude and longitude will be used to set the map size. + # @!attribute [rw] latitude_value + # @return [::Float] + # Optional. Latitude of the map. + # @!attribute [rw] longitude_value + # @return [::Float] + # Optional. Longitude of the map. + # @!attribute [rw] zoom_scale_value + # @return [::Float] + # Optional. Scale of the map. + class MapPosition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Point settings for the map. + # @!attribute [rw] point_size_type + # @return [::Google::Cloud::Chronicle::V1::PointSizeType] + # Optional. Point size type for the map. This is used to + # determine the size of the points on the map. + # @!attribute [rw] color + # @return [::String] + # Optional. Color for the point on the map. + class PointSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Conveys what range of values should be rendered in what color. This field + # is used when threshold_coloring_enabled is true. + # @!attribute [rw] visual_map_type + # @return [::Google::Cloud::Chronicle::V1::VisualMapType] + # Optional. Contains one of the valid visual map types such as + # 'continuous' or 'piecewise'. + # @!attribute [rw] pieces + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::VisualMap::VisualMapPiece>] + # Optional. Pieces of the visual map. + class VisualMap + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An ECharts visual map of type 'piecewise' contain many pieces. Each + # piece has a min, max, and color with which it's rendered. + # @!attribute [rw] min + # @return [::Integer] + # Optional. Minimum value for the piece. + # @!attribute [rw] max + # @return [::Integer] + # Optional. Minimum value for the piece. + # @!attribute [rw] color + # @return [::String] + # Optional. Color to render the piece in when the value is between min + # and max. + # @!attribute [rw] label + # @return [::String] + # Optional. Label used in visual map controller. + class VisualMapPiece + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Drill down configuration. + # @!attribute [rw] left_drill_downs + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown>] + # Required. Left click drill downs. + # @!attribute [rw] right_drill_downs + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown>] + # Required. Right click drill downs. + class DrillDownConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Drill down config. + # @!attribute [rw] default_settings + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::DefaultDrillDownSettings] + # Default drill down settings. + # + # Note: The following fields are mutually exclusive: `default_settings`, `custom_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_settings + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings] + # Custom drill down settings. + # + # Note: The following fields are mutually exclusive: `custom_settings`, `default_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # Required. ID of the drill down. + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the drill down. + class DrillDown + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Default drill down settings. + # @!attribute [rw] enabled + # @return [::Boolean] + # Required. Whether the default drill down is enabled. + class DefaultDrillDownSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Custom drill down settings. + # @!attribute [rw] query + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownQuery] + # Drill down query action config. + # + # Note: The following fields are mutually exclusive: `query`, `filter`, `external_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] filter + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter] + # Drill down filter action config. + # + # Note: The following fields are mutually exclusive: `filter`, `query`, `external_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] external_link + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownExternalLink] + # Drill down external link action config. + # + # Note: The following fields are mutually exclusive: `external_link`, `query`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] new_tab + # @return [::Boolean] + # Required. Whether to open the drill down action in a new tab. + # @!attribute [rw] left_click_column + # @return [::String] + # Optional. Table chart column name to associate the custom drill down + # action on left click. + class CustomDrillDownSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Drill down query config. + # @!attribute [rw] query + # @return [::String] + # Required. Search query to be executed on drill down. + class DrillDownQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Drill down filter config. + # @!attribute [rw] dashboard_filters + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter::DrillDownDashboardFilter>] + # Required. Dashboard filters to be applied on drill down. + class DrillDownFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Drill down dashboard filter config. + # @!attribute [rw] dashboard_filter_id + # @return [::String] + # Required. ID of the dashboard filter. + # @!attribute [rw] filter_operator_and_values + # @return [::Array<::Google::Cloud::Chronicle::V1::FilterOperatorAndValues>] + # Required. Filter operator and field values for the dashboard + # filter. + class DrillDownDashboardFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Drill down external link config. + # @!attribute [rw] link + # @return [::String] + # Required. External link the drill down action should redirect to. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the external link. + class DrillDownExternalLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + + # Button config for a chart. + # @!attribute [rw] label + # @return [::String] + # @!attribute [rw] hyperlink + # @return [::String] + # @!attribute [rw] description + # @return [::String] + # @!attribute [rw] new_tab + # @return [::Boolean] + # Optional. Whether to open the link in a new tab. + # @!attribute [rw] properties + # @return [::Google::Cloud::Chronicle::V1::Button::Properties] + class Button + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] color + # @return [::String] + # @!attribute [rw] button_style + # @return [::Google::Cloud::Chronicle::V1::ButtonStyle] + class Properties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Markdown config for a dashboard tile. + # @!attribute [rw] content + # @return [::String] + # Required. Markdown content. + # @!attribute [rw] properties + # @return [::Google::Cloud::Chronicle::V1::Markdown::MarkdownProperties] + # Optional. Properties for the markdown. + class Markdown + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Properties for the markdown. + # @!attribute [rw] background_color + # @return [::String] + # Optional. Background color of the markdown. + class MarkdownProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message to get a dashboard chart. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the dashboardChart to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardCharts/\\{chart} + class GetDashboardChartRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to get dashboard charts in batch. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource shared by all dashboard charts being + # retrieved. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance} If this is + # set, the parent of all of the dashboard charts specified in `names` must + # match this field. + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The names of the dashboard charts to get. + class BatchGetDashboardChartsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for getting dashboard charts in batch. + # @!attribute [rw] dashboard_charts + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart>] + # The dashboardCharts from the specified chronicle instance. + class BatchGetDashboardChartsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # TileType indicates what type of chart tile it is i.e., visualization chart, + # button or text. + module TileType + # Defaults to VISUALIZATION. + TILE_TYPE_UNSPECIFIED = 0 + + # Visualization i.e., bar charts, pie charts etc. + TILE_TYPE_VISUALIZATION = 1 + + # Button with hyperlink. + TILE_TYPE_BUTTON = 2 + + # Markdown tile. + TILE_TYPE_MARKDOWN = 3 + end + + # Render type of the data in the chart. + module RenderType + # Defaults to Unspecified. + RENDER_TYPE_UNSPECIFIED = 0 + + # Text render type. + RENDER_TYPE_TEXT = 1 + + # Icon render type. + RENDER_TYPE_ICON = 2 + + # Icon and text render type. + RENDER_TYPE_ICON_AND_TEXT = 3 + end + + module AxisType + AXIS_TYPE_UNSPECIFIED = 0 + + VALUE = 1 + + CATEGORY = 2 + + TIME = 3 + + LOG = 4 + end + + module SeriesType + SERIES_TYPE_UNSPECIFIED = 0 + + LINE = 1 + + BAR = 2 + + PIE = 3 + + TEXT = 4 + + # Represents map chart type. + MAP = 5 + + # Represents gauge chart type. + GAUGE = 6 + + # Represents scatterplot chart type. + SCATTERPLOT = 7 + end + + module SeriesStackStrategy + SERIES_STACK_STRATEGY_UNSPECIFIED = 0 + + SAMESIGN = 1 + + ALL = 2 + + POSITIVE = 3 + + NEGATIVE = 4 + end + + module ToolTipTrigger + TOOLTIP_TRIGGER_UNSPECIFIED = 0 + + TOOLTIP_TRIGGER_NONE = 1 + + TOOLTIP_TRIGGER_ITEM = 2 + + TOOLTIP_TRIGGER_AXIS = 3 + end + + module LegendOrient + LEGEND_ORIENT_UNSPECIFIED = 0 + + VERTICAL = 1 + + HORIZONTAL = 2 + end + + module LegendAlign + LEGEND_ALIGN_UNSPECIFIED = 0 + + AUTO = 1 + + LEFT = 2 + + RIGHT = 3 + end + + module ButtonStyle + BUTTON_STYLE_UNSPECIFIED = 0 + + BUTTON_STYLE_FILLED = 1 + + BUTTON_STYLE_OUTLINED = 2 + + BUTTON_STYLE_TRANSPARENT = 3 + end + + # Plot mode for the map. + module PlotMode + # Plot mode is not specified. + PLOT_MODE_UNSPECIFIED = 0 + + # Plot mode is points. + PLOT_MODE_POINTS = 1 + + # Plot mode is heatmap. + PLOT_MODE_HEATMAP = 2 + + # Plot mode is both points and heatmap. + PLOT_MODE_BOTH = 3 + end + + # Point size type for the map. + module PointSizeType + # Point size is not specified. + POINT_SIZE_TYPE_UNSPECIFIED = 0 + + # Point size is fixed. + POINT_SIZE_TYPE_FIXED = 1 + + # Point size is proportional to the size of the data point. + POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE = 2 + end + + # Metric format to be displayed for the metric charts. + module MetricFormat + # Metric format is not specified. + METRIC_FORMAT_UNSPECIFIED = 0 + + # Metric format in number + METRIC_FORMAT_NUMBER = 1 + + # Metric format in plain text + METRIC_FORMAT_PLAIN_TEXT = 2 + end + + # Trend to be displayed for the metric charts as. + module MetricDisplayTrend + # Trend is not specified. + METRIC_DISPLAY_TREND_UNSPECIFIED = 0 + + # Trend data in absolute value + METRIC_DISPLAY_TREND_ABSOLUTE_VALUE = 2 + + # Trend data in percentage + METRIC_DISPLAY_TREND_PERCENTAGE = 3 + + # Trend data in both absolute value and percentage + METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE = 4 + end + + # Trend to be displayed for the metric charts as. + module MetricTrendType + # Trend type is not specified. + METRIC_TREND_TYPE_UNSPECIFIED = 0 + + # The trend type is regular(green for positive delta) + METRIC_TREND_TYPE_REGULAR = 1 + + # The trend type is inverse(red for positive delta) + METRIC_TREND_TYPE_INVERSE = 2 + end + + # Visual map for various charts. More info: + # https://echarts.apache.org/en/option.html#visualMap + module VisualMapType + # Visual map type is not specified + VISUAL_MAP_TYPE_UNSPECIFIED = 0 + + # Continuous visual map + CONTINUOUS = 1 + + # Piecewise visual map + PIECEWISE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb new file mode 100644 index 000000000000..7a1dca16bc9a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb @@ -0,0 +1,653 @@ +# 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 Chronicle + module V1 + # DashboardQuery resource. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the dashboardQuery. + # @!attribute [rw] query + # @return [::String] + # Required. Search query string. + # @!attribute [rw] input + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery::Input] + # Required. Inputs to the query. + # @!attribute [r] dashboard_chart + # @return [::String] + # Output only. DashboardChart this query belongs to. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + class DashboardQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Input to the query like time window. + # @!attribute [rw] time_window + # @return [::Google::Type::Interval] + # time range to fetch the data for. + # + # Note: The following fields are mutually exclusive: `time_window`, `relative_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] relative_time + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery::Input::RelativeTime] + # time range for last x units. + # + # Note: The following fields are mutually exclusive: `relative_time`, `time_window`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Input + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # time representation for last x units. + # @!attribute [rw] time_unit + # @return [::Google::Cloud::Chronicle::V1::TimeUnit] + # @!attribute [rw] start_time_val + # @return [::Integer] + class RelativeTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Request message to get a dashboard query. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the dashboardQuery to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardQueries/\\{query} + class GetDashboardQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to execute a dashboard query. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, under which to run this dashboardQuery. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] query + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # Required. The query to execute and get results back for. + # QueryID or 'query', 'input.time_window' fields will be used. Use + # 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + # query. + # @!attribute [rw] filters + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter>] + # Optional. Dashboard level filters other than query string. + # @!attribute [rw] clear_cache + # @return [::Boolean] + # Optional. When true, the backend would read from the database, rather than + # fetching data directly from the cache. + # @!attribute [rw] use_previous_time_range + # @return [::Boolean] + # Optional. When true, the backend will execute the query against the + # previous time range of the query. + class ExecuteDashboardQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Runtime error for a dashboard query. + # @!attribute [rw] error_title + # @return [::String] + # Short Description of the error. + # @!attribute [rw] error_description + # @return [::String] + # Error message + # @!attribute [rw] error_severity + # @return [::Google::Cloud::Chronicle::V1::QueryRuntimeError::ErrorSeverity] + # Severity of the error. + # @!attribute [rw] metadata + # @return [::Array<::Google::Cloud::Chronicle::V1::QueryRuntimeError::QueryRuntimeErrorMetadata>] + # Metadata for the error. + # @!attribute [rw] warning_reason + # @return [::Google::Cloud::Chronicle::V1::QueryRuntimeError::WarningReason] + # Reason for the error. + class QueryRuntimeError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metadata for the error. + # @!attribute [rw] key + # @return [::Google::Cloud::Chronicle::V1::QueryRuntimeError::MetadataKey] + # Metadata key. + # @!attribute [rw] value + # @return [::String] + # Metadata value. + class QueryRuntimeErrorMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Based on ErrorSeverity, UI will choose to format the error differently. + module ErrorSeverity + # Severity is unknown. + ERROR_SEVERITY_UNSPECIFIED = 0 + + # Severity is warning. + WARNING = 1 + + # Error is severe. + SEVERE = 2 + end + + # Metadata enum to identify the metadata key. + module MetadataKey + # Key is unknown. + METADATA_KEY_UNSPECIFIED = 0 + + # Key is row limit. + ROW_LIMIT = 1 + end + + # Warning reason. + module WarningReason + # Reason is unknown. + WARNING_REASON_UNSPECIFIED = 0 + + # Reason is row limit exceeded. + ROW_LIMIT_EXCEEDED = 1 + + # Reason is default row limit exceeded. + DEFAULT_ROW_LIMIT_EXCEEDED = 2 + + # Reason is curated query default row limit exceeded. + CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED = 3 + end + end + + # Response message for executing a dashboard query. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnData>] + # Result rows that are queried. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Cloud::Chronicle::V1::DataSource>] + # Datasource of the query and results. + # @!attribute [rw] last_backend_cache_refreshed_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Last time the cache was refreshed. This would be used by the UI + # to show the last updated time. + # @!attribute [rw] time_window + # @return [::Google::Type::Interval] + # Time window against which query was executed. + # @!attribute [rw] query_runtime_errors + # @return [::Array<::Google::Cloud::Chronicle::V1::QueryRuntimeError>] + # Runtime errors + # @!attribute [rw] language_features + # @return [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] + # Optional. Language features found in the query. + class ExecuteDashboardQueryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # LINT.IfChange(stats_data) + # Value of the column based on data type. + # @!attribute [rw] null_val + # @return [::Boolean] + # True if the value is NULL. + # + # Note: The following fields are mutually exclusive: `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_val + # @return [::Boolean] + # Boolean value. + # + # Note: The following fields are mutually exclusive: `bool_val`, `null_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bytes_val + # @return [::String] + # Bytes value. + # + # Note: The following fields are mutually exclusive: `bytes_val`, `null_val`, `bool_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] double_val + # @return [::Float] + # Double value. + # + # Note: The following fields are mutually exclusive: `double_val`, `null_val`, `bool_val`, `bytes_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int64_val + # @return [::Integer] + # Integer value (signed). + # + # Note: The following fields are mutually exclusive: `int64_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] uint64_val + # @return [::Integer] + # Un-signed integer value. + # + # Note: The following fields are mutually exclusive: `uint64_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_val + # @return [::String] + # String value. Enum values are returned as strings. + # + # Note: The following fields are mutually exclusive: `string_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] timestamp_val + # @return [::Google::Protobuf::Timestamp] + # Timestamp values. Does not handle `interval`. + # + # Note: The following fields are mutually exclusive: `timestamp_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] date_val + # @return [::Google::Type::Date] + # Date values. + # + # Note: The following fields are mutually exclusive: `date_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] proto_val + # @return [::Google::Protobuf::Any] + # For any proto values that are not any of the above. + # + # Note: The following fields are mutually exclusive: `proto_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnValue::ValueMetadata] + class ColumnValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] links + # @return [::Array<::Google::Cloud::Chronicle::V1::InAppLink>] + # "Auto" generated In-app links. + # @!attribute [rw] field_paths + # @return [::Array<::String>] + # @!attribute [rw] timestamp_val + # @return [::Google::Protobuf::Timestamp] + # Timestamp value to store the timestamp for the case of the date and + # time data type. + class ValueMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Singular vs list of values in a column. + # @!attribute [rw] value + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnValue] + # Single value in a column. + # + # Note: The following fields are mutually exclusive: `value`, `list`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnType::List] + # List of values in a column e.g. IPs + # + # Note: The following fields are mutually exclusive: `list`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ColumnType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Store list of values in a column. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnValue>] + class List + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] column + # @return [::String] + # Used to store column names. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnType>] + # To store column data. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Chronicle::V1::ColumnMetadata] + # To store column metadata. + class ColumnData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Dashboard level filter that can be used in native dashboards as well as + # inputs to execute query. + # @!attribute [rw] id + # @return [::String] + # ID of the filter. + # @!attribute [rw] data_source + # @return [::Google::Cloud::Chronicle::V1::DataSource] + # Datasource the filter is applicable for. + # @!attribute [rw] field_path + # @return [::String] + # Filter field path. + # @!attribute [rw] filter_operator_and_field_values + # @return [::Array<::Google::Cloud::Chronicle::V1::FilterOperatorAndValues>] + # Operator and values. Can include multiple modifiers. + # @!attribute [rw] display_name + # @return [::String] + # Display name of the filter. + # @!attribute [rw] chart_ids + # @return [::Array<::String>] + # Chart IDs the filter is applicable for. + # @!attribute [rw] is_standard_time_range_filter + # @return [::Boolean] + # Optional. Whether the filter is a standard time range filter, + # meaning that it has to be used as the query time range, + # and not as a predicate in the query. + # A chart can have at most one standard time range filter applied. + # @!attribute [rw] is_mandatory + # @return [::Boolean] + # Optional. Whether this filter is required to be populated by the + # dashboard consumer prior to the dashboard loading. + # @!attribute [rw] is_standard_time_range_filter_enabled + # @return [::Boolean] + # Optional. Whether this standard time range filter is enabled. + # @!attribute [rw] advanced_filter_config + # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig] + # Optional. Advanced filter configuration for the filter widget. + class DashboardFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] filter_operator + # @return [::Google::Cloud::Chronicle::V1::FilterOperator] + # Operator for a single filter modifier. + # @!attribute [rw] field_values + # @return [::Array<::String>] + # Values for the modifier. All operators should have a single value other + # than 'IN' and 'BETWEEN'. 'PAST' will have negative seconds + # like -86400 is past 1 day. + class FilterOperatorAndValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Advanced filter configuration for the filter widget. + # @!attribute [rw] token + # @return [::String] + # Required. The token name to look for in the query (e.g., "hostname"). + # The system will automatically wrap this in '$' (e.g., "$hostname$"). + # @!attribute [rw] prefix + # @return [::String] + # Optional. String to prepend to the final replaced value (e.g., "/", "^(", + # "\""). + # @!attribute [rw] suffix + # @return [::String] + # Optional. String to append to the final replaced value (e.g., "/", ")$", + # "\""). + # @!attribute [rw] separator + # @return [::String] + # Optional. Delimiter to join multiple selected values (e.g., "|", " OR field + # = "). + # @!attribute [rw] multiple_allowed + # @return [::Boolean] + # Optional. Whether to allow selection of multiple values. + # @!attribute [rw] default_values + # @return [::Array<::String>] + # Optional. Default values to use if no value is selected/provided. + # @!attribute [rw] skip_default_affixes + # @return [::Boolean] + # Optional. Whether to skip the configured prefix and suffix when using + # default values. If true, default values are inserted raw (joined by the + # separator). + # @!attribute [rw] value_source + # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig::ValueSource] + # Required. Source of the values for the filter. + class AdvancedFilterConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Source of the values for the filter. + # @!attribute [rw] manual_options + # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig::ManualOptions] + # Optional. Manual options provided by the user. + # + # Note: The following fields are mutually exclusive: `manual_options`, `query_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] query_options + # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig::QueryOptions] + # Optional. Query options to fetch the values from the query engine. + # This is used for the filter's population query. + # + # Note: The following fields are mutually exclusive: `query_options`, `manual_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ValueSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Manual options provided by the user. + # @!attribute [rw] options + # @return [::Array<::String>] + # Optional. The options provided by the user. + # The max number of options is limited to 10000. + class ManualOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Query options to fetch the values from the query engine. + # This is used for the filter's population query. + # @!attribute [rw] query + # @return [::String] + # Required. The query to execute to fetch the values. + # @!attribute [rw] column + # @return [::String] + # Required. The column name to use for the values. + # @!attribute [rw] global_time_filter_enabled + # @return [::Boolean] + # Optional. Enable global time filter + # @!attribute [rw] input + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery::Input] + # Optional. Time range input specifically for the filter's population + # query. + class QueryOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # In app linking start + # @!attribute [rw] url + # @return [::String] + # URL to redirect to. + # @!attribute [rw] label + # @return [::String] + # Label for the link. + # @!attribute [rw] icon_url + # @return [::String] + # Icon url for the link. + class InAppLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of the column. + # @!attribute [rw] column + # @return [::String] + # Name of the column. + # @!attribute [rw] field_path + # @return [::String] + # Field path of the queried field, if any. + # @!attribute [rw] function_name + # @return [::String] + # Name of the function used to query the field, if any. + # @!attribute [rw] function_module + # @return [::String] + # Module of the function used to query the field, if any. + # @!attribute [rw] data_source + # @return [::Google::Cloud::Chronicle::V1::DataSource] + # Data source queried. + # @!attribute [rw] timestamp_metadata + # @return [::Google::Cloud::Chronicle::V1::TimestampMetadata] + # Timestamp Metadata + # @!attribute [rw] longitude + # @return [::Boolean] + # Whether the column is a longitude field. + # @!attribute [rw] latitude + # @return [::Boolean] + # Whether the column is a latitude field. + # @!attribute [rw] selected + # @return [::Boolean] + # Whether the column is selected in the final response. + # @!attribute [rw] unselected + # @return [::Boolean] + # Whether the column is unselected in the final response. + class ColumnMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of the timestamp column. + # @!attribute [rw] time_format + # @return [::String] + # Time format of the timestamp column. + # @!attribute [rw] time_zone + # @return [::String] + # Time zone of the timestamp column. + # @!attribute [rw] time_granularity + # @return [::String] + # Time granularity of the timestamp column. + # @!attribute [rw] is_sortable + # @return [::Boolean] + # Whether the timestamp column is sortable in UI. + # @!attribute [rw] is_interpolable + # @return [::Boolean] + # Whether the timestamp column is interpolable in UI. + class TimestampMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A language feature describes a specific capability or syntax of the query + # language used in a dashboard query, such as `JOINS`, `STAGES`, or + # `DATA_TABLES`. + module LanguageFeature + # Language feature is unknown. + LANGUAGE_FEATURE_UNSPECIFIED = 0 + + # Language feature is joins. + JOINS = 1 + + # Language feature is stages. + STAGES = 2 + + # Language feature is data table. + DATA_TABLES = 3 + end + + module FilterOperator + # Default unspecified. + FILTER_OPERATOR_UNSPECIFIED = 0 + + EQUAL = 1 + + NOT_EQUAL = 2 + + IN = 3 + + GREATER_THAN = 4 + + GREATER_THAN_OR_EQUAL_TO = 5 + + LESS_THAN = 6 + + LESS_THAN_OR_EQUAL_TO = 7 + + BETWEEN = 8 + + PAST = 9 + + IS_NULL = 10 + + IS_NOT_NULL = 11 + + STARTS_WITH = 12 + + ENDS_WITH = 13 + + DOES_NOT_STARTS_WITH = 14 + + DOES_NOT_ENDS_WITH = 15 + + NOT_IN = 16 + + # CONTAINS is used for substring match. + CONTAINS = 17 + + # Used if we want to check if the field does not contain the substring. + DOES_NOT_CONTAIN = 18 + end + + # LINT.IfChange(data_sources) + module DataSource + DATA_SOURCE_UNSPECIFIED = 0 + + UDM = 1 + + ENTITY = 2 + + INGESTION_METRICS = 3 + + # RULE_DETECTIONS is used for detections datasource. + RULE_DETECTIONS = 4 + + # RULESETS is used for ruleset with detections datasource. + RULESETS = 5 + + # GLOBAL is used for standard time range filter. + GLOBAL = 6 + + # IOC_MATCHES is used for ioc_matches datasource. + IOC_MATCHES = 7 + + # RULES is used for rules datasource. + RULES = 8 + + # SOAR Cases - identified as `case`. + SOAR_CASES = 9 + + # SOAR Playbooks - identified as `playbook`. + SOAR_PLAYBOOKS = 10 + + # SOAR Case History - identified as `case_history`. + SOAR_CASE_HISTORY = 11 + + # DATA_TABLE is used for data tables source. + DATA_TABLE = 12 + + # INVESTIGATION is used as the data source for triage agent investigations. + # Identified as `gemini_investigation`. + INVESTIGATION = 13 + + # INVESTIGATION_FEEDBACK is used as the data source for user feedback on + # triage agent investigations. Identified as `gemini_investigation_feedback`. + INVESTIGATION_FEEDBACK = 14 + end + + # TimeUnit supported for PAST filter operator. + module TimeUnit + # Default unspecified. + TIME_UNIT_UNSPECIFIED = 0 + + SECOND = 1 + + MINUTE = 2 + + HOUR = 3 + + DAY = 4 + + WEEK = 5 + + MONTH = 6 + + YEAR = 7 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb new file mode 100644 index 000000000000..1342c3da69d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb @@ -0,0 +1,364 @@ +# 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 Chronicle + module V1 + # Request message for CreateDataAccessLabel. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this Data Access Label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] data_access_label + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # Required. Data access label to create. + # @!attribute [rw] data_access_label_id + # @return [::String] + # Required. The ID to use for the data access label, which will become the + # label's display name and the final component of the label's resource name. + # The maximum number of characters should be 63. Regex pattern is as per AIP: + # https://google.aip.dev/122#resource-id-segments + class CreateDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to retrieve a data access label. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access label to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + class GetDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListDataAccessLabels. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data access label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of data access labels to return. The service may return + # fewer than this value. If unspecified, at most 100 data access labels will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListDataAccessLabelsRequest` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessLabel and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + class ListDataAccessLabelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListDataAccessLabels. + # @!attribute [rw] data_access_labels + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # List of data access labels. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDataAccessLabelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateDataAccessLabel method. + # @!attribute [rw] data_access_label + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # Required. The data access label to update. + # + # The label's `name` field is used to identify the label to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description and definition + # fields are supported for update; an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + class UpdateDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete a data access label. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access label to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + class DeleteDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateDataAccessScope. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this Data Access Scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] data_access_scope + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # Required. Data access scope to create. + # @!attribute [rw] data_access_scope_id + # @return [::String] + # Required. The user provided scope id which will become the last part of the + # name of the scope resource. Needs to be compliant with + # https://google.aip.dev/122 + class CreateDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to retrieve a data access scope. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access scope to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + class GetDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListDataAccessScopes. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data access scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of data access scopes to return. The service may return + # fewer than this value. If unspecified, at most 100 data access scopes will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListDataAccessScopesRequest` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessScope and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + class ListDataAccessScopesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListDataAccessScopes. + # @!attribute [rw] data_access_scopes + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # List of data access scopes. + # @!attribute [rw] global_data_access_scope_granted + # @return [::Boolean] + # Whether or not global scope is granted to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDataAccessScopesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateDataAccessScope method. + # @!attribute [rw] data_access_scope + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # Required. The data access scope to update. + # + # The scope's `name` field is used to identify the scope to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description, the allowed + # and denied labels list fields are supported for update; + # an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + class UpdateDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete a data access scope. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access scope to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + class DeleteDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A DataAccessLabel is a label on events to define user access to data. + # @!attribute [rw] udm_query + # @return [::String] + # A UDM query over event data. + # @!attribute [rw] name + # @return [::String] + # The unique resource name of the data access label. + # @!attribute [r] display_name + # @return [::String] + # Output only. The short name displayed for the label as it appears on event + # data. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access label was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access label was last updated. + # @!attribute [r] author + # @return [::String] + # Output only. The user who created the data access label. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The user who last updated the data access label. + # @!attribute [rw] description + # @return [::String] + # Optional. A description of the data access label for a human reader. + class DataAccessLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A DataAccessScope is a boolean expression of data access labels used + # to restrict access to data for users. + # @!attribute [rw] name + # @return [::String] + # Required. The unique full name of the data access scope. + # The name should comply with https://google.aip.dev/122 standards. + # @!attribute [rw] allowed_data_access_labels + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] + # Optional. The allowed labels for the scope. + # Either allow_all or allowed_data_access_labels needs to be provided. + # When provided, there has to be at least one label allowed for the scope to + # be valid. + # The logical operator for evaluation of the allowed labels is OR. + # E.g.: A customer with scope with allowed labels A and B will be able + # to see data with labeled with A or B or (A and B). + # @!attribute [rw] denied_data_access_labels + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] + # Optional. The denied labels for the scope. + # The logical operator for evaluation of the denied labels is AND. + # E.g.: A customer with scope with denied labels A and B won't be able + # to see data labeled with A and data labeled with B + # and data with labels A and B. + # @!attribute [r] display_name + # @return [::String] + # Output only. The name to be used for display to customers of the data + # access scope. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access scope was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access scope was last updated. + # @!attribute [r] author + # @return [::String] + # Output only. The user who created the data access scope. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The user who last updated the data access scope. + # @!attribute [rw] description + # @return [::String] + # Optional. A description of the data access scope for a human reader. + # @!attribute [rw] allow_all + # @return [::Boolean] + # Optional. Whether or not the scope allows all labels, allow_all and + # allowed_data_access_labels are mutually exclusive and one of them must be + # present. denied_data_access_labels can still be used along with allow_all. + # When combined with denied_data_access_labels, access will be granted to all + # data that doesn't have labels mentioned in denied_data_access_labels. E.g.: + # A customer with scope with denied labels A and B and allow_all will be able + # to see all data except data labeled with A and data labeled with B and data + # with labels A and B. + class DataAccessScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Reference object to a data access label. + # @!attribute [rw] data_access_label + # @return [::String] + # The name of the data access label. + # + # Note: The following fields are mutually exclusive: `data_access_label`, `log_type`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] log_type + # @return [::String] + # The name of the log type. + # + # Note: The following fields are mutually exclusive: `log_type`, `data_access_label`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] asset_namespace + # @return [::String] + # The asset namespace configured in the forwarder + # of the customer's events. + # + # Note: The following fields are mutually exclusive: `asset_namespace`, `data_access_label`, `log_type`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ingestion_label + # @return [::Google::Cloud::Chronicle::V1::IngestionLabel] + # The ingestion label configured in the forwarder of the customer's events. + # + # Note: The following fields are mutually exclusive: `ingestion_label`, `data_access_label`, `log_type`, `asset_namespace`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the label. + # Data access label and log types's name + # will match the display name of the resource. + # The asset namespace will match the namespace itself. + # The ingestion key value pair will match the key of the tuple. + class DataAccessLabelReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Representation of an ingestion label type. + # @!attribute [rw] ingestion_label_key + # @return [::String] + # Required. The key of the ingestion label. Always required. + # @!attribute [rw] ingestion_label_value + # @return [::String] + # Optional. The value of the ingestion label. Optional. An object + # with no provided value and some key provided would match + # against the given key and ANY value. + class IngestionLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb new file mode 100644 index 000000000000..dbbe11a22639 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb @@ -0,0 +1,512 @@ +# 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 Chronicle + module V1 + # A request to create DataTable. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] data_table + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # Required. The data table being created. + # @!attribute [rw] data_table_id + # @return [::String] + # Required. The ID to use for the data table. This is also the display name + # for the data table. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Must be unique and has length < 256. + class CreateDataTableRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get details about a data table. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data table to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + class GetDataTableRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update details of data table. + # @!attribute [rw] data_table + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # Required. This field is used to identify the datatable to update. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of metadata fields to update. Currently data tables only + # support updating the `description`, `row_time_to_live` and `scope_info` + # fields. When no field mask is supplied, all non-empty fields will be + # updated. A field mask of "*" will update all fields, whether empty or not. + class UpdateDataTableRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request for a list of data tables. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of data tables to return. The service may + # return fewer than this value. If unspecified, at most 100 data tables will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataTables` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to + # `ListDataTables` must match the call that provided the page + # token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + class ListDataTablesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting data tables. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data table to delete. + # Format + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any rows under this data table will also be + # deleted. (Otherwise, the request will only work if the data table has no + # rows.) + class DeleteDataTableRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing data tables. + # @!attribute [rw] data_tables + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTable>] + # The list of the data tables returned. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDataTablesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create data table row. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] data_table_row + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # Required. The data table row to create. + class CreateDataTableRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update data table row. + # @!attribute [rw] data_table_row + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # Required. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. Currently data table rows only + # support updating the `values` field. When no field mask is supplied, all + # non-empty fields will be updated. A field mask of "*" will update all + # fields, whether empty or not. + class UpdateDataTableRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list data table rows. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of data table rows to return. The service may + # return fewer than this value. If unspecified, at most 100 data table rows + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataTableRows` call. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter facilitating search over data table rows. This filter + # performs a case-insensitive substring match on the row values. + class ListDataTableRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing data table rows. + # @!attribute [rw] data_table_rows + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] + # The list of the data table rows returned. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListDataTableRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get data table row. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + class GetDataTableRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete data table row. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + class DeleteDataTableRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create data table rows in bulk. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest>] + # Required. Data table rows to create. A maximum of 1000 rows (for sync + # requests) or 2000 rows (for async requests) can be created in a single + # request. Total size of the rows should be less than 4MB. + class BulkCreateDataTableRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with created data table rows. + # @!attribute [rw] data_table_rows + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] + # DataTableRows created + class BulkCreateDataTableRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get data table rows in bulk. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest>] + # Required. Data table rows to get. At max 1,000 rows can be there in a + # request. + class BulkGetDataTableRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with data table rows. + # @!attribute [rw] data_table_rows + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] + # The requested data table rows. + class BulkGetDataTableRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to replace data table rows in bulk. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest>] + # Required. Data table rows to replace the existing data table rows. A + # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + # can be replaced in a single request. Total size of the rows should be less + # than 4MB. + class BulkReplaceDataTableRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with data table rows that replaced existing data table rows. + # @!attribute [rw] data_table_rows + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] + # DataTableRows that replaced existing data table rows + class BulkReplaceDataTableRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update data table rows in bulk. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest>] + # Required. Data table rows to update. At max 1,000 rows (or rows with size + # less than 2MB) can be there in a request. + class BulkUpdateDataTableRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with updated data table rows. + # @!attribute [rw] data_table_rows + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] + # DataTableRows updated + class BulkUpdateDataTableRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataTableScopeInfo specifies the scope info of the data table. + # @!attribute [rw] data_access_scopes + # @return [::Array<::String>] + # Required. Contains the list of scope names of the data table. If the list + # is empty, the data table is treated as unscoped. The scope names should be + # full resource names and should be of the format: + # "projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataAccessScopes/\\{scope_name}" + class DataTableScopeInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataTable represents the data table resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the data table + # Format: + # "\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}" + # @!attribute [r] display_name + # @return [::String] + # Output only. The unique display name of the data table. + # @!attribute [rw] description + # @return [::String] + # Required. A user-provided description of the data table. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Table create time + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Table update time + # @!attribute [rw] column_info + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableColumnInfo>] + # Immutable. Details of all the columns in the table + # @!attribute [r] data_table_uuid + # @return [::String] + # Output only. Data table unique id + # @!attribute [r] rules + # @return [::Array<::String>] + # Output only. The resource names for the associated Rules that use this + # data table. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/rules/\\{rule}. + # \\{rule} here refers to the rule id. + # @!attribute [r] rule_associations_count + # @return [::Integer] + # Output only. The count of rules using the data table. + # @!attribute [rw] row_time_to_live + # @return [::String] + # Optional. User-provided TTL of the data table. + # @!attribute [r] approximate_row_count + # @return [::Integer] + # Output only. The count of rows in the data table. + # @!attribute [rw] scope_info + # @return [::Google::Cloud::Chronicle::V1::DataTableScopeInfo] + # Optional. The scope info of the data table. + # During data table creation, if this field is not set, the data + # table without scopes (an unscoped table) will be created for a global + # user. For a scoped user, this field must be set. During data table + # update, if scope_info is requested to be updated, this field must be set. + # @!attribute [r] update_source + # @return [::Google::Cloud::Chronicle::V1::DataTableUpdateSource] + # Output only. Source of the data table update. + # @!attribute [r] row_time_to_live_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update time of the TTL of the data table. + class DataTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataTableRow represents a single row in a data table. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the data table + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @!attribute [rw] values + # @return [::Array<::String>] + # Required. All column values for a single row. The values should be in the + # same order as the columns of the data tables. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. DataTableRow create time + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. DataTableRow update time + # @!attribute [rw] row_time_to_live + # @return [::String] + # Optional. User-provided TTL of the data table row. + class DataTableRow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataTableColumnInfo represents the column metadata of the + # datatable. The column_index represents the ordering of the + # values in DataTableRow. + # @!attribute [rw] mapped_column_path + # @return [::String] + # Entity proto field path that the column is mapped to + # + # Note: The following fields are mutually exclusive: `mapped_column_path`, `column_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] column_type + # @return [::Google::Cloud::Chronicle::V1::DataTableColumnInfo::DataTableColumnType] + # Column type can be STRING, CIDR (Ex- 10.1.1.0/24), REGEX + # + # Note: The following fields are mutually exclusive: `column_type`, `mapped_column_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] column_index + # @return [::Integer] + # Required. Column Index. 0,1,2... + # @!attribute [rw] original_column + # @return [::String] + # Required. Original column name of the Data Table (present in the CSV header + # in case of creation of data tables using file uploads). It must satisfy the + # following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Must be unique and has length < 256. + # @!attribute [rw] key_column + # @return [::Boolean] + # Optional. Whether to include this column in the calculation of the row ID. + # If no columns have key_column = true, all columns will be included in the + # calculation of the row ID. + # @!attribute [rw] repeated_values + # @return [::Boolean] + # Optional. Whether the column is a repeated values column. + class DataTableColumnInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataTableColumnType denotes the type of the column to be referenced in the + # rule. + module DataTableColumnType + # The default Data Table Column Type. + DATA_TABLE_COLUMN_TYPE_UNSPECIFIED = 0 + + # Denotes the type of the column as STRING. + STRING = 1 + + # Denotes the type of the column as REGEX. + REGEX = 2 + + # Denotes the type of the column as CIDR. + CIDR = 3 + + # Denotes the type of the column as NUMBER (includes int and float). + NUMBER = 4 + end + end + + # The request message for GetDataTableOperationErrors. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the data table operation errors. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} + class GetDataTableOperationErrorsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message containing the errors for a data table operation. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name for the data table operation errors. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} + # @!attribute [rw] rpc_errors + # @return [::Array<::Google::Rpc::Status>] + # The list of errors. + # Replaces the deprecated `errors` field. + class DataTableOperationErrors + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataTableUpdateSource denotes the source that updated the data table. + module DataTableUpdateSource + # The data table is updated by the user. + DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED = 0 + + # The data table is updated by the user. + USER = 1 + + # The data table is updated by the rule. + RULE = 2 + + # The data table is updated by the search. + SEARCH = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb new file mode 100644 index 000000000000..89cef26897a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb @@ -0,0 +1,210 @@ +# 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 Chronicle + module V1 + # A watchlist is a list of entities that allows for bulk operations over the + # included entities. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the watchlist. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the watchlist. + # Note that it must be at least one character and less than 63 characters + # (https://google.aip.dev/148). + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the watchlist. + # @!attribute [rw] multiplying_factor + # @return [::Float] + # Optional. Weight applied to the risk score for entities + # in this watchlist. + # The default is 1.0 if it is not specified. + # @!attribute [rw] entity_population_mechanism + # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism] + # Required. Mechanism to populate entities in the watchlist. + # @!attribute [r] entity_count + # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityCount] + # Output only. Entity count in the watchlist. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the watchlist was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the watchlist was last updated. + # @!attribute [rw] watchlist_user_preferences + # @return [::Google::Cloud::Chronicle::V1::WatchlistUserPreferences] + # Optional. User preferences for watchlist configuration. + class Watchlist + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mechanism to populate entities in the watchlist. + # @!attribute [rw] manual + # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism::Manual] + # Optional. Entities are added manually. + class EntityPopulationMechanism + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entities are added manually. + class Manual + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Count of different types of entities in the watchlist. + # @!attribute [r] user + # @return [::Integer] + # Output only. Count of user type entities in the watchlist. + # @!attribute [r] asset + # @return [::Integer] + # Output only. Count of asset type entities in the watchlist. + class EntityCount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A collection of user preferences for watchlist UI configuration. + # @!attribute [rw] pinned + # @return [::Boolean] + # Optional. Whether the watchlist is pinned on the dashboard. + class WatchlistUserPreferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a watchlist. + # @!attribute [rw] name + # @return [::String] + # Required. The parent, which owns this collection of watchlists. + # The name of the watchlist to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + class GetWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing watchlists. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of watchlists. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of watchlists to return. + # The service may return fewer than this value. + # If unspecified, at most 200 watchlists will be returned. + # The maximum value is 200; values above 200 will be coerced to 200. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListWatchlists` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListWatchlists` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Which watchlist to return in aip.dev/160 form. + # Currently, only the following filters are supported: + # - `watchlist_user_preferences.pinned=true` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + class ListWatchlistsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing watchlists. + # @!attribute [rw] watchlists + # @return [::Array<::Google::Cloud::Chronicle::V1::Watchlist>] + # Optional. The watchlists from the specified instance. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListWatchlistsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating watchlist. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this watchlist will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] watchlist_id + # @return [::String] + # Optional. The ID to use for the watchlist, + # which will become the final component of the watchlist's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @!attribute [rw] watchlist + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # Required. The watchlist to create. + class CreateWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating watchlist. + # @!attribute [rw] watchlist + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # Required. The watchlist to update. + # + # The watchlist's `name` field is used to identify the watchlist to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + class UpdateWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting watchlist. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the watchlist to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any entities under this watchlist will also be + # deleted. (Otherwise, the request will only work if the watchlist has no + # entities.) + class DeleteWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb new file mode 100644 index 000000000000..278cfefa1bc0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb @@ -0,0 +1,82 @@ +# 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 Chronicle + module V1 + # FeaturedContentMetadata holds metadata about the Featured Content. + # @!attribute [rw] id + # @return [::String] + # Required. Unique identifier of the featured content. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the featured content. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp indicating when the item was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp indicating when the item was updated. + # @!attribute [r] author + # @return [::String] + # Output only. Content item author full name. + # @!attribute [r] certified + # @return [::Boolean] + # Output only. Determine if this content item is officially certified by + # Google or created by the community. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the content item. + # @!attribute [r] categories + # @return [::Array<::String>] + # Output only. Categories the content is associated with. + # @!attribute [r] version + # @return [::String] + # Output only. Featured content version (Major.Minor.Patch). + # @!attribute [r] verified + # @return [::Boolean] + # Output only. Whether the content is verified by Google (applicable for 3rd + # party content). + # @!attribute [r] source_type + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentMetadata::ContentSourceType] + # Output only. The source type of the content. + class FeaturedContentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # ContentSourceType specifying the content source of origin + module ContentSourceType + # Unspecified content source type + CONTENT_SOURCE_TYPE_UNSPECIFIED = 0 + + # Certified Google content source type + GOOGLE = 1 + + # Community content source type + COMMUNITY = 2 + + # Partner content source type + PARTNER = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb new file mode 100644 index 000000000000..7086b2dc1e63 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb @@ -0,0 +1,141 @@ +# 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 Chronicle + module V1 + # FeaturedContentNativeDashboard resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the FeaturedContentNativeDashboard. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # @!attribute [r] content_metadata + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentMetadata] + # Output only. Metadata about the FeaturedContentNativeDashboard. + # @!attribute [rw] dashboard_content + # @return [::Google::Cloud::Chronicle::V1::NativeDashboardWithChartsAndQueries] + # Optional. The dashboard content. + class FeaturedContentNativeDashboard + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to get a FeaturedContentNativeDashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the FeaturedContentNativeDashboard to + # retrieve. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + class GetFeaturedContentNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to list FeaturedContentNativeDashboards. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of + # FeaturedContentNativeDashboards. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of FeaturedContentNativeDashboards to return. + # The service may return fewer than this value. If unspecified, at most 100 + # FeaturedContentNativeDashboards will be returned. The maximum value is 100; + # values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListFeaturedContentNativeDashboards` must match the call that provided the + # page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to apply to list the FeaturedContentNativeDashboards. + # + # The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. + # + # Supported fields for filtering: + # + # * `name`: The resource name of the featured content. + # * `content_metadata.description`: The description of the featured + # content. + # + # When a literal value is provided without a field, it will perform a + # substring search across both `name` and `content_metadata.description`. + # + # Examples: + # + # * `"test"`: Matches featured content where either the name or description + # contains "test" as a substring. + # * `name="test"`: Matches featured content where the name contains "test". + # * `content_metadata.description="test"`: Matches featured content where + # the description contains "test". + class ListFeaturedContentNativeDashboardsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing FeaturedContentNativeDashboards. + # @!attribute [rw] featured_content_native_dashboards + # @return [::Array<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] + # The list of FeaturedContentNativeDashboards. + # Ordered by name by default. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListFeaturedContentNativeDashboardsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to install a FeaturedContentNativeDashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the FeaturedContentNativeDashboard to + # install. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # @!attribute [rw] featured_content_native_dashboard + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # Optional. The FeaturedContentNativeDashboard to install. + class InstallFeaturedContentNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for installing a FeaturedContentNativeDashboard. + # @!attribute [rw] native_dashboard + # @return [::String] + # Optional. The resource name of the NativeDashboard created. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{native_dashboard_id} + class InstallFeaturedContentNativeDashboardResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb new file mode 100644 index 000000000000..dde3c3cbf88d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + # A Instance represents an instantiation of the Instance product. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of this instance. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + class Instance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a Instance. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the instance to retrieve. + # Format: + # `projects/{project_id}/locations/{location}/instances/{instance}` + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb new file mode 100644 index 000000000000..da820f0b06de --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb @@ -0,0 +1,502 @@ +# 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 Chronicle + module V1 + # Request message to export list of dashboard. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource that the dashboards to be exported belong to. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The resource names of the dashboards to export. + class ExportNativeDashboardsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for exporting a dashboard. + # @!attribute [rw] inline_destination + # @return [::Google::Cloud::Chronicle::V1::InlineDestination] + # The data for the exported dashboards included directly in the response. + class ExportNativeDashboardsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # InlineDestination for exporting a dashboard. + # @!attribute [rw] dashboards + # @return [::Array<::Google::Cloud::Chronicle::V1::NativeDashboardWithChartsAndQueries>] + # Dashboards with charts and queries. + class InlineDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NativeDashboardWithChartsAndQueries for exporting a dashboard. + # @!attribute [rw] dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Optional. Native dashboard. + # @!attribute [rw] dashboard_charts + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart>] + # Optional. Charts in the dashboard. + # @!attribute [rw] dashboard_queries + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardQuery>] + # Optional. Queries in the dashboard. + class NativeDashboardWithChartsAndQueries + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to import dashboards. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] source + # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource] + # Required. The data will imported from this proto. + class ImportNativeDashboardsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Inline source for importing dashboards. + # @!attribute [rw] dashboards + # @return [::Array<::Google::Cloud::Chronicle::V1::NativeDashboardWithChartsAndQueries>] + # Required. Dashboards with charts and queries. + class ImportNativeDashboardsInlineSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for importing dashboards. + # @!attribute [r] results + # @return [::Array<::Google::Cloud::Chronicle::V1::ImportExportStatus>] + # Output only. Represents the status of an import operation for multiple + # dashboards. Each dashboard's import status is tracked. A status of OK + # indicates the dashboard was ready for import. Otherwise, an appropriate + # error code and message are provided. Importantly, the import process is + # all-or-nothing: if even one dashboard fails to import, the entire import + # operation is aborted, and none of the dashboards are imported. The order of + # the statuses will be the same as in the import request. + class ImportNativeDashboardsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ImportExportStatus is a wrapper for dashboard name and status. + # @!attribute [rw] dashboard + # @return [::String] + # The resource name of the dashboard if it was supplied in the request. + # @!attribute [r] status + # @return [::Google::Rpc::Status] + # Output only. Status of the import/export operation. + class ImportExportStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NativeDashboard resource. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the dashboard. + # @!attribute [rw] display_name + # @return [::String] + # Required. Dashboard display name/title visible to users. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the dashboard. + # @!attribute [rw] definition + # @return [::Google::Cloud::Chronicle::V1::DashboardDefinition] + # Optional. Definition of the dashboard like metadata, visualization and + # datasource configuration etc. + # @!attribute [r] type + # @return [::Google::Cloud::Chronicle::V1::DashboardType] + # Output only. Whether it's an out of the box or custom created dashboard. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation time of dashboard. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the dashboard was last edited. + # @!attribute [r] create_user_id + # @return [::String] + # Output only. User who created the dashboard. + # @!attribute [r] update_user_id + # @return [::String] + # Output only. User who last edited the dashboard. + # @!attribute [r] dashboard_user_data + # @return [::Google::Cloud::Chronicle::V1::DashboardUserData] + # Output only. User Preferences for a dashboard + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [r] access + # @return [::Google::Cloud::Chronicle::V1::DashboardAccess] + # Output only. Access of the dashboard + class NativeDashboard + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to create a dashboard. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Required. The dashboard to create. + class CreateNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to get a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to fetch. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + class GetNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to list dashboards. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent owning this dashboard collection. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of dashboards to return. The service may + # return fewer than this value. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDashboards` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDashboards` must + # match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + class ListNativeDashboardsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing dashboards. + # @!attribute [rw] native_dashboards + # @return [::Array<::Google::Cloud::Chronicle::V1::NativeDashboard>] + # The dashboards from the specified chronicle instance. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListNativeDashboardsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to update a dashboard. + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Required. The dashboard to update. + # + # The dashboard's `name` field is used to identify the dashboard to update. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. LINT.IfChange(update_mask_values) + # The list of fields to update. + # Supported paths are - + # display_name + # description + # definition.filters + # definition.charts + # type + # access + # dashboard_user_data.is_pinned + class UpdateNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to duplicate a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to duplicate. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Required. Any fields that need modification can be passed through this like + # name, description etc. + class DuplicateNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to delete. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + class DeleteNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to add chart in a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to add chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] dashboard_query + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # Optional. Query used to create the chart. + # @!attribute [rw] dashboard_chart + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # Required. Chart to be added to the dashboard. + # @!attribute [rw] chart_layout + # @return [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout] + # Required. ChartLayout for newly added chart. + class AddChartRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for adding chart in a dashboard. + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Dashboard with chart added in definition. + # @!attribute [rw] dashboard_chart + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # Created chart resource. + class AddChartResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to edit chart in a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to edit chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] dashboard_query + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # Optional. Query for the edited chart. + # @!attribute [rw] dashboard_chart + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # Optional. Edited chart. + # @!attribute [rw] edit_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to edit for chart and query. + # Supported paths in chart are - + # dashboard_chart.display_name + # dashboard_chart.description + # dashboard_chart.chart_datasource.data_sources + # dashboard_chart.visualization + # dashboard_chart.visualization.button + # dashboard_chart.visualization.markdown + # dashboard_chart.drill_down_config + # Supported paths in query are - + # dashboard_query.query + # dashboard_query.input + # @!attribute [rw] language_features + # @return [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] + # Optional. Language Features present in the query. + class EditChartRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for editing chart in a dashboard. + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Edited dashboard. + # @!attribute [rw] dashboard_chart + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # Edited chart resource. + class EditChartResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to remove chart from a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to remove chart from. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] dashboard_chart + # @return [::String] + # Required. The dashboard chart name to remove. + class RemoveChartRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to duplicate chart in a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name that involves chart duplication. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] dashboard_chart + # @return [::String] + # Required. The dashboard chart name to duplicate. + class DuplicateChartRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for duplicating chart in a dashboard. + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Dashboard with chart added in definition. + # @!attribute [rw] dashboard_chart + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # Duplicated chart resource. + class DuplicateChartResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User Data for Native Dashboard + # @!attribute [rw] last_viewed_time + # @return [::Google::Protobuf::Timestamp] + # time when this dashboard is last viewed + # @!attribute [rw] is_pinned + # @return [::Boolean] + # is dashboard pinned by user + class DashboardUserData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Definition of the dashboard including filters, layout, charts' + # configurations. + # @!attribute [rw] filters + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter>] + # Filters for the dashboard. + # @!attribute [rw] fingerprint + # @return [::String] + # Fingerprint of the dashboard definition. + # @!attribute [rw] charts + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig>] + # Charts in the dashboard. + class DashboardDefinition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration of the chart including chart reference, layout and filters. + # @!attribute [r] dashboard_chart + # @return [::String] + # @!attribute [rw] chart_layout + # @return [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout] + # @!attribute [rw] filters_ids + # @return [::Array<::String>] + # Dashboard filters applied to the chart. + class ChartConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Layout of the chart. + # @!attribute [rw] start_x + # @return [::Integer] + # @!attribute [rw] span_x + # @return [::Integer] + # @!attribute [rw] start_y + # @return [::Integer] + # @!attribute [rw] span_y + # @return [::Integer] + class ChartLayout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Type of the dashboard. + module DashboardType + # Default unspecified. + DASHBOARD_TYPE_UNSPECIFIED = 0 + + # Out of the box curated dashboards provided by Chronicle. + CURATED = 1 + + # Private dashboards created by users/customers. + PRIVATE = 2 + + # Public dashboards created by users/customers. + PUBLIC = 3 + + # Custom dashboards + CUSTOM = 4 + + # Marketplace dashboards + MARKETPLACE = 5 + end + + # AccessType of the dashboard. + module DashboardAccess + # Default unspecified. + DASHBOARD_ACCESS_UNSPECIFIED = 0 + + # Private dashboards created by users/customers. + DASHBOARD_PRIVATE = 1 + + # Public dashboards created by users/customers. + DASHBOARD_PUBLIC = 2 + end + + # NativeDashboardView indicates the scope of fields to populate when returning + # the dashboard resource. + module NativeDashboardView + # Defaults to basic. + NATIVE_DASHBOARD_VIEW_UNSPECIFIED = 0 + + # Include basic metadata about the dashboard without full definition. + NATIVE_DASHBOARD_VIEW_BASIC = 1 + + # Include everything. + NATIVE_DASHBOARD_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb new file mode 100644 index 000000000000..2ab663d35a0d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb @@ -0,0 +1,232 @@ +# 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 Chronicle + module V1 + # ScopeInfo specifies the scope info of the reference list. + # @!attribute [rw] reference_list_scope + # @return [::Google::Cloud::Chronicle::V1::ReferenceListScope] + # Required. The list of scope names of the reference list, if the list is + # empty the reference list is treated as unscoped. + class ScopeInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ReferenceListScope specifies the list of scope names of the reference list. + # @!attribute [rw] scope_names + # @return [::Array<::String>] + # Optional. The list of scope names of the reference list. The scope names + # should be full resource names and should be of the format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. + class ReferenceListScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get details about a reference list. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the reference list to retrieve. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of the ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_FULL. + class GetReferenceListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request for a list of reference lists. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of reference lists. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of reference lists to return. + # The service may return fewer than this value. + # If unspecified, at most 100 reference lists will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListReferenceLists` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListReferenceLists` must + # match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of each ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_BASIC. + class ListReferenceListsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to a request for a list of reference lists. + # @!attribute [rw] reference_lists + # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceList>] + # The reference lists. + # Ordered in ascending alphabetical order by name. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListReferenceListsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a reference list. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this reference list will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] reference_list + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # Required. The reference list to create. + # @!attribute [rw] reference_list_id + # @return [::String] + # Required. The ID to use for the reference list. This is also the display + # name for the reference list. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Has length less than 256. + # - Must be unique. + class CreateReferenceListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a reference list. + # @!attribute [rw] reference_list + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # Required. The reference list to update. + # + # The reference list's `name` field is used to identify the reference list to + # update. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # When no field mask is supplied, all non-empty fields will be updated. + # A field mask of "*" will update all fields, whether empty or not. + class UpdateReferenceListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A reference list. + # Reference lists are user-defined lists of values which users can + # use in multiple Rules. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the reference list. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + # @!attribute [r] display_name + # @return [::String] + # Output only. The unique display name of the reference list. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the reference list was last updated. + # @!attribute [rw] description + # @return [::String] + # Required. A user-provided description of the reference list. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceListEntry>] + # Required. The entries of the reference list. + # When listed, they are returned in the order that was specified at creation + # or update. The combined size of the values of the reference list may not + # exceed 6MB. + # This is returned only when the view is REFERENCE_LIST_VIEW_FULL. + # @!attribute [r] rules + # @return [::Array<::String>] + # Output only. The resource names for the associated self-authored Rules that + # use this reference list. This is returned only when the view is + # REFERENCE_LIST_VIEW_FULL. + # @!attribute [rw] syntax_type + # @return [::Google::Cloud::Chronicle::V1::ReferenceListSyntaxType] + # Required. The syntax type indicating how list entries should be validated. + # @!attribute [r] rule_associations_count + # @return [::Integer] + # Output only. The count of self-authored rules using the reference list. + # @!attribute [rw] scope_info + # @return [::Google::Cloud::Chronicle::V1::ScopeInfo] + # The scope info of the reference list. + # During reference list creation, if this field is not set, the reference + # list without scopes (an unscoped list) will be created for an unscoped + # user. For a scoped user, this field must be set. During reference list + # update, if scope_info is requested to be updated, this field must be set. + class ReferenceList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An entry in a reference list. + # @!attribute [rw] value + # @return [::String] + # Required. The value of the entry. Maximum length is 512 characters. + class ReferenceListEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The syntax type indicating how list entries should be validated. + module ReferenceListSyntaxType + # Defaults to REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING. + REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED = 0 + + # List contains plain text patterns. + REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING = 1 + + # List contains only Regular Expression patterns. + REFERENCE_LIST_SYNTAX_TYPE_REGEX = 2 + + # List contains only CIDR patterns. + REFERENCE_LIST_SYNTAX_TYPE_CIDR = 3 + end + + # ReferenceListView is a mechanism for viewing partial responses of the + # ReferenceList resource. + module ReferenceListView + # The default / unset value. + # The API will default to the BASIC view for ListReferenceLists. + # The API will default to the FULL view for methods that return a single + # ReferenceList resource. + REFERENCE_LIST_VIEW_UNSPECIFIED = 0 + + # Include metadata about the ReferenceList. + # This is the default view for ListReferenceLists. + REFERENCE_LIST_VIEW_BASIC = 1 + + # Include all details about the ReferenceList: metadata, content lines, + # associated rule counts. This is the default view for GetReferenceList. + REFERENCE_LIST_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb new file mode 100644 index 000000000000..0b2584f226f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb @@ -0,0 +1,701 @@ +# 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 Chronicle + module V1 + # The Rule resource represents a user-created rule. + # NEXT TAG: 21 + # @!attribute [rw] name + # @return [::String] + # Identifier. Full resource name for the rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [r] revision_id + # @return [::String] + # Output only. The revision ID of the rule. + # A new revision is created whenever the rule text is changed in any way. + # Format: `v_{10 digits}_{9 digits}` + # Populated in REVISION_METADATA_ONLY view and FULL view. + # @!attribute [r] display_name + # @return [::String] + # Output only. Display name of the rule. + # Populated in BASIC view and FULL view. + # @!attribute [rw] text + # @return [::String] + # The YARA-L content of the rule. + # Populated in FULL view. + # @!attribute [r] author + # @return [::String] + # Output only. The author of the rule. Extracted from the meta section of + # text. Populated in BASIC view and FULL view. + # @!attribute [r] severity + # @return [::Google::Cloud::Chronicle::V1::Severity] + # Output only. The severity of the rule as specified in the meta section of + # text. Populated in BASIC view and FULL view. + # @!attribute [r] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. Additional metadata specified in the meta section of text. + # Populated in FULL view. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the rule was created. + # Populated in FULL view. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the rule revision was created. + # Populated in FULL, REVISION_METADATA_ONLY views. + # @!attribute [r] compilation_state + # @return [::Google::Cloud::Chronicle::V1::Rule::CompilationState] + # Output only. The current compilation state of the rule. + # Populated in FULL view. + # @!attribute [r] type + # @return [::Google::Cloud::Chronicle::V1::RuleType] + # Output only. User-facing type of the rule. Extracted from the events + # section of rule text. Populated in BASIC view and FULL view. + # @!attribute [r] reference_lists + # @return [::Array<::String>] + # Output only. Resource names of the reference lists used in this rule. + # Populated in FULL view. + # @!attribute [r] allowed_run_frequencies + # @return [::Array<::Google::Cloud::Chronicle::V1::RunFrequency>] + # Output only. The run frequencies that are allowed for the rule. + # Populated in BASIC view and FULL view. + # @!attribute [rw] etag + # @return [::String] + # The etag for this rule. + # If this is provided on update, the request will succeed if and only if it + # matches the server-computed value, and will fail with an ABORTED error + # otherwise. + # Populated in BASIC view and FULL view. + # @!attribute [rw] scope + # @return [::String] + # Resource name of the DataAccessScope bound to this rule. + # Populated in BASIC view and FULL view. + # If reference lists are used in the rule, validations will be performed + # against this scope to ensure that the reference lists are compatible with + # both the user's and the rule's scopes. + # The scope should be in the format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. + # @!attribute [r] compilation_diagnostics + # @return [::Array<::Google::Cloud::Chronicle::V1::CompilationDiagnostic>] + # Output only. A list of a rule's corresponding compilation diagnostic + # messages such as compilation errors and compilation warnings. Populated in + # FULL view. + # @!attribute [r] near_real_time_live_rule_eligible + # @return [::Boolean] + # Output only. Indicate the rule can run in near real time live rule. + # If this is true, the rule uses the near real time live rule when the run + # frequency is set to LIVE. + # @!attribute [r] inputs_used + # @return [::Google::Cloud::Chronicle::V1::InputsUsed] + # Output only. The set of inputs used in the rule. For example, if the rule + # uses $e.principal.hostname, then the uses_udm field will be true. + class Rule + 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 + + # The current compilation state of the rule. + module CompilationState + # The compilation state is unspecified/unknown. + COMPILATION_STATE_UNSPECIFIED = 0 + + # The Rule can successfully compile. + SUCCEEDED = 1 + + # The Rule cannot successfully compile. + # This is possible if a backwards-incompatible change was made to the + # compiler. + FAILED = 2 + end + end + + # The RuleDeployment resource represents the deployment state of a Rule. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the rule deployment. + # Note that RuleDeployment is a child of the overall Rule, not any individual + # revision, so the resource ID segment for the Rule resource must not + # reference a specific revision. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether the rule is currently deployed continuously against incoming data. + # @!attribute [rw] alerting + # @return [::Boolean] + # Whether detections resulting from this deployment should be considered + # alerts. + # @!attribute [rw] archived + # @return [::Boolean] + # The archive state of the rule deployment. + # Cannot be set to true unless enabled is set to false. + # If set to true, alerting will automatically be set to false. + # If currently set to true, enabled, alerting, and run_frequency cannot be + # updated. + # @!attribute [r] archive_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the rule deployment archive state was last + # set to true. If the rule deployment's current archive state is not set to + # true, the field will be empty. + # @!attribute [rw] run_frequency + # @return [::Google::Cloud::Chronicle::V1::RunFrequency] + # The run frequency of the rule deployment. + # @!attribute [r] execution_state + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment::ExecutionState] + # Output only. The execution state of the rule deployment. + # @!attribute [r] producer_rules + # @return [::Array<::String>] + # Output only. The names of the associated/chained producer rules. Rules are + # considered producers for this rule if this rule explicitly filters on their + # ruleid. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [r] consumer_rules + # @return [::Array<::String>] + # Output only. The names of the associated/chained consumer rules. Rules are + # considered consumers of this rule if their rule text explicitly filters on + # this rule's ruleid. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [r] last_alert_status_change_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the rule deployment alert state was lastly + # changed. This is filled regardless of the current alert state. E.g. if the + # current alert status is false, this timestamp will be the timestamp when + # the alert status was changed to false. + class RuleDeployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible execution states the rule deployment can be in. + module ExecutionState + # Unspecified or unknown execution state. + EXECUTION_STATE_UNSPECIFIED = 0 + + # Default execution state. + DEFAULT = 1 + + # Rules in limited state may not have their executions guaranteed. + LIMITED = 2 + + # Paused rules are not executed at all. + PAUSED = 3 + end + end + + # Retrohunt is an execution of a Rule over a time range in the past. + # @!attribute [rw] name + # @return [::String] + # The resource name of the retrohunt. + # Retrohunt is the child of a rule revision. \\{rule} in the format below is + # structured as \\{rule_id@revision_id}. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # @!attribute [rw] process_interval + # @return [::Google::Type::Interval] + # Required. The start and end time of the event time range this retrohunt + # processes. + # @!attribute [r] execution_interval + # @return [::Google::Type::Interval] + # Output only. The start and end time of the retrohunt execution. If the + # retrohunt is not yet finished, the end time of the interval will not be + # populated. + # @!attribute [r] state + # @return [::Google::Cloud::Chronicle::V1::Retrohunt::State] + # Output only. The state of the retrohunt. + # @!attribute [r] progress_percentage + # @return [::Float] + # Output only. Percent progress of the retrohunt towards completion, from + # 0.00 to 100.00. + class Retrohunt + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible states a retrohunt can be in. + module State + # Unspecified or unknown retrohunt state. + STATE_UNSPECIFIED = 0 + + # Running state. + RUNNING = 1 + + # Done state. + DONE = 2 + + # Cancelled state. + CANCELLED = 3 + + # Failed state. + FAILED = 4 + end + end + + # Request message for CreateRule method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this rule will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] rule + # @return [::Google::Cloud::Chronicle::V1::Rule] + # Required. The rule to create. + class CreateRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRule method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the Rule being + # returned. If unspecified, defaults to FULL. + class GetRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRules method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of rules. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of rules to return. The service may return fewer than + # this value. If unspecified, at most 100 rules will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRules` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRules` + # must match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::RuleView] + # view indicates the scope of fields to populate for the Rule being returned. + # If unspecified, defaults to BASIC. + # @!attribute [rw] filter + # @return [::String] + # Only the following filters are allowed: + # "reference_lists:\\{reference_list_name}" + # "data_tables:\\{data_table_name}" + # "display_name:\\{display_name}" + class ListRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRules method. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] + # The rules from the specified instance. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateRule method. + # @!attribute [rw] rule + # @return [::Google::Cloud::Chronicle::V1::Rule] + # Required. The rule to update. + # + # The rule's `name` field is used to identify the rule to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. + class UpdateRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteRule method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to delete. A rule revision timestamp cannot + # be specified as part of the name, as deleting specific revisions is not + # supported. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any retrohunts and any detections associated with + # the rule will also be deleted. If set to false, the call will only succeed + # if the rule has no associated retrohunts, including completed retrohunts, + # and no associated detections. Regardless of this field's value, the rule + # deployment associated with this rule will also be deleted. + class DeleteRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRuleRevisions method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to list revisions for. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of revisions to return per page. The service may return + # fewer than this value. If unspecified, at most 100 revisions will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # The page token, received from a previous `ListRuleRevisions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleRevisions` + # must match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the revision + # being returned. If unspecified, defaults to BASIC. + class ListRuleRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRuleRevisions method. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] + # The revisions of the rule. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRuleRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateRetrohunt method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of retrohunt, which is a rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] retrohunt + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # Required. The retrohunt to create. + class CreateRetrohuntRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRetrohunt method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the retrohunt to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + class GetRetrohuntRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRetrohunts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The rule that the retrohunts belong to. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of retrohunt to return. The service may return fewer + # than this value. If unspecified, at most 100 retrohunts will be returned. + # The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRetrohunts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRetrohunts` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # state + class ListRetrohuntsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRetrohunts method. + # @!attribute [rw] retrohunts + # @return [::Array<::Google::Cloud::Chronicle::V1::Retrohunt>] + # The retrohunts from the specified rule. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRetrohuntsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRuleDeployment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule deployment to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + class GetRuleDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRuleDeployments. + # @!attribute [rw] parent + # @return [::String] + # Required. The collection of all parents which own all rule deployments. The + # "-" wildcard token must be used as the rule identifier in the resource + # path. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/-` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of rule deployments to return. The service may return + # fewer than this value. If unspecified, at most 100 rule deployments will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRuleDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleDeployments` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # archived, name + class ListRuleDeploymentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRuleDeployments. + # @!attribute [rw] rule_deployments + # @return [::Array<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # The rule deployments from all rules. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRuleDeploymentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateRuleDeployment. + # @!attribute [rw] rule_deployment + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # Required. The rule deployment to update. + # + # The rule deployment's `name` field is used to identify the rule deployment + # to update. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + class UpdateRuleDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CompilationPosition represents the location of a compilation diagnostic in + # rule text. + # @!attribute [r] start_line + # @return [::Integer] + # Output only. Start line number, beginning at 1. + # @!attribute [r] start_column + # @return [::Integer] + # Output only. Start column number, beginning at 1. + # @!attribute [r] end_line + # @return [::Integer] + # Output only. End line number, beginning at 1. + # @!attribute [r] end_column + # @return [::Integer] + # Output only. End column number, beginning at 1. + class CompilationPosition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CompilationDiagnostic represents a compilation diagnostic generated + # during a rule's compilation, such as a compilation error or a compilation + # warning. + # @!attribute [r] message + # @return [::String] + # Output only. The diagnostic message. + # @!attribute [r] position + # @return [::Google::Cloud::Chronicle::V1::CompilationPosition] + # Output only. The approximate position in the rule text associated with the + # compilation diagnostic. + # Compilation Position may be empty. + # @!attribute [r] severity + # @return [::Google::Cloud::Chronicle::V1::CompilationDiagnostic::Severity] + # Output only. The severity of a rule's compilation diagnostic. + # @!attribute [r] uri + # @return [::String] + # Output only. Link to documentation that describes a diagnostic in more + # detail. + class CompilationDiagnostic + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity level of the compilation diagnostic. + module Severity + # An unspecified severity level. + SEVERITY_UNSPECIFIED = 0 + + # A compilation warning. + WARNING = 1 + + # A compilation error. + ERROR = 2 + end + end + + # Severity represents the severity level of the rule. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the severity level. Extracted from the meta section of + # the rule text. + class Severity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation Metadata for Retrohunts. + # @!attribute [rw] retrohunt + # @return [::String] + # The name of the retrohunt. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # @!attribute [rw] execution_interval + # @return [::Google::Type::Interval] + # The start and end time of the retrohunt execution. If the retrohunt is not + # yet finished, the end time of the interval will not be filled. + # @!attribute [rw] progress_percentage + # @return [::Float] + # Percent progress of the retrohunt towards completion, from 0.00 to 100.00. + class RetrohuntMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # InputsUsed is a convenience field that tells us which sources + # of events (if any) were used in the rule. + # NEXT TAG: 4 + # @!attribute [rw] uses_udm + # @return [::Boolean] + # Optional. Whether the rule queries UDM events. + # @!attribute [rw] uses_entity + # @return [::Boolean] + # Optional. Whether the rule queries entity events. + # @!attribute [rw] uses_detection + # @return [::Boolean] + # Optional. Whether the rule queries detections. + class InputsUsed + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RunFrequency indicates the run frequency at which a YARA-L 2 rule will run if + # enabled. + module RunFrequency + # The run frequency is unspecified/unknown. + RUN_FREQUENCY_UNSPECIFIED = 0 + + # Executes in real time. + LIVE = 1 + + # Executes once per hour. + HOURLY = 2 + + # Executes once per day. + DAILY = 3 + end + + # RuleType indicates the YARA-L rule type of user-created and Google Cloud + # Threat Intelligence (GCTI) authored rules. + module RuleType + # The rule type is unspecified/unknown. + RULE_TYPE_UNSPECIFIED = 0 + + # Rule checks for the existence of a single event. + SINGLE_EVENT = 1 + + # Rule checks for correlation between multiple events + MULTI_EVENT = 2 + end + + # RuleView indicates the scope of fields to populate when returning the Rule + # resource. + module RuleView + # The default/unset value. + # The API will default to the BASIC view for ListRules/ListRuleRevisions. + # The API will default to the FULL view for GetRule. + RULE_VIEW_UNSPECIFIED = 0 + + # Include basic metadata about the rule, but not the full contents. + # Returned fields include: revision_id, revision_create_time, display_name, + # author, severity, type, allowed_run_frequency, + # near_real_time_live_rule_eligible, etag, and scope. + # This is the default value for ListRules and ListRuleRevisions. + BASIC = 1 + + # Include all fields. + # This is the default value for GetRule. + FULL = 2 + + # Include basic metadata about the rule's revision only. + # Returned fields include: revision_id and revision_create_time. + REVISION_METADATA_ONLY = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# 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 from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..a52275cebf89 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb @@ -0,0 +1,56 @@ +# 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 Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values. + # * A month and day, with a zero year (for example, an anniversary). + # * A year on its own, with a zero month and a zero day. + # * A year and month, with a zero day (for example, a credit card expiration + # date). + # + # Related types: + # + # * [google.type.TimeOfDay][google.type.TimeOfDay] + # * [google.type.DateTime][google.type.DateTime] + # * {::Google::Protobuf::Timestamp google.protobuf.Timestamp} + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# 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 Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile new file mode 100644 index 000000000000..8856abb69960 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# 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-chronicle-v1", path: "../" +else + gem "google-cloud-chronicle-v1" +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/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb new file mode 100644 index 000000000000..b946884ee81c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the batch_get_dashboard_charts call in the DashboardChartService 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::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts. +# +def batch_get_dashboard_charts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new + + # Call the batch_get_dashboard_charts method. + result = client.batch_get_dashboard_charts request + + # The returned object is of type Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse. + p result +end +# [END chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb new file mode 100644 index 000000000000..f2cf1b752bfe --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_dashboard_chart call in the DashboardChartService 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::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart. +# +def get_dashboard_chart + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new + + # Call the get_dashboard_chart method. + result = client.get_dashboard_chart request + + # The returned object is of type Google::Cloud::Chronicle::V1::DashboardChart. + p result +end +# [END chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb new file mode 100644 index 000000000000..c13ee1ca8e7d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the execute_dashboard_query call in the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query. +# +def execute_dashboard_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new + + # Call the execute_dashboard_query method. + result = client.execute_dashboard_query request + + # The returned object is of type Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse. + p result +end +# [END chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb new file mode 100644 index 000000000000..67a0b2143915 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_dashboard_query call in the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query. +# +def get_dashboard_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new + + # Call the get_dashboard_query method. + result = client.get_dashboard_query request + + # The returned object is of type Google::Cloud::Chronicle::V1::DashboardQuery. + p result +end +# [END chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb new file mode 100644 index 000000000000..3bfe7e104b89 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_label. +# +def create_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new + + # Call the create_data_access_label method. + result = client.create_data_access_label request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb new file mode 100644 index 000000000000..870849c6db47 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope. +# +def create_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new + + # Call the create_data_access_scope method. + result = client.create_data_access_scope request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb new file mode 100644 index 000000000000..e12c3440d608 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label. +# +def delete_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new + + # Call the delete_data_access_label method. + result = client.delete_data_access_label request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb new file mode 100644 index 000000000000..0341030faa5c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope. +# +def delete_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new + + # Call the delete_data_access_scope method. + result = client.delete_data_access_scope request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb new file mode 100644 index 000000000000..988f66268da5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_label. +# +def get_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new + + # Call the get_data_access_label method. + result = client.get_data_access_label request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb new file mode 100644 index 000000000000..d9de6dbf8b84 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope. +# +def get_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new + + # Call the get_data_access_scope method. + result = client.get_data_access_scope request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb new file mode 100644 index 000000000000..e62e53adb905 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_data_access_labels call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels. +# +def list_data_access_labels + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new + + # Call the list_data_access_labels method. + result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. + p item + end +end +# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb new file mode 100644 index 000000000000..4b11c99375f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_data_access_scopes call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes. +# +def list_data_access_scopes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new + + # Call the list_data_access_scopes method. + result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. + p item + end +end +# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb new file mode 100644 index 000000000000..2974c40a7a70 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_label. +# +def update_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new + + # Call the update_data_access_label method. + result = client.update_data_access_label request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb new file mode 100644 index 000000000000..81a0e349a4fa --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope. +# +def update_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new + + # Call the update_data_access_scope method. + result = client.update_data_access_scope request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb new file mode 100644 index 000000000000..0f928a0c692e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the bulk_create_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows. +# +def bulk_create_data_table_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new + + # Call the bulk_create_data_table_rows method. + result = client.bulk_create_data_table_rows request + + # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. + p result +end +# [END chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb new file mode 100644 index 000000000000..b830992e26f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the bulk_get_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows. +# +def bulk_get_data_table_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new + + # Call the bulk_get_data_table_rows method. + result = client.bulk_get_data_table_rows request + + # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. + p result +end +# [END chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb new file mode 100644 index 000000000000..bf1a60ed662a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the bulk_replace_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows. +# +def bulk_replace_data_table_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new + + # Call the bulk_replace_data_table_rows method. + result = client.bulk_replace_data_table_rows request + + # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. + p result +end +# [END chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb new file mode 100644 index 000000000000..8e3e06124128 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the bulk_update_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows. +# +def bulk_update_data_table_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new + + # Call the bulk_update_data_table_rows method. + result = client.bulk_update_data_table_rows request + + # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. + p result +end +# [END chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb new file mode 100644 index 000000000000..20855dc93460 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_CreateDataTable_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#create_data_table. +# +def create_data_table + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new + + # Call the create_data_table method. + result = client.create_data_table request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + p result +end +# [END chronicle_v1_generated_DataTableService_CreateDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb new file mode 100644 index 000000000000..e73cfbdf0f57 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_CreateDataTableRow_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#create_data_table_row. +# +def create_data_table_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new + + # Call the create_data_table_row method. + result = client.create_data_table_row request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + p result +end +# [END chronicle_v1_generated_DataTableService_CreateDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb new file mode 100644 index 000000000000..b53e925c209a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_DeleteDataTable_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#delete_data_table. +# +def delete_data_table + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new + + # Call the delete_data_table method. + result = client.delete_data_table request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_DataTableService_DeleteDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb new file mode 100644 index 000000000000..3a0d3d7177b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#delete_data_table_row. +# +def delete_data_table_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new + + # Call the delete_data_table_row method. + result = client.delete_data_table_row request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb new file mode 100644 index 000000000000..cdfb160a5412 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_GetDataTable_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table. +# +def get_data_table + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new + + # Call the get_data_table method. + result = client.get_data_table request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + p result +end +# [END chronicle_v1_generated_DataTableService_GetDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb new file mode 100644 index 000000000000..f94f46436ce6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_table_operation_errors call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors. +# +def get_data_table_operation_errors + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new + + # Call the get_data_table_operation_errors method. + result = client.get_data_table_operation_errors request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. + p result +end +# [END chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb new file mode 100644 index 000000000000..3b0cd44aedd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_GetDataTableRow_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table_row. +# +def get_data_table_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new + + # Call the get_data_table_row method. + result = client.get_data_table_row request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + p result +end +# [END chronicle_v1_generated_DataTableService_GetDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb new file mode 100644 index 000000000000..9da3fb51c80a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_DataTableService_ListDataTableRows_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#list_data_table_rows. +# +def list_data_table_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new + + # Call the list_data_table_rows method. + result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. + p item + end +end +# [END chronicle_v1_generated_DataTableService_ListDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb new file mode 100644 index 000000000000..b3aab95d25d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_DataTableService_ListDataTables_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_data_tables call in the DataTableService 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::Chronicle::V1::DataTableService::Client#list_data_tables. +# +def list_data_tables + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new + + # Call the list_data_tables method. + result = client.list_data_tables 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::Chronicle::V1::DataTable. + p item + end +end +# [END chronicle_v1_generated_DataTableService_ListDataTables_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb new file mode 100644 index 000000000000..aa62027b9721 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_UpdateDataTable_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#update_data_table. +# +def update_data_table + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new + + # Call the update_data_table method. + result = client.update_data_table request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + p result +end +# [END chronicle_v1_generated_DataTableService_UpdateDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb new file mode 100644 index 000000000000..d04975357772 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#update_data_table_row. +# +def update_data_table_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new + + # Call the update_data_table_row method. + result = client.update_data_table_row request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + p result +end +# [END chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb new file mode 100644 index 000000000000..76ac024b263d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_EntityService_CreateWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#create_watchlist. +# +def create_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new + + # Call the create_watchlist method. + result = client.create_watchlist request + + # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + p result +end +# [END chronicle_v1_generated_EntityService_CreateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb new file mode 100644 index 000000000000..dce65e1ea1f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_EntityService_DeleteWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#delete_watchlist. +# +def delete_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new + + # Call the delete_watchlist method. + result = client.delete_watchlist request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_EntityService_DeleteWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb new file mode 100644 index 000000000000..429a7abe7363 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_EntityService_GetWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#get_watchlist. +# +def get_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new + + # Call the get_watchlist method. + result = client.get_watchlist request + + # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + p result +end +# [END chronicle_v1_generated_EntityService_GetWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb new file mode 100644 index 000000000000..07fb0f279542 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_EntityService_ListWatchlists_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_watchlists call in the EntityService 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::Chronicle::V1::EntityService::Client#list_watchlists. +# +def list_watchlists + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new + + # Call the list_watchlists method. + result = client.list_watchlists 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::Chronicle::V1::Watchlist. + p item + end +end +# [END chronicle_v1_generated_EntityService_ListWatchlists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb new file mode 100644 index 000000000000..fe92dd9d1924 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_EntityService_UpdateWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#update_watchlist. +# +def update_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new + + # Call the update_watchlist method. + result = client.update_watchlist request + + # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + p result +end +# [END chronicle_v1_generated_EntityService_UpdateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb new file mode 100644 index 000000000000..6b0caad0a1c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard. +# +def get_featured_content_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new + + # Call the get_featured_content_native_dashboard method. + result = client.get_featured_content_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard. + p result +end +# [END chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb new file mode 100644 index 000000000000..4af32dbf10f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the install_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard. +# +def install_featured_content_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new + + # Call the install_featured_content_native_dashboard method. + result = client.install_featured_content_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse. + p result +end +# [END chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb new file mode 100644 index 000000000000..85c26982e0a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_featured_content_native_dashboards call in the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards. +# +def list_featured_content_native_dashboards + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new + + # Call the list_featured_content_native_dashboards method. + result = client.list_featured_content_native_dashboards 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::Chronicle::V1::FeaturedContentNativeDashboard. + p item + end +end +# [END chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb new file mode 100644 index 000000000000..8fdeb2d7ad47 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_InstanceService_GetInstance_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_instance call in the InstanceService 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::Chronicle::V1::InstanceService::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::InstanceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::Chronicle::V1::Instance. + p result +end +# [END chronicle_v1_generated_InstanceService_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb new file mode 100644 index 000000000000..0e419e2bf8ef --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_AddChart_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the add_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#add_chart. +# +def add_chart + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::AddChartRequest.new + + # Call the add_chart method. + result = client.add_chart request + + # The returned object is of type Google::Cloud::Chronicle::V1::AddChartResponse. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_AddChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb new file mode 100644 index 000000000000..9c417af9d3bf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard. +# +def create_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new + + # Call the create_native_dashboard method. + result = client.create_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb new file mode 100644 index 000000000000..18b1e963382b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard. +# +def delete_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new + + # Call the delete_native_dashboard method. + result = client.delete_native_dashboard request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb new file mode 100644 index 000000000000..0c5d87a4034e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the duplicate_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#duplicate_chart. +# +def duplicate_chart + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DuplicateChartRequest.new + + # Call the duplicate_chart method. + result = client.duplicate_chart request + + # The returned object is of type Google::Cloud::Chronicle::V1::DuplicateChartResponse. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb new file mode 100644 index 000000000000..f93d74d1ef9b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the duplicate_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard. +# +def duplicate_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new + + # Call the duplicate_native_dashboard method. + result = client.duplicate_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb new file mode 100644 index 000000000000..e8371b33f150 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_EditChart_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the edit_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#edit_chart. +# +def edit_chart + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::EditChartRequest.new + + # Call the edit_chart method. + result = client.edit_chart request + + # The returned object is of type Google::Cloud::Chronicle::V1::EditChartResponse. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_EditChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb new file mode 100644 index 000000000000..3f6651321533 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the export_native_dashboards call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards. +# +def export_native_dashboards + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new + + # Call the export_native_dashboards method. + result = client.export_native_dashboards request + + # The returned object is of type Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb new file mode 100644 index 000000000000..21ece4372e52 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard. +# +def get_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new + + # Call the get_native_dashboard method. + result = client.get_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb new file mode 100644 index 000000000000..bd4953102a2b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the import_native_dashboards call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards. +# +def import_native_dashboards + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new + + # Call the import_native_dashboards method. + result = client.import_native_dashboards request + + # The returned object is of type Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb new file mode 100644 index 000000000000..7835cddbae64 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_native_dashboards call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards. +# +def list_native_dashboards + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new + + # Call the list_native_dashboards method. + result = client.list_native_dashboards 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::Chronicle::V1::NativeDashboard. + p item + end +end +# [END chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb new file mode 100644 index 000000000000..23318b075f45 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_RemoveChart_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the remove_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#remove_chart. +# +def remove_chart + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::RemoveChartRequest.new + + # Call the remove_chart method. + result = client.remove_chart request + + # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_RemoveChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb new file mode 100644 index 000000000000..883df5cbae10 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard. +# +def update_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new + + # Call the update_native_dashboard method. + result = client.update_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb new file mode 100644 index 000000000000..56680299d2ab --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#create_reference_list. +# +def create_reference_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new + + # Call the create_reference_list method. + result = client.create_reference_list request + + # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + p result +end +# [END chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb new file mode 100644 index 000000000000..9fee3cf12ff5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#get_reference_list. +# +def get_reference_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new + + # Call the get_reference_list method. + result = client.get_reference_list request + + # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + p result +end +# [END chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb new file mode 100644 index 000000000000..11926590f8d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_reference_lists call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#list_reference_lists. +# +def list_reference_lists + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new + + # Call the list_reference_lists method. + result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. + p item + end +end +# [END chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb new file mode 100644 index 000000000000..a914529bd2b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#update_reference_list. +# +def update_reference_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new + + # Call the update_reference_list method. + result = client.update_reference_list request + + # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + p result +end +# [END chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb new file mode 100644 index 000000000000..0cac677634bb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb @@ -0,0 +1,54 @@ +# 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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#create_retrohunt. +# +def create_retrohunt + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new + + # Call the create_retrohunt method. + result = client.create_retrohunt 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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb new file mode 100644 index 000000000000..57e6c2e2a973 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_CreateRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#create_rule. +# +def create_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new + + # Call the create_rule method. + result = client.create_rule request + + # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + p result +end +# [END chronicle_v1_generated_RuleService_CreateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb new file mode 100644 index 000000000000..db56a864183a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_DeleteRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#delete_rule. +# +def delete_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new + + # Call the delete_rule method. + result = client.delete_rule request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_RuleService_DeleteRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb new file mode 100644 index 000000000000..481026822412 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_GetRetrohunt_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#get_retrohunt. +# +def get_retrohunt + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new + + # Call the get_retrohunt method. + result = client.get_retrohunt request + + # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. + p result +end +# [END chronicle_v1_generated_RuleService_GetRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb new file mode 100644 index 000000000000..eb550559d7a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_GetRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule. +# +def get_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetRuleRequest.new + + # Call the get_rule method. + result = client.get_rule request + + # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + p result +end +# [END chronicle_v1_generated_RuleService_GetRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb new file mode 100644 index 000000000000..c4d8a125f230 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_GetRuleDeployment_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule_deployment. +# +def get_rule_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new + + # Call the get_rule_deployment method. + result = client.get_rule_deployment request + + # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + p result +end +# [END chronicle_v1_generated_RuleService_GetRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb new file mode 100644 index 000000000000..fd21d3d155c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_RuleService_ListRetrohunts_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_retrohunts call in the RuleService 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::Chronicle::V1::RuleService::Client#list_retrohunts. +# +def list_retrohunts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new + + # Call the list_retrohunts method. + result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRetrohunts_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb new file mode 100644 index 000000000000..061793135cde --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_RuleService_ListRuleDeployments_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_rule_deployments call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_deployments. +# +def list_rule_deployments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new + + # Call the list_rule_deployments method. + result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRuleDeployments_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb new file mode 100644 index 000000000000..ee56939b8586 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_RuleService_ListRuleRevisions_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_rule_revisions call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_revisions. +# +def list_rule_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new + + # Call the list_rule_revisions method. + result = client.list_rule_revisions 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::Chronicle::V1::Rule. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRuleRevisions_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb new file mode 100644 index 000000000000..607a52db7bbb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_RuleService_ListRules_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_rules call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rules. +# +def list_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRulesRequest.new + + # Call the list_rules method. + result = client.list_rules 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::Chronicle::V1::Rule. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb new file mode 100644 index 000000000000..612a59e32e81 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_UpdateRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule. +# +def update_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new + + # Call the update_rule method. + result = client.update_rule request + + # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + p result +end +# [END chronicle_v1_generated_RuleService_UpdateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb new file mode 100644 index 000000000000..c8c3638a445e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule_deployment. +# +def update_rule_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new + + # Call the update_rule_deployment method. + result = client.update_rule_deployment request + + # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + p result +end +# [END chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json b/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json new file mode 100644 index 000000000000..07d9b2ddb5a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json @@ -0,0 +1,2655 @@ +{ + "client_library": { + "name": "google-cloud-chronicle-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.chronicle.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync", + "title": "Snippet for the get_dashboard_query call in the DashboardQueryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query.", + "file": "dashboard_query_service/get_dashboard_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dashboard_query", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DashboardQuery", + "client": { + "short_name": "DashboardQueryService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client" + }, + "method": { + "short_name": "GetDashboardQuery", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService.GetDashboardQuery", + "service": { + "short_name": "DashboardQueryService", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync", + "title": "Snippet for the execute_dashboard_query call in the DashboardQueryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query.", + "file": "dashboard_query_service/execute_dashboard_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "execute_dashboard_query", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse", + "client": { + "short_name": "DashboardQueryService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client" + }, + "method": { + "short_name": "ExecuteDashboardQuery", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService.ExecuteDashboardQuery", + "service": { + "short_name": "DashboardQueryService", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync", + "title": "Snippet for the get_dashboard_chart call in the DashboardChartService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart.", + "file": "dashboard_chart_service/get_dashboard_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dashboard_chart", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDashboardChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DashboardChart", + "client": { + "short_name": "DashboardChartService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client" + }, + "method": { + "short_name": "GetDashboardChart", + "full_name": "google.cloud.chronicle.v1.DashboardChartService.GetDashboardChart", + "service": { + "short_name": "DashboardChartService", + "full_name": "google.cloud.chronicle.v1.DashboardChartService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync", + "title": "Snippet for the batch_get_dashboard_charts call in the DashboardChartService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts.", + "file": "dashboard_chart_service/batch_get_dashboard_charts.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_get_dashboard_charts", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse", + "client": { + "short_name": "DashboardChartService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client" + }, + "method": { + "short_name": "BatchGetDashboardCharts", + "full_name": "google.cloud.chronicle.v1.DashboardChartService.BatchGetDashboardCharts", + "service": { + "short_name": "DashboardChartService", + "full_name": "google.cloud.chronicle.v1.DashboardChartService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync", + "title": "Snippet for the create_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label.", + "file": "data_access_control_service/create_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "CreateDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync", + "title": "Snippet for the get_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label.", + "file": "data_access_control_service/get_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "GetDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync", + "title": "Snippet for the list_data_access_labels call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels.", + "file": "data_access_control_service/list_data_access_labels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_access_labels", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "ListDataAccessLabels", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessLabels", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync", + "title": "Snippet for the update_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label.", + "file": "data_access_control_service/update_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "UpdateDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync", + "title": "Snippet for the delete_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label.", + "file": "data_access_control_service/delete_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "DeleteDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync", + "title": "Snippet for the create_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope.", + "file": "data_access_control_service/create_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "CreateDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync", + "title": "Snippet for the get_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope.", + "file": "data_access_control_service/get_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "GetDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync", + "title": "Snippet for the list_data_access_scopes call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes.", + "file": "data_access_control_service/list_data_access_scopes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_access_scopes", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "ListDataAccessScopes", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessScopes", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync", + "title": "Snippet for the update_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope.", + "file": "data_access_control_service/update_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "UpdateDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync", + "title": "Snippet for the delete_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope.", + "file": "data_access_control_service/delete_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "DeleteDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_CreateDataTable_sync", + "title": "Snippet for the create_data_table call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table.", + "file": "data_table_service/create_data_table.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_table", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateDataTableRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTable", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "CreateDataTable", + "full_name": "google.cloud.chronicle.v1.DataTableService.CreateDataTable", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_ListDataTables_sync", + "title": "Snippet for the list_data_tables call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_tables.", + "file": "data_table_service/list_data_tables.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_tables", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_tables", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListDataTablesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListDataTablesResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "ListDataTables", + "full_name": "google.cloud.chronicle.v1.DataTableService.ListDataTables", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_GetDataTable_sync", + "title": "Snippet for the get_data_table call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table.", + "file": "data_table_service/get_data_table.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_table", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataTableRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTable", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "GetDataTable", + "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTable", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_UpdateDataTable_sync", + "title": "Snippet for the update_data_table call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table.", + "file": "data_table_service/update_data_table.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_table", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateDataTableRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTable", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "UpdateDataTable", + "full_name": "google.cloud.chronicle.v1.DataTableService.UpdateDataTable", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_DeleteDataTable_sync", + "title": "Snippet for the delete_data_table call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table.", + "file": "data_table_service/delete_data_table.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_table", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteDataTableRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "DeleteDataTable", + "full_name": "google.cloud.chronicle.v1.DataTableService.DeleteDataTable", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_CreateDataTableRow_sync", + "title": "Snippet for the create_data_table_row call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table_row.", + "file": "data_table_service/create_data_table_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_table_row", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "CreateDataTableRow", + "full_name": "google.cloud.chronicle.v1.DataTableService.CreateDataTableRow", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync", + "title": "Snippet for the update_data_table_row call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table_row.", + "file": "data_table_service/update_data_table_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_table_row", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "UpdateDataTableRow", + "full_name": "google.cloud.chronicle.v1.DataTableService.UpdateDataTableRow", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_ListDataTableRows_sync", + "title": "Snippet for the list_data_table_rows call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_table_rows.", + "file": "data_table_service/list_data_table_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_table_rows", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_table_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "ListDataTableRows", + "full_name": "google.cloud.chronicle.v1.DataTableService.ListDataTableRows", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_GetDataTableRow_sync", + "title": "Snippet for the get_data_table_row call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_row.", + "file": "data_table_service/get_data_table_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_table_row", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataTableRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "GetDataTableRow", + "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTableRow", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync", + "title": "Snippet for the delete_data_table_row call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table_row.", + "file": "data_table_service/delete_data_table_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_table_row", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "DeleteDataTableRow", + "full_name": "google.cloud.chronicle.v1.DataTableService.DeleteDataTableRow", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync", + "title": "Snippet for the bulk_create_data_table_rows call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows.", + "file": "data_table_service/bulk_create_data_table_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_create_data_table_rows", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "BulkCreateDataTableRows", + "full_name": "google.cloud.chronicle.v1.DataTableService.BulkCreateDataTableRows", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync", + "title": "Snippet for the bulk_get_data_table_rows call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows.", + "file": "data_table_service/bulk_get_data_table_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_get_data_table_rows", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "BulkGetDataTableRows", + "full_name": "google.cloud.chronicle.v1.DataTableService.BulkGetDataTableRows", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync", + "title": "Snippet for the bulk_replace_data_table_rows call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows.", + "file": "data_table_service/bulk_replace_data_table_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_replace_data_table_rows", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "BulkReplaceDataTableRows", + "full_name": "google.cloud.chronicle.v1.DataTableService.BulkReplaceDataTableRows", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync", + "title": "Snippet for the bulk_update_data_table_rows call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows.", + "file": "data_table_service/bulk_update_data_table_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_update_data_table_rows", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "BulkUpdateDataTableRows", + "full_name": "google.cloud.chronicle.v1.DataTableService.BulkUpdateDataTableRows", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync", + "title": "Snippet for the get_data_table_operation_errors call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors.", + "file": "data_table_service/get_data_table_operation_errors.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_table_operation_errors", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTableOperationErrors", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "GetDataTableOperationErrors", + "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTableOperationErrors", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_GetWatchlist_sync", + "title": "Snippet for the get_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist.", + "file": "entity_service/get_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "GetWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.GetWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_ListWatchlists_sync", + "title": "Snippet for the list_watchlists call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists.", + "file": "entity_service/list_watchlists.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_watchlists", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListWatchlistsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListWatchlistsResponse", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "ListWatchlists", + "full_name": "google.cloud.chronicle.v1.EntityService.ListWatchlists", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_CreateWatchlist_sync", + "title": "Snippet for the create_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist.", + "file": "entity_service/create_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "CreateWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.CreateWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_UpdateWatchlist_sync", + "title": "Snippet for the update_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist.", + "file": "entity_service/update_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "UpdateWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.UpdateWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_DeleteWatchlist_sync", + "title": "Snippet for the delete_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist.", + "file": "entity_service/delete_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "DeleteWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.DeleteWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync", + "title": "Snippet for the create_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard.", + "file": "native_dashboard_service/create_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "CreateNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.CreateNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync", + "title": "Snippet for the get_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard.", + "file": "native_dashboard_service/get_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "GetNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.GetNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync", + "title": "Snippet for the list_native_dashboards call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards.", + "file": "native_dashboard_service/list_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "ListNativeDashboards", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ListNativeDashboards", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync", + "title": "Snippet for the update_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard.", + "file": "native_dashboard_service/update_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "UpdateNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.UpdateNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync", + "title": "Snippet for the duplicate_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard.", + "file": "native_dashboard_service/duplicate_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "duplicate_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "DuplicateNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DuplicateNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync", + "title": "Snippet for the delete_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard.", + "file": "native_dashboard_service/delete_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "DeleteNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DeleteNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_AddChart_sync", + "title": "Snippet for the add_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#add_chart.", + "file": "native_dashboard_service/add_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "add_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#add_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::AddChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::AddChartResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "AddChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.AddChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_RemoveChart_sync", + "title": "Snippet for the remove_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#remove_chart.", + "file": "native_dashboard_service/remove_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "remove_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#remove_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::RemoveChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "RemoveChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.RemoveChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_EditChart_sync", + "title": "Snippet for the edit_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#edit_chart.", + "file": "native_dashboard_service/edit_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "edit_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#edit_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::EditChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::EditChartResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "EditChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.EditChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync", + "title": "Snippet for the duplicate_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_chart.", + "file": "native_dashboard_service/duplicate_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "duplicate_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DuplicateChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DuplicateChartResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "DuplicateChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DuplicateChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync", + "title": "Snippet for the export_native_dashboards call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards.", + "file": "native_dashboard_service/export_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "ExportNativeDashboards", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ExportNativeDashboards", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync", + "title": "Snippet for the import_native_dashboards call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards.", + "file": "native_dashboard_service/import_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "ImportNativeDashboards", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ImportNativeDashboards", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync", + "title": "Snippet for the get_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard.", + "file": "featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_featured_content_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard", + "client": { + "short_name": "FeaturedContentNativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" + }, + "method": { + "short_name": "GetFeaturedContentNativeDashboard", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.GetFeaturedContentNativeDashboard", + "service": { + "short_name": "FeaturedContentNativeDashboardService", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync", + "title": "Snippet for the list_featured_content_native_dashboards call in the FeaturedContentNativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards.", + "file": "featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_featured_content_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse", + "client": { + "short_name": "FeaturedContentNativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" + }, + "method": { + "short_name": "ListFeaturedContentNativeDashboards", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.ListFeaturedContentNativeDashboards", + "service": { + "short_name": "FeaturedContentNativeDashboardService", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync", + "title": "Snippet for the install_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard.", + "file": "featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "install_featured_content_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse", + "client": { + "short_name": "FeaturedContentNativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" + }, + "method": { + "short_name": "InstallFeaturedContentNativeDashboard", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.InstallFeaturedContentNativeDashboard", + "service": { + "short_name": "FeaturedContentNativeDashboardService", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_InstanceService_GetInstance_sync", + "title": "Snippet for the get_instance call in the InstanceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance.", + "file": "instance_service/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Instance", + "client": { + "short_name": "InstanceService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.cloud.chronicle.v1.InstanceService.GetInstance", + "service": { + "short_name": "InstanceService", + "full_name": "google.cloud.chronicle.v1.InstanceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_GetReferenceList_sync", + "title": "Snippet for the get_reference_list call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list.", + "file": "reference_list_service/get_reference_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_reference_list", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetReferenceListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "GetReferenceList", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.GetReferenceList", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync", + "title": "Snippet for the list_reference_lists call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists.", + "file": "reference_list_service/list_reference_lists.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reference_lists", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListReferenceListsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListReferenceListsResponse", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "ListReferenceLists", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.ListReferenceLists", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync", + "title": "Snippet for the create_reference_list call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list.", + "file": "reference_list_service/create_reference_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_reference_list", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateReferenceListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "CreateReferenceList", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.CreateReferenceList", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync", + "title": "Snippet for the update_reference_list call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list.", + "file": "reference_list_service/update_reference_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_reference_list", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "UpdateReferenceList", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.UpdateReferenceList", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_CreateRule_sync", + "title": "Snippet for the create_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_rule.", + "file": "rule_service/create_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Rule", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "CreateRule", + "full_name": "google.cloud.chronicle.v1.RuleService.CreateRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_GetRule_sync", + "title": "Snippet for the get_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule.", + "file": "rule_service/get_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Rule", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "GetRule", + "full_name": "google.cloud.chronicle.v1.RuleService.GetRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRules_sync", + "title": "Snippet for the list_rules call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rules.", + "file": "rule_service/list_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rules", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRulesResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRules", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRules", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_UpdateRule_sync", + "title": "Snippet for the update_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule.", + "file": "rule_service/update_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Rule", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "UpdateRule", + "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_DeleteRule_sync", + "title": "Snippet for the delete_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule.", + "file": "rule_service/delete_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "DeleteRule", + "full_name": "google.cloud.chronicle.v1.RuleService.DeleteRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRuleRevisions_sync", + "title": "Snippet for the list_rule_revisions call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions.", + "file": "rule_service/list_rule_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rule_revisions", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRuleRevisions", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleRevisions", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_CreateRetrohunt_sync", + "title": "Snippet for the create_retrohunt call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt.", + "file": "rule_service/create_retrohunt.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_retrohunt", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "CreateRetrohunt", + "full_name": "google.cloud.chronicle.v1.RuleService.CreateRetrohunt", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_GetRetrohunt_sync", + "title": "Snippet for the get_retrohunt call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt.", + "file": "rule_service/get_retrohunt.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_retrohunt", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetRetrohuntRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Retrohunt", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "GetRetrohunt", + "full_name": "google.cloud.chronicle.v1.RuleService.GetRetrohunt", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRetrohunts_sync", + "title": "Snippet for the list_retrohunts call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts.", + "file": "rule_service/list_retrohunts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_retrohunts", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRetrohunts", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRetrohunts", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_GetRuleDeployment_sync", + "title": "Snippet for the get_rule_deployment call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment.", + "file": "rule_service/get_rule_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_rule_deployment", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "GetRuleDeployment", + "full_name": "google.cloud.chronicle.v1.RuleService.GetRuleDeployment", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRuleDeployments_sync", + "title": "Snippet for the list_rule_deployments call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments.", + "file": "rule_service/list_rule_deployments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rule_deployments", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRuleDeployments", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleDeployments", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync", + "title": "Snippet for the update_rule_deployment call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment.", + "file": "rule_service/update_rule_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_rule_deployment", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "UpdateRuleDeployment", + "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRuleDeployment", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb new file mode 100644 index 000000000000..19d05a898902 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb @@ -0,0 +1,67 @@ +# 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/chronicle/v1/dashboard_chart_service" + +class ::Google::Cloud::Chronicle::V1::DashboardChartService::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_dashboard_chart_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb new file mode 100644 index 000000000000..8efea8f4f55f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb @@ -0,0 +1,208 @@ +# 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/chronicle/v1/dashboard_chart_pb" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest" + + +class ::Google::Cloud::Chronicle::V1::DashboardChartService::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_get_dashboard_chart + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DashboardChart.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dashboard_chart_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::Chronicle::V1::DashboardChartService::Rest::ServiceStub.stub :transcode_get_dashboard_chart_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dashboard_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_dashboard_chart({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_dashboard_chart name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_dashboard_chart ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_dashboard_chart({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_dashboard_chart(::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dashboard_chart_client_stub.call_count + end + end + end + + def test_batch_get_dashboard_charts + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + + batch_get_dashboard_charts_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::Chronicle::V1::DashboardChartService::Rest::ServiceStub.stub :transcode_batch_get_dashboard_charts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_get_dashboard_charts_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_get_dashboard_charts({ parent: parent, names: names }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_get_dashboard_charts parent: parent, names: names do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_get_dashboard_charts ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_get_dashboard_charts({ parent: parent, names: names }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_get_dashboard_charts(::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_get_dashboard_charts_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::Chronicle::V1::DashboardChartService::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::Chronicle::V1::DashboardChartService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb new file mode 100644 index 000000000000..f2b3e78e90c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb @@ -0,0 +1,222 @@ +# 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/chronicle/v1/dashboard_chart_pb" +require "google/cloud/chronicle/v1/dashboard_chart_service" + +class ::Google::Cloud::Chronicle::V1::DashboardChartService::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_get_dashboard_chart + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DashboardChart.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_dashboard_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dashboard_chart, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dashboard_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_dashboard_chart({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_dashboard_chart name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_dashboard_chart ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_dashboard_chart({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_dashboard_chart(::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.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_dashboard_chart_client_stub.call_rpc_count + end + end + + def test_batch_get_dashboard_charts + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse.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" + names = ["hello world"] + + batch_get_dashboard_charts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_get_dashboard_charts, name + assert_kind_of ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_get_dashboard_charts_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_get_dashboard_charts({ parent: parent, names: names }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_get_dashboard_charts parent: parent, names: names do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_get_dashboard_charts ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_get_dashboard_charts({ parent: parent, names: names }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_get_dashboard_charts(::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_get_dashboard_charts_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::Chronicle::V1::DashboardChartService::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::Chronicle::V1::DashboardChartService::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::Chronicle::V1::DashboardChartService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::DashboardChartService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb new file mode 100644 index 000000000000..5ea1405fc02d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb @@ -0,0 +1,79 @@ +# 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/chronicle/v1/dashboard_query_service" + +class ::Google::Cloud::Chronicle::V1::DashboardQueryService::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_dashboard_chart_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path + end + end + + def test_dashboard_query_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_query_path project: "value0", location: "value1", instance: "value2", query: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardQueries/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb new file mode 100644 index 000000000000..f1b467a4b248 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb @@ -0,0 +1,211 @@ +# 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/chronicle/v1/dashboard_query_pb" +require "google/cloud/chronicle/v1/dashboard_query_service/rest" + + +class ::Google::Cloud::Chronicle::V1::DashboardQueryService::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_get_dashboard_query + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DashboardQuery.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dashboard_query_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::Chronicle::V1::DashboardQueryService::Rest::ServiceStub.stub :transcode_get_dashboard_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dashboard_query_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_dashboard_query({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_dashboard_query name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_dashboard_query ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_dashboard_query({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_dashboard_query(::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dashboard_query_client_stub.call_count + end + end + end + + def test_execute_dashboard_query + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = {} + filters = [{}] + clear_cache = true + use_previous_time_range = true + + execute_dashboard_query_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::Chronicle::V1::DashboardQueryService::Rest::ServiceStub.stub :transcode_execute_dashboard_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, execute_dashboard_query_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.execute_dashboard_query parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.execute_dashboard_query ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.execute_dashboard_query(::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, execute_dashboard_query_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::Chronicle::V1::DashboardQueryService::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::Chronicle::V1::DashboardQueryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb new file mode 100644 index 000000000000..17503831b5bc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb @@ -0,0 +1,228 @@ +# 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/chronicle/v1/dashboard_query_pb" +require "google/cloud/chronicle/v1/dashboard_query_service" + +class ::Google::Cloud::Chronicle::V1::DashboardQueryService::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_get_dashboard_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DashboardQuery.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_dashboard_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dashboard_query, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dashboard_query_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_dashboard_query({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_dashboard_query name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_dashboard_query ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_dashboard_query({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_dashboard_query(::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.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_dashboard_query_client_stub.call_rpc_count + end + end + + def test_execute_dashboard_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse.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" + query = {} + filters = [{}] + clear_cache = true + use_previous_time_range = true + + execute_dashboard_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :execute_dashboard_query, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardQuery), request["query"] + assert_kind_of ::Google::Cloud::Chronicle::V1::DashboardFilter, request["filters"].first + assert_equal true, request["clear_cache"] + assert_equal true, request["use_previous_time_range"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, execute_dashboard_query_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.execute_dashboard_query parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.execute_dashboard_query ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.execute_dashboard_query(::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, execute_dashboard_query_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::Chronicle::V1::DashboardQueryService::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::Chronicle::V1::DashboardQueryService::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::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb new file mode 100644 index 000000000000..8ef29809b076 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb @@ -0,0 +1,79 @@ +# 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/chronicle/v1/data_access_control_service" + +class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_label_path project: "value0", location: "value1", instance: "value2", data_access_label: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessLabels/value3", path + end + end + + def test_data_access_scope_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb new file mode 100644 index 000000000000..a20b2c953e40 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb @@ -0,0 +1,651 @@ +# 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/chronicle/v1/data_access_control_pb" +require "google/cloud/chronicle/v1/data_access_control_service/rest" + + +class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_access_label = {} + data_access_label_id = "hello world" + + create_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_access_label_client_stub.call_count + end + end + end + + def test_get_data_access_label + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_access_label({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_access_label name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_access_label({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_access_label_client_stub.call_count + end + end + end + + def test_list_data_access_labels + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_access_labels_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_labels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_access_labels_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_access_labels parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_access_labels_client_stub.call_count + end + end + end + + def test_update_data_access_label + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_access_label = {} + update_mask = {} + + update_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_access_label_client_stub.call_count + end + end + end + + def test_delete_data_access_label + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_access_label({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_access_label name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_access_label({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_access_label_client_stub.call_count + end + end + end + + def test_create_data_access_scope + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_access_scope = {} + data_access_scope_id = "hello world" + + create_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_access_scope_client_stub.call_count + end + end + end + + def test_get_data_access_scope + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_access_scope({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_access_scope name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_access_scope({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_access_scope_client_stub.call_count + end + end + end + + def test_list_data_access_scopes + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_access_scopes_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_scopes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_access_scopes_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_access_scopes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_access_scopes_client_stub.call_count + end + end + end + + def test_update_data_access_scope + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_access_scope = {} + update_mask = {} + + update_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_access_scope_client_stub.call_count + end + end + end + + def test_delete_data_access_scope + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_access_scope({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_access_scope name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_access_scope({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb new file mode 100644 index 000000000000..32e8f27fe8cf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb @@ -0,0 +1,718 @@ +# 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/chronicle/v1/data_access_control_pb" +require "google/cloud/chronicle/v1/data_access_control_service" + +class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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" + data_access_label = {} + data_access_label_id = "hello world" + + create_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] + assert_equal "hello world", request["data_access_label_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_access_label_client_stub.call_rpc_count + end + end + + def test_get_data_access_label + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_access_label({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_access_label name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_access_label({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count + end + end + + def test_list_data_access_labels + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_access_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_access_labels, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_access_labels_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_access_labels parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_data_access_labels_client_stub.call_rpc_count + end + end + + def test_update_data_access_label + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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. + data_access_label = {} + update_mask = {} + + update_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_access_label({ data_access_label: data_access_label, 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 + client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, 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_data_access_label_client_stub.call_rpc_count + end + end + + def test_delete_data_access_label + # 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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_access_label({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_access_label name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_access_label({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count + end + end + + def test_create_data_access_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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" + data_access_scope = {} + data_access_scope_id = "hello world" + + create_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] + assert_equal "hello world", request["data_access_scope_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_access_scope_client_stub.call_rpc_count + end + end + + def test_get_data_access_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_access_scope({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_access_scope name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_access_scope({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.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_data_access_scope_client_stub.call_rpc_count + end + end + + def test_list_data_access_scopes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_access_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_access_scopes, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_access_scopes_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_access_scopes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_data_access_scopes_client_stub.call_rpc_count + end + end + + def test_update_data_access_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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. + data_access_scope = {} + update_mask = {} + + update_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_access_scope({ data_access_scope: data_access_scope, 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 + client.update_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, 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_data_access_scope_client_stub.call_rpc_count + end + end + + def test_delete_data_access_scope + # 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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_access_scope({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_access_scope name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_access_scope({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.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_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb new file mode 100644 index 000000000000..ea65a25ca487 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb @@ -0,0 +1,103 @@ +# 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/chronicle/v1/data_table_service" + +class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_access_scope_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path + end + end + + def test_data_table_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_table_path project: "value0", location: "value1", instance: "value2", data_table: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataTables/value3", path + end + end + + def test_data_table_operation_errors_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_table_operation_errors_path project: "value0", location: "value1", instance: "value2", data_table_operation_errors: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataTableOperationErrors/value3", path + end + end + + def test_data_table_row_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_table_row_path project: "value0", location: "value1", instance: "value2", data_table: "value3", data_table_row: "value4" + assert_equal "projects/value0/locations/value1/instances/value2/dataTables/value3/dataTableRows/value4", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb new file mode 100644 index 000000000000..7509d98ad2cb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb @@ -0,0 +1,926 @@ +# 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/chronicle/v1/data_table_pb" +require "google/cloud/chronicle/v1/data_table_service/rest" + + +class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_table + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTable.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_table = {} + data_table_id = "hello world" + + create_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_create_data_table_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_table parent: parent, data_table: data_table, data_table_id: data_table_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_table ::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_table(::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_table_client_stub.call_count + end + end + end + + def test_list_data_tables + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_data_tables_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_list_data_tables_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_tables_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_tables parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_tables ::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_tables(::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_tables_client_stub.call_count + end + end + end + + def test_get_data_table + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTable.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_table({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_table name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_table ::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_table({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_table(::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_table_client_stub.call_count + end + end + end + + def test_update_data_table + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTable.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_table = {} + update_mask = {} + + update_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_update_data_table_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_table({ data_table: data_table, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_table data_table: data_table, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_table ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_table({ data_table: data_table, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_table(::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_table_client_stub.call_count + end + end + end + + def test_delete_data_table + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_delete_data_table_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_table({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_table name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_table ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_table({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_table(::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_table_client_stub.call_count + end + end + end + + def test_create_data_table_row + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_table_row = {} + + create_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_create_data_table_row_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_table_row({ parent: parent, data_table_row: data_table_row }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_table_row parent: parent, data_table_row: data_table_row do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_table_row ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_table_row({ parent: parent, data_table_row: data_table_row }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_table_row(::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_table_row_client_stub.call_count + end + end + end + + def test_update_data_table_row + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_table_row = {} + update_mask = {} + + update_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_update_data_table_row_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_table_row data_table_row: data_table_row, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_table_row ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_table_row(::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_table_row_client_stub.call_count + end + end + end + + def test_list_data_table_rows + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + list_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_list_data_table_rows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_table_rows parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_table_rows ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_table_rows(::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_table_rows_client_stub.call_count + end + end + end + + def test_get_data_table_row + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_row_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_table_row({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_table_row name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_table_row ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_table_row({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_table_row(::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_table_row_client_stub.call_count + end + end + end + + def test_delete_data_table_row + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_delete_data_table_row_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_table_row({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_table_row name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_table_row ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_table_row({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_table_row(::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_table_row_client_stub.call_count + end + end + end + + def test_bulk_create_data_table_rows + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + bulk_create_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_create_data_table_rows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_create_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_create_data_table_rows({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_create_data_table_rows parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_create_data_table_rows ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_create_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_create_data_table_rows(::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_create_data_table_rows_client_stub.call_count + end + end + end + + def test_bulk_get_data_table_rows + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + bulk_get_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_get_data_table_rows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_get_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_get_data_table_rows({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_get_data_table_rows parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_get_data_table_rows ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_get_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_get_data_table_rows(::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_get_data_table_rows_client_stub.call_count + end + end + end + + def test_bulk_replace_data_table_rows + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + bulk_replace_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_replace_data_table_rows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_replace_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_replace_data_table_rows({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_replace_data_table_rows parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_replace_data_table_rows ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_replace_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_replace_data_table_rows(::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_replace_data_table_rows_client_stub.call_count + end + end + end + + def test_bulk_update_data_table_rows + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + bulk_update_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_update_data_table_rows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_update_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_update_data_table_rows({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_update_data_table_rows parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_update_data_table_rows ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_update_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_update_data_table_rows(::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_update_data_table_rows_client_stub.call_count + end + end + end + + def test_get_data_table_operation_errors + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_table_operation_errors_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_operation_errors_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_table_operation_errors_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_table_operation_errors({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_table_operation_errors name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_table_operation_errors ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_table_operation_errors({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_table_operation_errors(::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_table_operation_errors_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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb new file mode 100644 index 000000000000..0abf7ea87f8f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb @@ -0,0 +1,1018 @@ +# 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/chronicle/v1/data_table_pb" +require "google/cloud/chronicle/v1/data_table_service" + +class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_table + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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" + data_table = {} + data_table_id = "hello world" + + create_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_table, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTable), request["data_table"] + assert_equal "hello world", request["data_table_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_table parent: parent, data_table: data_table, data_table_id: data_table_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_table ::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_table(::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_table_client_stub.call_rpc_count + end + end + + def test_list_data_tables + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.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" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_data_tables_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_tables, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataTablesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_tables_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_tables parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_tables ::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) 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 + client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, 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 + client.list_data_tables(::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), 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_data_tables_client_stub.call_rpc_count + end + end + + def test_get_data_table + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_table, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_table({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_table name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_table ::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_table({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_table(::Google::Cloud::Chronicle::V1::GetDataTableRequest.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_data_table_client_stub.call_rpc_count + end + end + + def test_update_data_table + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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. + data_table = {} + update_mask = {} + + update_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_table, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTable), request["data_table"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_table({ data_table: data_table, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_table data_table: data_table, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_table ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_table({ data_table: data_table, 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 + client.update_data_table(::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, 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_data_table_client_stub.call_rpc_count + end + end + + def test_delete_data_table + # 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" + force = true + + delete_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_table, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_table({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_table name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_table ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_table({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_table(::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_table_client_stub.call_rpc_count + end + end + + def test_create_data_table_row + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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" + data_table_row = {} + + create_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_table_row, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTableRow), request["data_table_row"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_table_row({ parent: parent, data_table_row: data_table_row }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_table_row parent: parent, data_table_row: data_table_row do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_table_row ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_table_row({ parent: parent, data_table_row: data_table_row }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_table_row(::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_table_row_client_stub.call_rpc_count + end + end + + def test_update_data_table_row + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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. + data_table_row = {} + update_mask = {} + + update_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_table_row, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTableRow), request["data_table_row"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_table_row data_table_row: data_table_row, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_table_row ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_table_row({ data_table_row: data_table_row, 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 + client.update_data_table_row(::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, 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_data_table_row_client_stub.call_rpc_count + end + end + + def test_list_data_table_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.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" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + list_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_table_rows, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_table_rows parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_table_rows ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) 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 + client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, 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 + client.list_data_table_rows(::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), 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_data_table_rows_client_stub.call_rpc_count + end + end + + def test_get_data_table_row + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_table_row, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_table_row({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_table_row name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_table_row ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_table_row({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_table_row(::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.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_data_table_row_client_stub.call_rpc_count + end + end + + def test_delete_data_table_row + # 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_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_table_row, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_table_row({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_table_row name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_table_row ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_table_row({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_table_row(::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.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_data_table_row_client_stub.call_rpc_count + end + end + + def test_bulk_create_data_table_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.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" + requests = [{}] + + bulk_create_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_create_data_table_rows, name + assert_kind_of ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_create_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_create_data_table_rows({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_create_data_table_rows parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_create_data_table_rows ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_create_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_create_data_table_rows(::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_create_data_table_rows_client_stub.call_rpc_count + end + end + + def test_bulk_get_data_table_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.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" + requests = [{}] + + bulk_get_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_get_data_table_rows, name + assert_kind_of ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_get_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_get_data_table_rows({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_get_data_table_rows parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_get_data_table_rows ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_get_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_get_data_table_rows(::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_get_data_table_rows_client_stub.call_rpc_count + end + end + + def test_bulk_replace_data_table_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.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" + requests = [{}] + + bulk_replace_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_replace_data_table_rows, name + assert_kind_of ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_replace_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_replace_data_table_rows({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_replace_data_table_rows parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_replace_data_table_rows ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_replace_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_replace_data_table_rows(::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_replace_data_table_rows_client_stub.call_rpc_count + end + end + + def test_bulk_update_data_table_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.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" + requests = [{}] + + bulk_update_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_update_data_table_rows, name + assert_kind_of ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_update_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_update_data_table_rows({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_update_data_table_rows parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_update_data_table_rows ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_update_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_update_data_table_rows(::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_update_data_table_rows_client_stub.call_rpc_count + end + end + + def test_get_data_table_operation_errors + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.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_data_table_operation_errors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_table_operation_errors, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_table_operation_errors_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_table_operation_errors({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_table_operation_errors name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_table_operation_errors ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_table_operation_errors({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_table_operation_errors(::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.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_data_table_operation_errors_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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::DataTableService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb new file mode 100644 index 000000000000..5d9dc9f08219 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb @@ -0,0 +1,67 @@ +# 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/chronicle/v1/entity_service" + +class ::Google::Cloud::Chronicle::V1::EntityService::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_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_watchlist_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.watchlist_path project: "value0", location: "value1", instance: "value2", watchlist: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/watchlists/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb new file mode 100644 index 000000000000..eaea39586386 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb @@ -0,0 +1,376 @@ +# 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/chronicle/v1/entity_pb" +require "google/cloud/chronicle/v1/entity_service/rest" + + +class ::Google::Cloud::Chronicle::V1::EntityService::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_get_watchlist + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_get_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_watchlist({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_watchlist name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_watchlist({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_watchlist_client_stub.call_count + end + end + end + + def test_list_watchlists + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_watchlists_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_list_watchlists_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_watchlists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_watchlists parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_watchlists_client_stub.call_count + end + end + end + + def test_create_watchlist + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + watchlist_id = "hello world" + watchlist = {} + + create_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_create_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_watchlist_client_stub.call_count + end + end + end + + def test_update_watchlist + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + watchlist = {} + update_mask = {} + + update_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_update_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_watchlist watchlist: watchlist, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_watchlist_client_stub.call_count + end + end + end + + def test_delete_watchlist + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_delete_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_watchlist({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_watchlist name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_watchlist({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb new file mode 100644 index 000000000000..33700fc8c675 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb @@ -0,0 +1,413 @@ +# 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/chronicle/v1/entity_pb" +require "google/cloud/chronicle/v1/entity_service" + +class ::Google::Cloud::Chronicle::V1::EntityService::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_get_watchlist + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_watchlist({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_watchlist name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_watchlist({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.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_watchlist_client_stub.call_rpc_count + end + end + + def test_list_watchlists + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_watchlists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_watchlists, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_watchlists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_watchlists parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_watchlists_client_stub.call_rpc_count + end + end + + def test_create_watchlist + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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" + watchlist_id = "hello world" + watchlist = {} + + create_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["watchlist_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_watchlist_client_stub.call_rpc_count + end + end + + def test_update_watchlist + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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. + watchlist = {} + update_mask = {} + + update_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_watchlist watchlist: watchlist, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_watchlist({ watchlist: watchlist, 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 + client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, 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_watchlist_client_stub.call_rpc_count + end + end + + def test_delete_watchlist + # 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" + force = true + + delete_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_watchlist({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_watchlist name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_watchlist({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::EntityService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb new file mode 100644 index 000000000000..90c49bafd600 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb @@ -0,0 +1,103 @@ +# 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/chronicle/v1/featured_content_native_dashboard_service" + +class ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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_content_hub_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.content_hub_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2/contentHub", path + end + end + + def test_dashboard_chart_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path + end + end + + def test_dashboard_query_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_query_path project: "value0", location: "value1", instance: "value2", query: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardQueries/value3", path + end + end + + def test_featured_content_native_dashboard_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.featured_content_native_dashboard_path project: "value0", location: "value1", instance: "value2", featured_content_native_dashboard: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/contentHub/featuredContentNativeDashboards/value3", path + end + end + + def test_native_dashboard_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.native_dashboard_path project: "value0", location: "value1", instance: "value2", dashboard: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/nativeDashboards/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb new file mode 100644 index 000000000000..823c3c2b5967 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb @@ -0,0 +1,265 @@ +# 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/chronicle/v1/featured_content_native_dashboard_pb" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" + + +class ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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_get_featured_content_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.stub :transcode_get_featured_content_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_featured_content_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_featured_content_native_dashboard({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_featured_content_native_dashboard name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_featured_content_native_dashboard({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_featured_content_native_dashboard_client_stub.call_count + end + end + end + + def test_list_featured_content_native_dashboards + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_featured_content_native_dashboards_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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.stub :transcode_list_featured_content_native_dashboards_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_featured_content_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_featured_content_native_dashboards parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_featured_content_native_dashboards ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_featured_content_native_dashboards(::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_featured_content_native_dashboards_client_stub.call_count + end + end + end + + def test_install_featured_content_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + featured_content_native_dashboard = {} + + install_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.stub :transcode_install_featured_content_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, install_featured_content_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.install_featured_content_native_dashboard name: name, featured_content_native_dashboard: featured_content_native_dashboard do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.install_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.install_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, install_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb new file mode 100644 index 000000000000..7c72e8df2cc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb @@ -0,0 +1,291 @@ +# 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/chronicle/v1/featured_content_native_dashboard_pb" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" + +class ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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_get_featured_content_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard.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_featured_content_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_featured_content_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_featured_content_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_featured_content_native_dashboard({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_featured_content_native_dashboard name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_featured_content_native_dashboard({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.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_featured_content_native_dashboard_client_stub.call_rpc_count + end + end + + def test_list_featured_content_native_dashboards + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_featured_content_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_featured_content_native_dashboards, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_featured_content_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_featured_content_native_dashboards parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_featured_content_native_dashboards ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_featured_content_native_dashboards(::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_featured_content_native_dashboards_client_stub.call_rpc_count + end + end + + def test_install_featured_content_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse.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" + featured_content_native_dashboard = {} + + install_featured_content_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :install_featured_content_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard), request["featured_content_native_dashboard"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, install_featured_content_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.install_featured_content_native_dashboard name: name, featured_content_native_dashboard: featured_content_native_dashboard do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.install_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.install_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, install_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::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::Chronicle::V1::FeaturedContentNativeDashboardService::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::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb new file mode 100644 index 000000000000..07fe0e7efd30 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/instance_service" + +class ::Google::Cloud::Chronicle::V1::InstanceService::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_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb new file mode 100644 index 000000000000..68e2d76e63cf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb @@ -0,0 +1,153 @@ +# 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/chronicle/v1/instance_pb" +require "google/cloud/chronicle/v1/instance_service/rest" + + +class ::Google::Cloud::Chronicle::V1::InstanceService::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_get_instance + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_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::Chronicle::V1::InstanceService::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb new file mode 100644 index 000000000000..267cd03ea876 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb @@ -0,0 +1,162 @@ +# 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/chronicle/v1/instance_pb" +require "google/cloud/chronicle/v1/instance_service" + +class ::Google::Cloud::Chronicle::V1::InstanceService::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_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Instance.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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_instance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_instance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_instance({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.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_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::InstanceService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb new file mode 100644 index 000000000000..acee3f640c8b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb @@ -0,0 +1,91 @@ +# 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/chronicle/v1/native_dashboard_service" + +class ::Google::Cloud::Chronicle::V1::NativeDashboardService::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_dashboard_chart_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path + end + end + + def test_dashboard_query_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_query_path project: "value0", location: "value1", instance: "value2", query: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardQueries/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_native_dashboard_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.native_dashboard_path project: "value0", location: "value1", instance: "value2", dashboard: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/nativeDashboards/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb new file mode 100644 index 000000000000..bd590a79cb52 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb @@ -0,0 +1,765 @@ +# 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/chronicle/v1/native_dashboard_pb" +require "google/cloud/chronicle/v1/native_dashboard_service/rest" + + +class ::Google::Cloud::Chronicle::V1::NativeDashboardService::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_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + native_dashboard = {} + + create_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_create_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_native_dashboard parent: parent, native_dashboard: native_dashboard do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_native_dashboard ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_native_dashboard(::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_native_dashboard_client_stub.call_count + end + end + end + + def test_get_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED + + get_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_get_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_native_dashboard({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_native_dashboard name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_native_dashboard ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_native_dashboard({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_native_dashboard(::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_native_dashboard_client_stub.call_count + end + end + end + + def test_list_native_dashboards + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED + + list_native_dashboards_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_list_native_dashboards_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_native_dashboards parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_native_dashboards ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_native_dashboards(::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_native_dashboards_client_stub.call_count + end + end + end + + def test_update_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + native_dashboard = {} + update_mask = {} + + update_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_update_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_native_dashboard({ native_dashboard: native_dashboard, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_native_dashboard native_dashboard: native_dashboard, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_native_dashboard ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_native_dashboard({ native_dashboard: native_dashboard, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_native_dashboard(::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_native_dashboard_client_stub.call_count + end + end + end + + def test_duplicate_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + native_dashboard = {} + + duplicate_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_duplicate_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, duplicate_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.duplicate_native_dashboard name: name, native_dashboard: native_dashboard do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.duplicate_native_dashboard ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.duplicate_native_dashboard(::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, duplicate_native_dashboard_client_stub.call_count + end + end + end + + def test_delete_native_dashboard + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_delete_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_native_dashboard({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_native_dashboard name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_native_dashboard ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_native_dashboard({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_native_dashboard(::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_native_dashboard_client_stub.call_count + end + end + end + + def test_add_chart + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::AddChartResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + dashboard_query = {} + dashboard_chart = {} + chart_layout = {} + + add_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_add_chart_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, add_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.add_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.add_chart ::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.add_chart(::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, add_chart_client_stub.call_count + end + end + end + + def test_remove_chart + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + dashboard_chart = "hello world" + + remove_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_remove_chart_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, remove_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.remove_chart({ name: name, dashboard_chart: dashboard_chart }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.remove_chart name: name, dashboard_chart: dashboard_chart do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.remove_chart ::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.remove_chart({ name: name, dashboard_chart: dashboard_chart }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.remove_chart(::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, remove_chart_client_stub.call_count + end + end + end + + def test_edit_chart + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::EditChartResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + dashboard_query = {} + dashboard_chart = {} + edit_mask = {} + language_features = [:LANGUAGE_FEATURE_UNSPECIFIED] + + edit_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_edit_chart_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, edit_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.edit_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.edit_chart ::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.edit_chart(::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, edit_chart_client_stub.call_count + end + end + end + + def test_duplicate_chart + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DuplicateChartResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + dashboard_chart = "hello world" + + duplicate_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_duplicate_chart_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, duplicate_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.duplicate_chart name: name, dashboard_chart: dashboard_chart do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.duplicate_chart ::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.duplicate_chart(::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, duplicate_chart_client_stub.call_count + end + end + end + + def test_export_native_dashboards + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + + export_native_dashboards_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_export_native_dashboards_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_native_dashboards({ parent: parent, names: names }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_native_dashboards parent: parent, names: names do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_native_dashboards ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_native_dashboards({ parent: parent, names: names }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_native_dashboards(::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_native_dashboards_client_stub.call_count + end + end + end + + def test_import_native_dashboards + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source = {} + + import_native_dashboards_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_import_native_dashboards_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_native_dashboards({ parent: parent, source: source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_native_dashboards parent: parent, source: source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_native_dashboards ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_native_dashboards({ parent: parent, source: source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_native_dashboards(::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_native_dashboards_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::Chronicle::V1::NativeDashboardService::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::Chronicle::V1::NativeDashboardService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb new file mode 100644 index 000000000000..bd48a08485da --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb @@ -0,0 +1,841 @@ +# 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/chronicle/v1/native_dashboard_pb" +require "google/cloud/chronicle/v1/native_dashboard_service" + +class ::Google::Cloud::Chronicle::V1::NativeDashboardService::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_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" + native_dashboard = {} + + create_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::NativeDashboard), request["native_dashboard"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_native_dashboard parent: parent, native_dashboard: native_dashboard do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_native_dashboard ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_native_dashboard(::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_native_dashboard_client_stub.call_rpc_count + end + end + + def test_get_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" + view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED + + get_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, request + assert_equal "hello world", request["name"] + assert_equal :NATIVE_DASHBOARD_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_native_dashboard({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_native_dashboard name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_native_dashboard ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_native_dashboard({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_native_dashboard(::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_native_dashboard_client_stub.call_rpc_count + end + end + + def test_list_native_dashboards + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse.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" + page_size = 42 + page_token = "hello world" + view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED + + list_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_native_dashboards, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :NATIVE_DASHBOARD_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_native_dashboards parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_native_dashboards ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) 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 + client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }, 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 + client.list_native_dashboards(::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), 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_native_dashboards_client_stub.call_rpc_count + end + end + + def test_update_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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. + native_dashboard = {} + update_mask = {} + + update_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::NativeDashboard), request["native_dashboard"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_native_dashboard({ native_dashboard: native_dashboard, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_native_dashboard native_dashboard: native_dashboard, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_native_dashboard ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_native_dashboard({ native_dashboard: native_dashboard, 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 + client.update_native_dashboard(::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, 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_native_dashboard_client_stub.call_rpc_count + end + end + + def test_duplicate_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" + native_dashboard = {} + + duplicate_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :duplicate_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::NativeDashboard), request["native_dashboard"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, duplicate_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.duplicate_native_dashboard name: name, native_dashboard: native_dashboard do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.duplicate_native_dashboard ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.duplicate_native_dashboard(::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, duplicate_native_dashboard_client_stub.call_rpc_count + end + end + + def test_delete_native_dashboard + # 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_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_native_dashboard({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_native_dashboard name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_native_dashboard ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_native_dashboard({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_native_dashboard(::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.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_native_dashboard_client_stub.call_rpc_count + end + end + + def test_add_chart + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::AddChartResponse.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" + dashboard_query = {} + dashboard_chart = {} + chart_layout = {} + + add_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :add_chart, name + assert_kind_of ::Google::Cloud::Chronicle::V1::AddChartRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardQuery), request["dashboard_query"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardChart), request["dashboard_chart"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout), request["chart_layout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, add_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.add_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.add_chart ::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.add_chart(::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, add_chart_client_stub.call_rpc_count + end + end + + def test_remove_chart + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" + dashboard_chart = "hello world" + + remove_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :remove_chart, name + assert_kind_of ::Google::Cloud::Chronicle::V1::RemoveChartRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["dashboard_chart"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, remove_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.remove_chart({ name: name, dashboard_chart: dashboard_chart }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.remove_chart name: name, dashboard_chart: dashboard_chart do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.remove_chart ::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.remove_chart({ name: name, dashboard_chart: dashboard_chart }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.remove_chart(::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, remove_chart_client_stub.call_rpc_count + end + end + + def test_edit_chart + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::EditChartResponse.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" + dashboard_query = {} + dashboard_chart = {} + edit_mask = {} + language_features = [:LANGUAGE_FEATURE_UNSPECIFIED] + + edit_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :edit_chart, name + assert_kind_of ::Google::Cloud::Chronicle::V1::EditChartRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardQuery), request["dashboard_query"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardChart), request["dashboard_chart"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["edit_mask"] + assert_equal [:LANGUAGE_FEATURE_UNSPECIFIED], request["language_features"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, edit_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.edit_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.edit_chart ::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.edit_chart(::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, edit_chart_client_stub.call_rpc_count + end + end + + def test_duplicate_chart + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DuplicateChartResponse.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" + dashboard_chart = "hello world" + + duplicate_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :duplicate_chart, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DuplicateChartRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["dashboard_chart"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, duplicate_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.duplicate_chart name: name, dashboard_chart: dashboard_chart do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.duplicate_chart ::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.duplicate_chart(::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, duplicate_chart_client_stub.call_rpc_count + end + end + + def test_export_native_dashboards + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse.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" + names = ["hello world"] + + export_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_native_dashboards, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_native_dashboards({ parent: parent, names: names }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_native_dashboards parent: parent, names: names do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_native_dashboards ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_native_dashboards({ parent: parent, names: names }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_native_dashboards(::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_native_dashboards_client_stub.call_rpc_count + end + end + + def test_import_native_dashboards + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse.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" + source = {} + + import_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_native_dashboards, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource), request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_native_dashboards({ parent: parent, source: source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_native_dashboards parent: parent, source: source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_native_dashboards ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_native_dashboards({ parent: parent, source: source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_native_dashboards(::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_native_dashboards_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::Chronicle::V1::NativeDashboardService::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::Chronicle::V1::NativeDashboardService::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::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb new file mode 100644 index 000000000000..0a3e0e6f9025 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb @@ -0,0 +1,67 @@ +# 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/chronicle/v1/reference_list_service" + +class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_reference_list_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb new file mode 100644 index 000000000000..e077a4322795 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb @@ -0,0 +1,322 @@ +# 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/chronicle/v1/reference_list_pb" +require "google/cloud/chronicle/v1/reference_list_service/rest" + + +class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_get_reference_list + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + get_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_get_reference_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_reference_list({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_reference_list name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_reference_list({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_reference_list_client_stub.call_count + end + end + end + + def test_list_reference_lists + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + list_reference_lists_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_list_reference_lists_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reference_lists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_reference_lists_client_stub.call_count + end + end + end + + def test_create_reference_list + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reference_list = {} + reference_list_id = "hello world" + + create_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_create_reference_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_reference_list_client_stub.call_count + end + end + end + + def test_update_reference_list + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + reference_list = {} + update_mask = {} + + update_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_update_reference_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_reference_list reference_list: reference_list, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb new file mode 100644 index 000000000000..02598fddb1c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb @@ -0,0 +1,355 @@ +# 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/chronicle/v1/reference_list_pb" +require "google/cloud/chronicle/v1/reference_list_service" + +class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_get_reference_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + get_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_reference_list, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, request + assert_equal "hello world", request["name"] + assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_reference_list({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_reference_list name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_reference_list({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_reference_list_client_stub.call_rpc_count + end + end + + def test_list_reference_lists + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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" + page_size = 42 + page_token = "hello world" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + list_reference_lists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reference_lists, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_reference_lists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) 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 + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, 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 + client.list_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), 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_reference_lists_client_stub.call_rpc_count + end + end + + def test_create_reference_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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" + reference_list = {} + reference_list_id = "hello world" + + create_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_reference_list, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] + assert_equal "hello world", request["reference_list_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_reference_list_client_stub.call_rpc_count + end + end + + def test_update_reference_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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. + reference_list = {} + update_mask = {} + + update_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_reference_list, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_reference_list reference_list: reference_list, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_reference_list({ reference_list: reference_list, 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 + client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, 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_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::ReferenceListService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb new file mode 100644 index 000000000000..91602a5d5414 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb @@ -0,0 +1,400 @@ +# 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_services_pb" +require "google/cloud/chronicle/v1/rule_service" + +class ::Google::Cloud::Chronicle::V1::RuleService::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 + client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb new file mode 100644 index 000000000000..cc40252d4fea --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb @@ -0,0 +1,115 @@ +# 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/chronicle/v1/rule_service" + +class ::Google::Cloud::Chronicle::V1::RuleService::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_data_access_scope_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_reference_list_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path + end + end + + def test_retrohunt_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.retrohunt_path project: "value0", location: "value1", instance: "value2", rule: "value3", retrohunt: "value4" + assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/retrohunts/value4", path + end + end + + def test_rule_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rule_path project: "value0", location: "value1", instance: "value2", rule: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/rules/value3", path + end + end + + def test_rule_deployment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rule_deployment_path project: "value0", location: "value1", instance: "value2", rule: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/deployment", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb new file mode 100644 index 000000000000..22d16284fac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb @@ -0,0 +1,766 @@ +# 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_service/rest" + + +class ::Google::Cloud::Chronicle::V1::RuleService::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_rule + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rule = {} + + create_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_rule({ parent: parent, rule: rule }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_rule parent: parent, rule: rule do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_rule({ parent: parent, rule: rule }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_rule_client_stub.call_count + end + end + end + + def test_get_rule + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :RULE_VIEW_UNSPECIFIED + + get_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_rule({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_rule name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_rule({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_rule_client_stub.call_count + end + end + end + + def test_list_rules + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :RULE_VIEW_UNSPECIFIED + filter = "hello world" + + list_rules_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_rules parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rules_client_stub.call_count + end + end + end + + def test_update_rule + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rule = {} + update_mask = {} + + update_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_rule({ rule: rule, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_rule rule: rule, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_rule({ rule: rule, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_rule_client_stub.call_count + end + end + end + + def test_delete_rule + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_delete_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_rule({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_rule name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_rule({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_rule_client_stub.call_count + end + end + end + + def test_list_rule_revisions + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + view = :RULE_VIEW_UNSPECIFIED + + list_rule_revisions_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rule_revisions_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rule_revisions_client_stub.call_count + end + end + end + + def test_create_retrohunt + # 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" + retrohunt = {} + + create_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_retrohunt_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_retrohunt parent: parent, retrohunt: retrohunt do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_retrohunt_client_stub.call_count + end + end + end + + def test_get_retrohunt + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Retrohunt.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_retrohunt_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_retrohunt({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_retrohunt name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_retrohunt({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_retrohunt_client_stub.call_count + end + end + end + + def test_list_retrohunts + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_retrohunts_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_retrohunts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_retrohunts_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_retrohunts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_retrohunts_client_stub.call_count + end + end + end + + def test_get_rule_deployment + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_rule_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_rule_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_rule_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_rule_deployment_client_stub.call_count + end + end + end + + def test_list_rule_deployments + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_rule_deployments_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_deployments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rule_deployments_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_rule_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rule_deployments_client_stub.call_count + end + end + end + + def test_update_rule_deployment + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rule_deployment = {} + update_mask = {} + + update_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb new file mode 100644 index 000000000000..75d72ff1a561 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb @@ -0,0 +1,877 @@ +# 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_service" + +class ::Google::Cloud::Chronicle::V1::RuleService::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_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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" + rule = {} + + create_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_rule({ parent: parent, rule: rule }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_rule parent: parent, rule: rule do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_rule({ parent: parent, rule: rule }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_rule_client_stub.call_rpc_count + end + end + + def test_get_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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" + view = :RULE_VIEW_UNSPECIFIED + + get_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleRequest, request + assert_equal "hello world", request["name"] + assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_rule({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_rule name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_rule({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_rule_client_stub.call_rpc_count + end + end + + def test_list_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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" + page_size = 42 + page_token = "hello world" + view = :RULE_VIEW_UNSPECIFIED + filter = "hello world" + + list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rules, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rules_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_rules parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter) 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 + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }, 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 + client.list_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter), 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_rules_client_stub.call_rpc_count + end + end + + def test_update_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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. + rule = {} + update_mask = {} + + update_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_rule({ rule: rule, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_rule rule: rule, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_rule({ rule: rule, 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 + client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, 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_rule_client_stub.call_rpc_count + end + end + + def test_delete_rule + # 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" + force = true + + delete_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_rule({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_rule name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_rule({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_rule_client_stub.call_rpc_count + end + end + + def test_list_rule_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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" + page_size = 42 + page_token = "hello world" + view = :RULE_VIEW_UNSPECIFIED + + list_rule_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rule_revisions, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rule_revisions_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) 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 + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, 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 + client.list_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), 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_rule_revisions_client_stub.call_rpc_count + end + end + + def test_create_retrohunt + # 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" + retrohunt = {} + + create_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_retrohunt, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Retrohunt), request["retrohunt"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) 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 + client.create_retrohunt parent: parent, retrohunt: retrohunt 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 + client.create_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) 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 + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }, 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 + client.create_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), 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_retrohunt_client_stub.call_rpc_count + end + end + + def test_get_retrohunt + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_retrohunt, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_retrohunt({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_retrohunt name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_retrohunt({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.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_retrohunt_client_stub.call_rpc_count + end + end + + def test_list_retrohunts + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_retrohunts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_retrohunts, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_retrohunts_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_retrohunts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_retrohunts_client_stub.call_rpc_count + end + end + + def test_get_rule_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_rule_deployment, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_rule_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_rule_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_rule_deployment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.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_rule_deployment_client_stub.call_rpc_count + end + end + + def test_list_rule_deployments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_rule_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rule_deployments, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rule_deployments_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_rule_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_rule_deployments_client_stub.call_rpc_count + end + end + + def test_update_rule_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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. + rule_deployment = {} + update_mask = {} + + update_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_rule_deployment, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::RuleDeployment), request["rule_deployment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_rule_deployment({ rule_deployment: rule_deployment, 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 + client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, 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_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb @@ -0,0 +1,26 @@ +# 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 "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 0d02a897d9f47a9b76209ebfd8b2efc0c24dad7b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 30 Apr 2026 16:10:24 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 74 + google-cloud-chronicle-v1/AUTHENTICATION.md | 8 +- google-cloud-chronicle-v1/README.md | 8 +- google-cloud-chronicle-v1/Rakefile | 4 +- google-cloud-chronicle-v1/gapic_metadata.json | 131 + .../lib/google/cloud/chronicle/v1.rb | 8 +- .../cloud/chronicle/v1/dashboard_chart_pb.rb | 0 .../chronicle/v1/dashboard_chart_service.rb | 0 .../v1/dashboard_chart_service/client.rb | 0 .../v1/dashboard_chart_service/credentials.rb | 0 .../v1/dashboard_chart_service/paths.rb | 0 .../v1/dashboard_chart_service/rest.rb | 0 .../v1/dashboard_chart_service/rest/client.rb | 0 .../rest/service_stub.rb | 0 .../v1/dashboard_chart_services_pb.rb | 0 .../cloud/chronicle/v1/dashboard_query_pb.rb | 0 .../chronicle/v1/dashboard_query_service.rb | 0 .../v1/dashboard_query_service/client.rb | 0 .../v1/dashboard_query_service/credentials.rb | 0 .../v1/dashboard_query_service/paths.rb | 0 .../v1/dashboard_query_service/rest.rb | 0 .../v1/dashboard_query_service/rest/client.rb | 0 .../rest/service_stub.rb | 0 .../v1/dashboard_query_services_pb.rb | 0 .../v1/featured_content_metadata_pb.rb | 0 .../featured_content_native_dashboard_pb.rb | 0 ...atured_content_native_dashboard_service.rb | 0 .../client.rb | 0 .../credentials.rb | 0 .../paths.rb | 0 .../rest.rb | 0 .../rest/client.rb | 0 .../rest/service_stub.rb | 0 ...ed_content_native_dashboard_services_pb.rb | 0 .../cloud/chronicle/v1/native_dashboard_pb.rb | 0 .../chronicle/v1/native_dashboard_service.rb | 0 .../v1/native_dashboard_service/client.rb | 0 .../native_dashboard_service/credentials.rb | 0 .../v1/native_dashboard_service/paths.rb | 0 .../v1/native_dashboard_service/rest.rb | 0 .../native_dashboard_service/rest/client.rb | 0 .../rest/service_stub.rb | 0 .../v1/native_dashboard_services_pb.rb | 0 .../lib/google/cloud/chronicle/v1/rest.rb | 6 +- .../cloud/chronicle/v1/dashboard_chart.rb | 0 .../cloud/chronicle/v1/dashboard_query.rb | 0 .../chronicle/v1/featured_content_metadata.rb | 0 .../v1/featured_content_native_dashboard.rb | 0 .../cloud/chronicle/v1/native_dashboard.rb | 0 .../proto_docs/google/type/date.rb | 0 .../batch_get_dashboard_charts.rb | 0 .../get_dashboard_chart.rb | 0 .../execute_dashboard_query.rb | 0 .../get_dashboard_query.rb | 0 .../get_featured_content_native_dashboard.rb | 0 ...stall_featured_content_native_dashboard.rb | 0 ...list_featured_content_native_dashboards.rb | 0 .../native_dashboard_service/add_chart.rb | 0 .../create_native_dashboard.rb | 0 .../delete_native_dashboard.rb | 0 .../duplicate_chart.rb | 0 .../duplicate_native_dashboard.rb | 0 .../native_dashboard_service/edit_chart.rb | 0 .../export_native_dashboards.rb | 0 .../get_native_dashboard.rb | 0 .../import_native_dashboards.rb | 0 .../list_native_dashboards.rb | 0 .../native_dashboard_service/remove_chart.rb | 0 .../update_native_dashboard.rb | 0 ...et_metadata_google.cloud.chronicle.v1.json | 760 +++++ .../v1/dashboard_chart_service_paths_test.rb | 0 .../v1/dashboard_chart_service_rest_test.rb | 0 .../v1/dashboard_chart_service_test.rb | 0 .../v1/dashboard_query_service_paths_test.rb | 0 .../v1/dashboard_query_service_rest_test.rb | 0 .../v1/dashboard_query_service_test.rb | 0 ...ent_native_dashboard_service_paths_test.rb | 0 ...tent_native_dashboard_service_rest_test.rb | 0 ...d_content_native_dashboard_service_test.rb | 0 .../v1/native_dashboard_service_paths_test.rb | 0 .../v1/native_dashboard_service_rest_test.rb | 0 .../v1/native_dashboard_service_test.rb | 0 .../google-cloud-chronicle-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-chronicle-v1/.rubocop.yml | 33 - .../google-cloud-chronicle-v1/.toys.rb | 28 - .../google-cloud-chronicle-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-chronicle-v1/CHANGELOG.md | 2 - .../google-cloud-chronicle-v1/Gemfile | 14 - .../google-cloud-chronicle-v1/LICENSE.md | 201 -- .../google-cloud-chronicle-v1/README.md | 154 - .../google-cloud-chronicle-v1/Rakefile | 169 -- .../gapic_metadata.json | 429 --- .../google-cloud-chronicle-v1.gemspec | 28 - .../lib/google-cloud-chronicle-v1.rb | 21 - .../lib/google/cloud/chronicle/v1.rb | 54 - .../chronicle/v1/data_access_control_pb.rb | 44 - .../v1/data_access_control_service.rb | 56 - .../v1/data_access_control_service/client.rb | 1431 --------- .../credentials.rb | 47 - .../v1/data_access_control_service/paths.rb | 94 - .../v1/data_access_control_service/rest.rb | 53 - .../rest/client.rb | 1318 -------- .../rest/service_stub.rb | 695 ----- .../v1/data_access_control_services_pb.rb | 76 - .../cloud/chronicle/v1/data_table_pb.rb | 57 - .../cloud/chronicle/v1/data_table_service.rb | 55 - .../chronicle/v1/data_table_service/client.rb | 1915 ------------ .../v1/data_table_service/credentials.rb | 49 - .../chronicle/v1/data_table_service/paths.rb | 138 - .../chronicle/v1/data_table_service/rest.rb | 52 - .../v1/data_table_service/rest/client.rb | 1767 ----------- .../data_table_service/rest/service_stub.rb | 1004 ------- .../chronicle/v1/data_table_services_pb.rb | 73 - .../google/cloud/chronicle/v1/entity_pb.rb | 39 - .../cloud/chronicle/v1/entity_service.rb | 55 - .../chronicle/v1/entity_service/client.rb | 908 ------ .../v1/entity_service/credentials.rb | 47 - .../chronicle/v1/entity_service/paths.rb | 73 - .../cloud/chronicle/v1/entity_service/rest.rb | 52 - .../v1/entity_service/rest/client.rb | 830 ------ .../v1/entity_service/rest/service_stub.rb | 388 --- .../cloud/chronicle/v1/entity_services_pb.rb | 54 - .../google/cloud/chronicle/v1/instance_pb.rb | 27 - .../cloud/chronicle/v1/instance_service.rb | 55 - .../chronicle/v1/instance_service/client.rb | 481 --- .../v1/instance_service/credentials.rb | 47 - .../chronicle/v1/instance_service/paths.rb | 52 - .../chronicle/v1/instance_service/rest.rb | 52 - .../v1/instance_service/rest/client.rb | 431 --- .../v1/instance_service/rest/service_stub.rb | 142 - .../chronicle/v1/instance_services_pb.rb | 45 - .../cloud/chronicle/v1/reference_list_pb.rb | 38 - .../chronicle/v1/reference_list_service.rb | 55 - .../v1/reference_list_service/client.rb | 809 ----- .../v1/reference_list_service/credentials.rb | 47 - .../v1/reference_list_service/paths.rb | 73 - .../v1/reference_list_service/rest.rb | 52 - .../v1/reference_list_service/rest/client.rb | 738 ----- .../rest/service_stub.rb | 327 -- .../v1/reference_list_services_pb.rb | 51 - .../lib/google/cloud/chronicle/v1/rest.rb | 46 - .../lib/google/cloud/chronicle/v1/rule_pb.rb | 61 - .../google/cloud/chronicle/v1/rule_service.rb | 56 - .../cloud/chronicle/v1/rule_service/client.rb | 1691 ----------- .../chronicle/v1/rule_service/credentials.rb | 47 - .../chronicle/v1/rule_service/operations.rb | 841 ------ .../cloud/chronicle/v1/rule_service/paths.rb | 159 - .../cloud/chronicle/v1/rule_service/rest.rb | 53 - .../chronicle/v1/rule_service/rest/client.rb | 1564 ---------- .../v1/rule_service/rest/operations.rb | 925 ------ .../v1/rule_service/rest/service_stub.rb | 817 ----- .../cloud/chronicle/v1/rule_services_pb.rb | 70 - .../lib/google/cloud/chronicle/v1/version.rb | 28 - .../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 -- .../cloud/chronicle/v1/data_access_control.rb | 364 --- .../google/cloud/chronicle/v1/data_table.rb | 512 ---- .../google/cloud/chronicle/v1/entity.rb | 210 -- .../google/cloud/chronicle/v1/instance.rb | 47 - .../cloud/chronicle/v1/reference_list.rb | 232 -- .../google/cloud/chronicle/v1/rule.rb | 701 ----- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../create_data_access_label.rb | 47 - .../create_data_access_scope.rb | 47 - .../delete_data_access_label.rb | 47 - .../delete_data_access_scope.rb | 47 - .../get_data_access_label.rb | 47 - .../get_data_access_scope.rb | 47 - .../list_data_access_labels.rb | 51 - .../list_data_access_scopes.rb | 51 - .../update_data_access_label.rb | 47 - .../update_data_access_scope.rb | 47 - .../bulk_create_data_table_rows.rb | 47 - .../bulk_get_data_table_rows.rb | 47 - .../bulk_replace_data_table_rows.rb | 47 - .../bulk_update_data_table_rows.rb | 47 - .../data_table_service/create_data_table.rb | 47 - .../create_data_table_row.rb | 47 - .../data_table_service/delete_data_table.rb | 47 - .../delete_data_table_row.rb | 47 - .../data_table_service/get_data_table.rb | 47 - .../get_data_table_operation_errors.rb | 47 - .../data_table_service/get_data_table_row.rb | 47 - .../list_data_table_rows.rb | 51 - .../data_table_service/list_data_tables.rb | 51 - .../data_table_service/update_data_table.rb | 47 - .../update_data_table_row.rb | 47 - .../entity_service/create_watchlist.rb | 47 - .../entity_service/delete_watchlist.rb | 47 - .../snippets/entity_service/get_watchlist.rb | 47 - .../entity_service/list_watchlists.rb | 51 - .../entity_service/update_watchlist.rb | 47 - .../snippets/instance_service/get_instance.rb | 47 - .../create_reference_list.rb | 47 - .../get_reference_list.rb | 47 - .../list_reference_lists.rb | 51 - .../update_reference_list.rb | 47 - .../snippets/rule_service/create_retrohunt.rb | 54 - .../snippets/rule_service/create_rule.rb | 47 - .../snippets/rule_service/delete_rule.rb | 47 - .../snippets/rule_service/get_retrohunt.rb | 47 - .../snippets/rule_service/get_rule.rb | 47 - .../rule_service/get_rule_deployment.rb | 47 - .../snippets/rule_service/list_retrohunts.rb | 51 - .../rule_service/list_rule_deployments.rb | 51 - .../rule_service/list_rule_revisions.rb | 51 - .../snippets/rule_service/list_rules.rb | 51 - .../snippets/rule_service/update_rule.rb | 47 - .../rule_service/update_rule_deployment.rb | 47 - ...et_metadata_google.cloud.chronicle.v1.json | 2655 ----------------- .../data_access_control_service_paths_test.rb | 79 - .../data_access_control_service_rest_test.rb | 651 ---- .../v1/data_access_control_service_test.rb | 718 ----- .../v1/data_table_service_paths_test.rb | 103 - .../v1/data_table_service_rest_test.rb | 926 ------ .../chronicle/v1/data_table_service_test.rb | 1018 ------- .../chronicle/v1/entity_service_paths_test.rb | 67 - .../chronicle/v1/entity_service_rest_test.rb | 376 --- .../cloud/chronicle/v1/entity_service_test.rb | 413 --- .../v1/instance_service_paths_test.rb | 55 - .../v1/instance_service_rest_test.rb | 153 - .../chronicle/v1/instance_service_test.rb | 162 - .../v1/reference_list_service_paths_test.rb | 67 - .../v1/reference_list_service_rest_test.rb | 322 -- .../v1/reference_list_service_test.rb | 355 --- .../v1/rule_service_operations_test.rb | 400 --- .../chronicle/v1/rule_service_paths_test.rb | 115 - .../chronicle/v1/rule_service_rest_test.rb | 766 ----- .../cloud/chronicle/v1/rule_service_test.rb | 877 ------ .../google-cloud-chronicle-v1/test/helper.rb | 26 - 243 files changed, 986 insertions(+), 39124 deletions(-) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_query_service.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/native_dashboard_service.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/proto_docs/google/type/date.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/dashboard_chart_service/get_dashboard_chart.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/dashboard_query_service/execute_dashboard_query.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/dashboard_query_service/get_dashboard_query.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/add_chart.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/create_native_dashboard.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/delete_native_dashboard.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/duplicate_chart.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/duplicate_native_dashboard.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/edit_chart.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/export_native_dashboards.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/get_native_dashboard.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/import_native_dashboards.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/list_native_dashboards.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/remove_chart.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/native_dashboard_service/update_native_dashboard.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb diff --git a/google-cloud-chronicle-v1/.owlbot-manifest.json b/google-cloud-chronicle-v1/.owlbot-manifest.json index 7e4341f2706c..f2550fbd7730 100644 --- a/google-cloud-chronicle-v1/.owlbot-manifest.json +++ b/google-cloud-chronicle-v1/.owlbot-manifest.json @@ -15,6 +15,24 @@ "google-cloud-chronicle-v1.gemspec", "lib/google-cloud-chronicle-v1.rb", "lib/google/cloud/chronicle/v1.rb", + "lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb", + "lib/google/cloud/chronicle/v1/dashboard_chart_service.rb", + "lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb", + "lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb", + "lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb", + "lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb", + "lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb", + "lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb", + "lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb", + "lib/google/cloud/chronicle/v1/dashboard_query_pb.rb", + "lib/google/cloud/chronicle/v1/dashboard_query_service.rb", + "lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb", + "lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb", + "lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb", + "lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb", + "lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb", + "lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb", + "lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb", "lib/google/cloud/chronicle/v1/data_access_control_pb.rb", "lib/google/cloud/chronicle/v1/data_access_control_service.rb", "lib/google/cloud/chronicle/v1/data_access_control_service/client.rb", @@ -42,6 +60,16 @@ "lib/google/cloud/chronicle/v1/entity_service/rest/client.rb", "lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb", "lib/google/cloud/chronicle/v1/entity_services_pb.rb", + "lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb", + "lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb", + "lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb", + "lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb", + "lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb", + "lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb", + "lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb", + "lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb", + "lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb", + "lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb", "lib/google/cloud/chronicle/v1/instance_pb.rb", "lib/google/cloud/chronicle/v1/instance_service.rb", "lib/google/cloud/chronicle/v1/instance_service/client.rb", @@ -51,6 +79,15 @@ "lib/google/cloud/chronicle/v1/instance_service/rest/client.rb", "lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb", "lib/google/cloud/chronicle/v1/instance_services_pb.rb", + "lib/google/cloud/chronicle/v1/native_dashboard_pb.rb", + "lib/google/cloud/chronicle/v1/native_dashboard_service.rb", + "lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb", + "lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb", + "lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb", + "lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb", + "lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb", + "lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb", + "lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb", "lib/google/cloud/chronicle/v1/reference_list_pb.rb", "lib/google/cloud/chronicle/v1/reference_list_service.rb", "lib/google/cloud/chronicle/v1/reference_list_service/client.rb", @@ -78,10 +115,15 @@ "proto_docs/google/api/field_behavior.rb", "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", + "proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb", + "proto_docs/google/cloud/chronicle/v1/dashboard_query.rb", "proto_docs/google/cloud/chronicle/v1/data_access_control.rb", "proto_docs/google/cloud/chronicle/v1/data_table.rb", "proto_docs/google/cloud/chronicle/v1/entity.rb", + "proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb", + "proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb", "proto_docs/google/cloud/chronicle/v1/instance.rb", + "proto_docs/google/cloud/chronicle/v1/native_dashboard.rb", "proto_docs/google/cloud/chronicle/v1/reference_list.rb", "proto_docs/google/cloud/chronicle/v1/rule.rb", "proto_docs/google/longrunning/operations.rb", @@ -91,8 +133,13 @@ "proto_docs/google/protobuf/field_mask.rb", "proto_docs/google/protobuf/timestamp.rb", "proto_docs/google/rpc/status.rb", + "proto_docs/google/type/date.rb", "proto_docs/google/type/interval.rb", "snippets/Gemfile", + "snippets/dashboard_chart_service/batch_get_dashboard_charts.rb", + "snippets/dashboard_chart_service/get_dashboard_chart.rb", + "snippets/dashboard_query_service/execute_dashboard_query.rb", + "snippets/dashboard_query_service/get_dashboard_query.rb", "snippets/data_access_control_service/create_data_access_label.rb", "snippets/data_access_control_service/create_data_access_scope.rb", "snippets/data_access_control_service/delete_data_access_label.rb", @@ -123,7 +170,22 @@ "snippets/entity_service/get_watchlist.rb", "snippets/entity_service/list_watchlists.rb", "snippets/entity_service/update_watchlist.rb", + "snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb", + "snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb", + "snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb", "snippets/instance_service/get_instance.rb", + "snippets/native_dashboard_service/add_chart.rb", + "snippets/native_dashboard_service/create_native_dashboard.rb", + "snippets/native_dashboard_service/delete_native_dashboard.rb", + "snippets/native_dashboard_service/duplicate_chart.rb", + "snippets/native_dashboard_service/duplicate_native_dashboard.rb", + "snippets/native_dashboard_service/edit_chart.rb", + "snippets/native_dashboard_service/export_native_dashboards.rb", + "snippets/native_dashboard_service/get_native_dashboard.rb", + "snippets/native_dashboard_service/import_native_dashboards.rb", + "snippets/native_dashboard_service/list_native_dashboards.rb", + "snippets/native_dashboard_service/remove_chart.rb", + "snippets/native_dashboard_service/update_native_dashboard.rb", "snippets/reference_list_service/create_reference_list.rb", "snippets/reference_list_service/get_reference_list.rb", "snippets/reference_list_service/list_reference_lists.rb", @@ -141,6 +203,12 @@ "snippets/rule_service/update_rule.rb", "snippets/rule_service/update_rule_deployment.rb", "snippets/snippet_metadata_google.cloud.chronicle.v1.json", + "test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb", + "test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb", + "test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb", + "test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb", + "test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb", + "test/google/cloud/chronicle/v1/dashboard_query_service_test.rb", "test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb", "test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb", "test/google/cloud/chronicle/v1/data_access_control_service_test.rb", @@ -150,9 +218,15 @@ "test/google/cloud/chronicle/v1/entity_service_paths_test.rb", "test/google/cloud/chronicle/v1/entity_service_rest_test.rb", "test/google/cloud/chronicle/v1/entity_service_test.rb", + "test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb", + "test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb", + "test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb", "test/google/cloud/chronicle/v1/instance_service_paths_test.rb", "test/google/cloud/chronicle/v1/instance_service_rest_test.rb", "test/google/cloud/chronicle/v1/instance_service_test.rb", + "test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb", + "test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb", + "test/google/cloud/chronicle/v1/native_dashboard_service_test.rb", "test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb", "test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb", "test/google/cloud/chronicle/v1/reference_list_service_test.rb", diff --git a/google-cloud-chronicle-v1/AUTHENTICATION.md b/google-cloud-chronicle-v1/AUTHENTICATION.md index 2b6138fc6b12..1b97f84a9c98 100644 --- a/google-cloud-chronicle-v1/AUTHENTICATION.md +++ b/google-cloud-chronicle-v1/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/cloud/chronicle/v1" -client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| +client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -66,11 +66,11 @@ To configure a credentials file globally for all clients: ```ruby require "google/cloud/chronicle/v1" -::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.configure do |config| +::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new +client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/cloud/chronicle/v1" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new +client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new ``` ### Local ADC file diff --git a/google-cloud-chronicle-v1/README.md b/google-cloud-chronicle-v1/README.md index f525377210ba..d541636e6e52 100644 --- a/google-cloud-chronicle-v1/README.md +++ b/google-cloud-chronicle-v1/README.md @@ -32,9 +32,9 @@ In order to use this library, you first need to go through the following steps: ```ruby require "google/cloud/chronicle/v1" -client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new -request = ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new # (request fields as keyword arguments...) -response = client.create_data_access_label request +client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new +request = ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new # (request fields as keyword arguments...) +response = client.get_dashboard_query request ``` View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest) @@ -75,7 +75,7 @@ constructing a client object. For example: require "google/cloud/chronicle/v1" require "logger" -client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| +client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| config.logger = Logger.new "my-app.log" end ``` diff --git a/google-cloud-chronicle-v1/Rakefile b/google-cloud-chronicle-v1/Rakefile index 32147f14bfcf..e127630c24bc 100644 --- a/google-cloud-chronicle-v1/Rakefile +++ b/google-cloud-chronicle-v1/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| if project.nil? || keyfile.nil? fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" end - require "google/cloud/chronicle/v1/data_access_control_service/credentials" - ::Google::Cloud::Chronicle::V1::DataAccessControlService::Credentials.env_vars.each do |path| + require "google/cloud/chronicle/v1/dashboard_query_service/credentials" + ::Google::Cloud::Chronicle::V1::DashboardQueryService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-cloud-chronicle-v1/gapic_metadata.json b/google-cloud-chronicle-v1/gapic_metadata.json index be88621b6d88..16360a702a6d 100644 --- a/google-cloud-chronicle-v1/gapic_metadata.json +++ b/google-cloud-chronicle-v1/gapic_metadata.json @@ -5,6 +5,44 @@ "protoPackage": "google.cloud.chronicle.v1", "libraryPackage": "::Google::Cloud::Chronicle::V1", "services": { + "DashboardQueryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client", + "rpcs": { + "GetDashboardQuery": { + "methods": [ + "get_dashboard_query" + ] + }, + "ExecuteDashboardQuery": { + "methods": [ + "execute_dashboard_query" + ] + } + } + } + } + }, + "DashboardChartService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client", + "rpcs": { + "GetDashboardChart": { + "methods": [ + "get_dashboard_chart" + ] + }, + "BatchGetDashboardCharts": { + "methods": [ + "batch_get_dashboard_charts" + ] + } + } + } + } + }, "DataAccessControlService": { "clients": { "grpc": { @@ -182,6 +220,99 @@ } } }, + "NativeDashboardService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client", + "rpcs": { + "CreateNativeDashboard": { + "methods": [ + "create_native_dashboard" + ] + }, + "GetNativeDashboard": { + "methods": [ + "get_native_dashboard" + ] + }, + "ListNativeDashboards": { + "methods": [ + "list_native_dashboards" + ] + }, + "UpdateNativeDashboard": { + "methods": [ + "update_native_dashboard" + ] + }, + "DuplicateNativeDashboard": { + "methods": [ + "duplicate_native_dashboard" + ] + }, + "DeleteNativeDashboard": { + "methods": [ + "delete_native_dashboard" + ] + }, + "AddChart": { + "methods": [ + "add_chart" + ] + }, + "RemoveChart": { + "methods": [ + "remove_chart" + ] + }, + "EditChart": { + "methods": [ + "edit_chart" + ] + }, + "DuplicateChart": { + "methods": [ + "duplicate_chart" + ] + }, + "ExportNativeDashboards": { + "methods": [ + "export_native_dashboards" + ] + }, + "ImportNativeDashboards": { + "methods": [ + "import_native_dashboards" + ] + } + } + } + } + }, + "FeaturedContentNativeDashboardService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client", + "rpcs": { + "GetFeaturedContentNativeDashboard": { + "methods": [ + "get_featured_content_native_dashboard" + ] + }, + "ListFeaturedContentNativeDashboards": { + "methods": [ + "list_featured_content_native_dashboards" + ] + }, + "InstallFeaturedContentNativeDashboard": { + "methods": [ + "install_featured_content_native_dashboard" + ] + } + } + } + } + }, "InstanceService": { "clients": { "grpc": { diff --git a/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb index 3ba17735a7ae..ab6f5e2142f9 100644 --- a/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb +++ b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb @@ -16,9 +16,13 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/cloud/chronicle/v1/dashboard_query_service" +require "google/cloud/chronicle/v1/dashboard_chart_service" require "google/cloud/chronicle/v1/data_access_control_service" require "google/cloud/chronicle/v1/data_table_service" require "google/cloud/chronicle/v1/entity_service" +require "google/cloud/chronicle/v1/native_dashboard_service" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" require "google/cloud/chronicle/v1/instance_service" require "google/cloud/chronicle/v1/reference_list_service" require "google/cloud/chronicle/v1/rule_service" @@ -33,12 +37,12 @@ module Chronicle # @example Load this package, including all its services, and instantiate a gRPC client # # require "google/cloud/chronicle/v1" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new # # @example Load this package, including all its services, and instantiate a REST client # # require "google/cloud/chronicle/v1" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new # module V1 end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb diff --git a/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb index 4a0f6a9111e2..d518fb21cc9f 100644 --- a/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb +++ b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb @@ -16,9 +16,13 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/cloud/chronicle/v1/dashboard_query_service/rest" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest" require "google/cloud/chronicle/v1/data_access_control_service/rest" require "google/cloud/chronicle/v1/data_table_service/rest" require "google/cloud/chronicle/v1/entity_service/rest" +require "google/cloud/chronicle/v1/native_dashboard_service/rest" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" require "google/cloud/chronicle/v1/instance_service/rest" require "google/cloud/chronicle/v1/reference_list_service/rest" require "google/cloud/chronicle/v1/rule_service/rest" @@ -33,7 +37,7 @@ module Chronicle # @example # # require "google/cloud/chronicle/v1/rest" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new # module V1 end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb b/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb rename to google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb b/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb rename to google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb b/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb rename to google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb b/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb rename to google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb b/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb rename to google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb b/google-cloud-chronicle-v1/proto_docs/google/type/date.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb rename to google-cloud-chronicle-v1/proto_docs/google/type/date.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb b/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb rename to google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb b/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb rename to google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb b/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb rename to google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb b/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb rename to google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb b/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb rename to google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb b/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb rename to google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb b/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb rename to google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb b/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb rename to google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb diff --git a/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json b/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json index 4053fa787a07..a26d9c073088 100644 --- a/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json +++ b/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json @@ -11,6 +11,166 @@ ] }, "snippets": [ + { + "region_tag": "chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync", + "title": "Snippet for the get_dashboard_query call in the DashboardQueryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query.", + "file": "dashboard_query_service/get_dashboard_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dashboard_query", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DashboardQuery", + "client": { + "short_name": "DashboardQueryService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client" + }, + "method": { + "short_name": "GetDashboardQuery", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService.GetDashboardQuery", + "service": { + "short_name": "DashboardQueryService", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync", + "title": "Snippet for the execute_dashboard_query call in the DashboardQueryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query.", + "file": "dashboard_query_service/execute_dashboard_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "execute_dashboard_query", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse", + "client": { + "short_name": "DashboardQueryService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client" + }, + "method": { + "short_name": "ExecuteDashboardQuery", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService.ExecuteDashboardQuery", + "service": { + "short_name": "DashboardQueryService", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync", + "title": "Snippet for the get_dashboard_chart call in the DashboardChartService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart.", + "file": "dashboard_chart_service/get_dashboard_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dashboard_chart", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDashboardChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DashboardChart", + "client": { + "short_name": "DashboardChartService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client" + }, + "method": { + "short_name": "GetDashboardChart", + "full_name": "google.cloud.chronicle.v1.DashboardChartService.GetDashboardChart", + "service": { + "short_name": "DashboardChartService", + "full_name": "google.cloud.chronicle.v1.DashboardChartService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync", + "title": "Snippet for the batch_get_dashboard_charts call in the DashboardChartService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts.", + "file": "dashboard_chart_service/batch_get_dashboard_charts.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_get_dashboard_charts", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse", + "client": { + "short_name": "DashboardChartService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client" + }, + "method": { + "short_name": "BatchGetDashboardCharts", + "full_name": "google.cloud.chronicle.v1.DashboardChartService.BatchGetDashboardCharts", + "service": { + "short_name": "DashboardChartService", + "full_name": "google.cloud.chronicle.v1.DashboardChartService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync", "title": "Snippet for the create_data_access_label call in the DataAccessControlService service", @@ -1211,6 +1371,606 @@ } ] }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync", + "title": "Snippet for the create_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard.", + "file": "native_dashboard_service/create_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "CreateNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.CreateNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync", + "title": "Snippet for the get_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard.", + "file": "native_dashboard_service/get_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "GetNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.GetNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync", + "title": "Snippet for the list_native_dashboards call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards.", + "file": "native_dashboard_service/list_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "ListNativeDashboards", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ListNativeDashboards", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync", + "title": "Snippet for the update_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard.", + "file": "native_dashboard_service/update_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "UpdateNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.UpdateNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync", + "title": "Snippet for the duplicate_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard.", + "file": "native_dashboard_service/duplicate_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "duplicate_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "DuplicateNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DuplicateNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync", + "title": "Snippet for the delete_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard.", + "file": "native_dashboard_service/delete_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "DeleteNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DeleteNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_AddChart_sync", + "title": "Snippet for the add_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#add_chart.", + "file": "native_dashboard_service/add_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "add_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#add_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::AddChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::AddChartResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "AddChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.AddChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_RemoveChart_sync", + "title": "Snippet for the remove_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#remove_chart.", + "file": "native_dashboard_service/remove_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "remove_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#remove_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::RemoveChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "RemoveChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.RemoveChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_EditChart_sync", + "title": "Snippet for the edit_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#edit_chart.", + "file": "native_dashboard_service/edit_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "edit_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#edit_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::EditChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::EditChartResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "EditChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.EditChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync", + "title": "Snippet for the duplicate_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_chart.", + "file": "native_dashboard_service/duplicate_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "duplicate_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DuplicateChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DuplicateChartResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "DuplicateChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DuplicateChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync", + "title": "Snippet for the export_native_dashboards call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards.", + "file": "native_dashboard_service/export_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "ExportNativeDashboards", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ExportNativeDashboards", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync", + "title": "Snippet for the import_native_dashboards call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards.", + "file": "native_dashboard_service/import_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "ImportNativeDashboards", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ImportNativeDashboards", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync", + "title": "Snippet for the get_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard.", + "file": "featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_featured_content_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard", + "client": { + "short_name": "FeaturedContentNativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" + }, + "method": { + "short_name": "GetFeaturedContentNativeDashboard", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.GetFeaturedContentNativeDashboard", + "service": { + "short_name": "FeaturedContentNativeDashboardService", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync", + "title": "Snippet for the list_featured_content_native_dashboards call in the FeaturedContentNativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards.", + "file": "featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_featured_content_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse", + "client": { + "short_name": "FeaturedContentNativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" + }, + "method": { + "short_name": "ListFeaturedContentNativeDashboards", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.ListFeaturedContentNativeDashboards", + "service": { + "short_name": "FeaturedContentNativeDashboardService", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync", + "title": "Snippet for the install_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard.", + "file": "featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "install_featured_content_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse", + "client": { + "short_name": "FeaturedContentNativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" + }, + "method": { + "short_name": "InstallFeaturedContentNativeDashboard", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.InstallFeaturedContentNativeDashboard", + "service": { + "short_name": "FeaturedContentNativeDashboardService", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "chronicle_v1_generated_InstanceService_GetInstance_sync", "title": "Snippet for the get_instance call in the InstanceService service", diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.gitignore b/owl-bot-staging/google-cloud-chronicle-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -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/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json deleted file mode 100644 index b353dde6b42b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "chronicle.googleapis.com", - "api_shortname": "chronicle", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest", - "distribution_name": "google-cloud-chronicle-v1", - "is_cloud": true, - "language": "ruby", - "name": "chronicle", - "name_pretty": "Chronicle V1 API", - "product_documentation": "https://cloud.google.com/chronicle/docs/secops/secops-overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/chronicle/docs/secops/secops-overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml b/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml deleted file mode 100644 index 247c818fc834..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-chronicle-v1.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-chronicle-v1.rb" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb b/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.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/owl-bot-staging/google-cloud-chronicle-v1/.yardopts b/owl-bot-staging/google-cloud-chronicle-v1/.yardopts deleted file mode 100644 index 279160678357..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Chronicle V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md deleted file mode 100644 index 1b97f84a9c98..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-chronicle-v1 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-chronicle-v1 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/chronicle/v1" - -client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/chronicle/v1" - -::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::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-chronicle-v1 -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/chronicle/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::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/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-chronicle-v1/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md b/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/owl-bot-staging/google-cloud-chronicle-v1/README.md b/owl-bot-staging/google-cloud-chronicle-v1/README.md deleted file mode 100644 index d541636e6e52..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Chronicle V1 API - -The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. - -The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Chronicle V1 API. Most users should consider using -the main client gem, -[google-cloud-chronicle](https://rubygems.org/gems/google-cloud-chronicle). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-chronicle-v1 -``` - -## 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/chronicle.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/chronicle/v1" - -client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new -request = ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new # (request fields as keyword arguments...) -response = client.get_dashboard_query request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/chronicle/docs/secops/secops-overview) -for general usage information. - -## 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/chronicle/v1" -require "logger" - -client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::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.0+. - -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-chronicle`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-chronicle-v1`. -_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-chronicle`. -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-chronicle-v1`. - -### 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. diff --git a/owl-bot-staging/google-cloud-chronicle-v1/Rakefile b/owl-bot-staging/google-cloud-chronicle-v1/Rakefile deleted file mode 100644 index 2f863e51cf0e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/Rakefile +++ /dev/null @@ -1,169 +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 "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-chronicle-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_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 GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/chronicle/v1/dashboard_query_service/credentials" - ::Google::Cloud::Chronicle::V1::DashboardQueryService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_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-chronicle-v1 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-chronicle-v1 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-chronicle-v1 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-chronicle-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-chronicle-v1" - header "google-cloud-chronicle-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-chronicle-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-chronicle-v1 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-chronicle-v1 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-chronicle-v1 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/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json deleted file mode 100644 index 16360a702a6d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json +++ /dev/null @@ -1,429 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.chronicle.v1", - "libraryPackage": "::Google::Cloud::Chronicle::V1", - "services": { - "DashboardQueryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client", - "rpcs": { - "GetDashboardQuery": { - "methods": [ - "get_dashboard_query" - ] - }, - "ExecuteDashboardQuery": { - "methods": [ - "execute_dashboard_query" - ] - } - } - } - } - }, - "DashboardChartService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client", - "rpcs": { - "GetDashboardChart": { - "methods": [ - "get_dashboard_chart" - ] - }, - "BatchGetDashboardCharts": { - "methods": [ - "batch_get_dashboard_charts" - ] - } - } - } - } - }, - "DataAccessControlService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client", - "rpcs": { - "CreateDataAccessLabel": { - "methods": [ - "create_data_access_label" - ] - }, - "GetDataAccessLabel": { - "methods": [ - "get_data_access_label" - ] - }, - "ListDataAccessLabels": { - "methods": [ - "list_data_access_labels" - ] - }, - "UpdateDataAccessLabel": { - "methods": [ - "update_data_access_label" - ] - }, - "DeleteDataAccessLabel": { - "methods": [ - "delete_data_access_label" - ] - }, - "CreateDataAccessScope": { - "methods": [ - "create_data_access_scope" - ] - }, - "GetDataAccessScope": { - "methods": [ - "get_data_access_scope" - ] - }, - "ListDataAccessScopes": { - "methods": [ - "list_data_access_scopes" - ] - }, - "UpdateDataAccessScope": { - "methods": [ - "update_data_access_scope" - ] - }, - "DeleteDataAccessScope": { - "methods": [ - "delete_data_access_scope" - ] - } - } - } - } - }, - "DataTableService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::DataTableService::Client", - "rpcs": { - "CreateDataTable": { - "methods": [ - "create_data_table" - ] - }, - "ListDataTables": { - "methods": [ - "list_data_tables" - ] - }, - "GetDataTable": { - "methods": [ - "get_data_table" - ] - }, - "UpdateDataTable": { - "methods": [ - "update_data_table" - ] - }, - "DeleteDataTable": { - "methods": [ - "delete_data_table" - ] - }, - "CreateDataTableRow": { - "methods": [ - "create_data_table_row" - ] - }, - "UpdateDataTableRow": { - "methods": [ - "update_data_table_row" - ] - }, - "ListDataTableRows": { - "methods": [ - "list_data_table_rows" - ] - }, - "GetDataTableRow": { - "methods": [ - "get_data_table_row" - ] - }, - "DeleteDataTableRow": { - "methods": [ - "delete_data_table_row" - ] - }, - "BulkCreateDataTableRows": { - "methods": [ - "bulk_create_data_table_rows" - ] - }, - "BulkGetDataTableRows": { - "methods": [ - "bulk_get_data_table_rows" - ] - }, - "BulkReplaceDataTableRows": { - "methods": [ - "bulk_replace_data_table_rows" - ] - }, - "BulkUpdateDataTableRows": { - "methods": [ - "bulk_update_data_table_rows" - ] - }, - "GetDataTableOperationErrors": { - "methods": [ - "get_data_table_operation_errors" - ] - } - } - } - } - }, - "EntityService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::EntityService::Client", - "rpcs": { - "GetWatchlist": { - "methods": [ - "get_watchlist" - ] - }, - "ListWatchlists": { - "methods": [ - "list_watchlists" - ] - }, - "CreateWatchlist": { - "methods": [ - "create_watchlist" - ] - }, - "UpdateWatchlist": { - "methods": [ - "update_watchlist" - ] - }, - "DeleteWatchlist": { - "methods": [ - "delete_watchlist" - ] - } - } - } - } - }, - "NativeDashboardService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client", - "rpcs": { - "CreateNativeDashboard": { - "methods": [ - "create_native_dashboard" - ] - }, - "GetNativeDashboard": { - "methods": [ - "get_native_dashboard" - ] - }, - "ListNativeDashboards": { - "methods": [ - "list_native_dashboards" - ] - }, - "UpdateNativeDashboard": { - "methods": [ - "update_native_dashboard" - ] - }, - "DuplicateNativeDashboard": { - "methods": [ - "duplicate_native_dashboard" - ] - }, - "DeleteNativeDashboard": { - "methods": [ - "delete_native_dashboard" - ] - }, - "AddChart": { - "methods": [ - "add_chart" - ] - }, - "RemoveChart": { - "methods": [ - "remove_chart" - ] - }, - "EditChart": { - "methods": [ - "edit_chart" - ] - }, - "DuplicateChart": { - "methods": [ - "duplicate_chart" - ] - }, - "ExportNativeDashboards": { - "methods": [ - "export_native_dashboards" - ] - }, - "ImportNativeDashboards": { - "methods": [ - "import_native_dashboards" - ] - } - } - } - } - }, - "FeaturedContentNativeDashboardService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client", - "rpcs": { - "GetFeaturedContentNativeDashboard": { - "methods": [ - "get_featured_content_native_dashboard" - ] - }, - "ListFeaturedContentNativeDashboards": { - "methods": [ - "list_featured_content_native_dashboards" - ] - }, - "InstallFeaturedContentNativeDashboard": { - "methods": [ - "install_featured_content_native_dashboard" - ] - } - } - } - } - }, - "InstanceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::InstanceService::Client", - "rpcs": { - "GetInstance": { - "methods": [ - "get_instance" - ] - } - } - } - } - }, - "ReferenceListService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client", - "rpcs": { - "GetReferenceList": { - "methods": [ - "get_reference_list" - ] - }, - "ListReferenceLists": { - "methods": [ - "list_reference_lists" - ] - }, - "CreateReferenceList": { - "methods": [ - "create_reference_list" - ] - }, - "UpdateReferenceList": { - "methods": [ - "update_reference_list" - ] - } - } - } - } - }, - "RuleService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::RuleService::Client", - "rpcs": { - "CreateRule": { - "methods": [ - "create_rule" - ] - }, - "GetRule": { - "methods": [ - "get_rule" - ] - }, - "ListRules": { - "methods": [ - "list_rules" - ] - }, - "UpdateRule": { - "methods": [ - "update_rule" - ] - }, - "DeleteRule": { - "methods": [ - "delete_rule" - ] - }, - "ListRuleRevisions": { - "methods": [ - "list_rule_revisions" - ] - }, - "CreateRetrohunt": { - "methods": [ - "create_retrohunt" - ] - }, - "GetRetrohunt": { - "methods": [ - "get_retrohunt" - ] - }, - "ListRetrohunts": { - "methods": [ - "list_retrohunts" - ] - }, - "GetRuleDeployment": { - "methods": [ - "get_rule_deployment" - ] - }, - "ListRuleDeployments": { - "methods": [ - "list_rule_deployments" - ] - }, - "UpdateRuleDeployment": { - "methods": [ - "update_rule_deployment" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec b/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec deleted file mode 100644 index 0cf9044d81bc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/chronicle/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-chronicle-v1" - gem.version = Google::Cloud::Chronicle::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details." - gem.summary = "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb deleted file mode 100644 index 8d5cd2a8ddb3..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.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/chronicle/v1" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb deleted file mode 100644 index 5ef420b6fc6f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.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! - -require "google/cloud/chronicle/v1/dashboard_query_service" -require "google/cloud/chronicle/v1/dashboard_chart_service" -require "google/cloud/chronicle/v1/data_access_control_service" -require "google/cloud/chronicle/v1/data_table_service" -require "google/cloud/chronicle/v1/entity_service" -require "google/cloud/chronicle/v1/native_dashboard_service" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" -require "google/cloud/chronicle/v1/instance_service" -require "google/cloud/chronicle/v1/reference_list_service" -require "google/cloud/chronicle/v1/rule_service" -require "google/cloud/chronicle/v1/version" - -module Google - module Cloud - module Chronicle - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1" - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/chronicle/v1" - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/chronicle/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb deleted file mode 100644 index cc6fd584534a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/data_access_control.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/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/chronicle/v1/data_access_control.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x01\n\x1c\x43reateDataAccessLabelRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12J\n\x11\x64\x61ta_access_label\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_label_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\x9b\x01\n\x1bListDataAccessLabelsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x1cListDataAccessLabelsResponse\x12\x46\n\x12\x64\x61ta_access_labels\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x1cUpdateDataAccessLabelRequest\x12J\n\x11\x64\x61ta_access_label\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\xcf\x01\n\x1c\x43reateDataAccessScopeRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12J\n\x11\x64\x61ta_access_scope\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_scope_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\x9b\x01\n\x1bListDataAccessScopesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd3\x01\n\x1cListDataAccessScopesResponse\x12\x46\n\x12\x64\x61ta_access_scopes\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScope\x12-\n global_data_access_scope_granted\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB#\n!_global_data_access_scope_granted\"\x9b\x01\n\x1cUpdateDataAccessScopeRequest\x12J\n\x11\x64\x61ta_access_scope\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\xd5\x03\n\x0f\x44\x61taAccessLabel\x12\x13\n\tudm_query\x18\x03 \x01(\tH\x00\x12;\n\x04name\x18\x01 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessLabel\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}B\x0c\n\ndefinition\"\x88\x05\n\x0f\x44\x61taAccessScope\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12\\\n\x1a\x61llowed_data_access_labels\x18\x02 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12[\n\x19\x64\x65nied_data_access_labels\x18\x03 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tallow_all\x18\n \x01(\x08\x42\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessScope\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}\"\xd0\x01\n\x18\x44\x61taAccessLabelReference\x12\x1b\n\x11\x64\x61ta_access_label\x18\x01 \x01(\tH\x00\x12\x12\n\x08log_type\x18\x02 \x01(\tH\x00\x12\x19\n\x0f\x61sset_namespace\x18\x03 \x01(\tH\x00\x12\x44\n\x0fingestion_label\x18\x04 \x01(\x0b\x32).google.cloud.chronicle.v1.IngestionLabelH\x00\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x42\x07\n\x05label\"V\n\x0eIngestionLabel\x12 \n\x13ingestion_label_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15ingestion_label_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xe6\x12\n\x18\x44\x61taAccessControlService\x12\x8a\x02\n\x15\x43reateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.CreateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8b\x01\xda\x41-parent,data_access_label,data_access_label_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels:\x11\x64\x61ta_access_label\x12\xc7\x01\n\x12GetDataAccessLabel\x12\x34.google.cloud.chronicle.v1.GetDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\xda\x01\n\x14ListDataAccessLabels\x12\x36.google.cloud.chronicle.v1.ListDataAccessLabelsRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessLabelsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels\x12\x8c\x02\n\x15UpdateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_label,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_label.name=projects/*/locations/*/instances/*/dataAccessLabels/*}:\x11\x64\x61ta_access_label\x12\xb9\x01\n\x15\x44\x65leteDataAccessLabel\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessLabelRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\x8a\x02\n\x15\x43reateDataAccessScope\x12\x37.google.cloud.chronicle.v1.CreateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8b\x01\xda\x41-parent,data_access_scope,data_access_scope_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes:\x11\x64\x61ta_access_scope\x12\xc7\x01\n\x12GetDataAccessScope\x12\x34.google.cloud.chronicle.v1.GetDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x12\xda\x01\n\x14ListDataAccessScopes\x12\x36.google.cloud.chronicle.v1.ListDataAccessScopesRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessScopesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes\x12\x8c\x02\n\x15UpdateDataAccessScope\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_scope,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_scope.name=projects/*/locations/*/instances/*/dataAccessScopes/*}:\x11\x64\x61ta_access_scope\x12\xb9\x01\n\x15\x44\x65leteDataAccessScope\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessScopeRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0f\x44\x61taAccessProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - CreateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessLabelRequest").msgclass - GetDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessLabelRequest").msgclass - ListDataAccessLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsRequest").msgclass - ListDataAccessLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsResponse").msgclass - UpdateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessLabelRequest").msgclass - DeleteDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessLabelRequest").msgclass - CreateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessScopeRequest").msgclass - GetDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessScopeRequest").msgclass - ListDataAccessScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesRequest").msgclass - ListDataAccessScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesResponse").msgclass - UpdateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessScopeRequest").msgclass - DeleteDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessScopeRequest").msgclass - DataAccessLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabel").msgclass - DataAccessScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessScope").msgclass - DataAccessLabelReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabelReference").msgclass - IngestionLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.IngestionLabel").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb deleted file mode 100644 index 7001b817d96a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/data_access_control_service/credentials" -require "google/cloud/chronicle/v1/data_access_control_service/paths" -require "google/cloud/chronicle/v1/data_access_control_service/client" -require "google/cloud/chronicle/v1/data_access_control_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/data_access_control_service" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/data_access_control_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - module DataAccessControlService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_access_control_service", "helpers.rb" -require "google/cloud/chronicle/v1/data_access_control_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb deleted file mode 100644 index 06ae3041cf1e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb +++ /dev/null @@ -1,1431 +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/chronicle/v1/data_access_control_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - ## - # Client for the DataAccessControlService service. - # - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_access_control_service_stub - - ## - # Configure the DataAccessControlService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataAccessControlService clients - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] - 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_data_access_label.timeout = 60.0 - - default_config.rpcs.get_data_access_label.timeout = 60.0 - default_config.rpcs.get_data_access_label.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_labels.timeout = 60.0 - default_config.rpcs.list_data_access_labels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_label.timeout = 60.0 - - default_config.rpcs.delete_data_access_label.timeout = 60.0 - - default_config.rpcs.create_data_access_scope.timeout = 60.0 - - default_config.rpcs.get_data_access_scope.timeout = 60.0 - default_config.rpcs.get_data_access_scope.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_scopes.timeout = 60.0 - default_config.rpcs.list_data_access_scopes.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_scope.timeout = 60.0 - - default_config.rpcs.delete_data_access_scope.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 - @data_access_control_service_stub.universe_domain - end - - ## - # Create a new DataAccessControlService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataAccessControlService 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/chronicle/v1/data_access_control_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 - - @data_access_control_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::DataAccessControlService::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 - ) - - @data_access_control_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_access_control_service_stub.logger - end - - # Service calls - - ## - # Creates a data access label. - # Data access labels are applied to incoming event data and selected in data - # access scopes (another resource), and only users with scopes containing the - # label can see data with that label. Currently, the data access label - # resource only includes custom labels, which are labels that correspond - # to UDM queries over event data. - # - # @overload create_data_access_label(request, options = nil) - # Pass arguments to `create_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) - # Pass arguments to `create_data_access_label` 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 parent resource where this Data Access Label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. Data access label to create. - # @param data_access_label_id [::String] - # Required. The ID to use for the data access label, which will become the - # label's display name and the final component of the label's resource name. - # The maximum number of characters should be 63. Regex pattern is as per AIP: - # https://google.aip.dev/122#resource-id-segments - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new - # - # # Call the create_data_access_label method. - # result = client.create_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def create_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :create_data_access_label, 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 data access label. - # - # @overload get_data_access_label(request, options = nil) - # Pass arguments to `get_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::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_data_access_label(name: nil) - # Pass arguments to `get_data_access_label` 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 ID of the data access label to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new - # - # # Call the get_data_access_label method. - # result = client.get_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def get_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :get_data_access_label, 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 all data access labels for the customer. - # - # @overload list_data_access_labels(request, options = nil) - # Pass arguments to `list_data_access_labels` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_labels` 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 parent resource where this data access label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access labels to return. The service may return - # fewer than this value. If unspecified, at most 100 data access labels will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessLabelsRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessLabel and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new - # - # # Call the list_data_access_labels method. - # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. - # p item - # end - # - def list_data_access_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest - - # 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_data_access_labels.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::Chronicle::V1::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_data_access_labels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_access_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :list_data_access_labels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, 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 data access label. - # - # @overload update_data_access_label(request, options = nil) - # Pass arguments to `update_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::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_data_access_label(data_access_label: nil, update_mask: nil) - # Pass arguments to `update_data_access_label` 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 data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. The data access label to update. - # - # The label's `name` field is used to identify the label to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description and definition - # fields are supported for update; an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new - # - # # Call the update_data_access_label method. - # result = client.update_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def update_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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.data_access_label&.name - header_params["data_access_label.name"] = request.data_access_label.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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :update_data_access_label, 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 data access label. When a label is deleted, new - # data that enters in the system will not receive the label, but the label - # will not be removed from old data that still refers to it. - # - # @overload delete_data_access_label(request, options = nil) - # Pass arguments to `delete_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::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_data_access_label(name: nil) - # Pass arguments to `delete_data_access_label` 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 ID of the data access label to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new - # - # # Call the delete_data_access_label method. - # result = client.delete_data_access_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :delete_data_access_label, 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 data access scope. - # Data access scope is a combination of allowed and denied labels attached - # to a permission group. If a scope has allowed labels A and B and denied - # labels C and D, then the group of people attached to the scope - # will have permissions to see all events labeled with A or B (or both) and - # not labeled with either C or D. - # - # @overload create_data_access_scope(request, options = nil) - # Pass arguments to `create_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) - # Pass arguments to `create_data_access_scope` 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 parent resource where this Data Access Scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. Data access scope to create. - # @param data_access_scope_id [::String] - # Required. The user provided scope id which will become the last part of the - # name of the scope resource. Needs to be compliant with - # https://google.aip.dev/122 - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new - # - # # Call the create_data_access_scope method. - # result = client.create_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def create_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :create_data_access_scope, 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 - - ## - # Retrieves an existing data access scope. - # - # @overload get_data_access_scope(request, options = nil) - # Pass arguments to `get_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::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_data_access_scope(name: nil) - # Pass arguments to `get_data_access_scope` 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 ID of the data access scope to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new - # - # # Call the get_data_access_scope method. - # result = client.get_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def get_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :get_data_access_scope, 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 all existing data access scopes for the customer. - # - # @overload list_data_access_scopes(request, options = nil) - # Pass arguments to `list_data_access_scopes` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_scopes` 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 parent resource where this data access scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access scopes to return. The service may return - # fewer than this value. If unspecified, at most 100 data access scopes will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessScopesRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessScope and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new - # - # # Call the list_data_access_scopes method. - # result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. - # p item - # end - # - def list_data_access_scopes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest - - # 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_data_access_scopes.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::Chronicle::V1::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_data_access_scopes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_access_scopes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :list_data_access_scopes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_scopes, 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 data access scope. - # - # @overload update_data_access_scope(request, options = nil) - # Pass arguments to `update_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::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_data_access_scope(data_access_scope: nil, update_mask: nil) - # Pass arguments to `update_data_access_scope` 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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. The data access scope to update. - # - # The scope's `name` field is used to identify the scope to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description, the allowed - # and denied labels list fields are supported for update; - # an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new - # - # # Call the update_data_access_scope method. - # result = client.update_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def update_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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.data_access_scope&.name - header_params["data_access_scope.name"] = request.data_access_scope.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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :update_data_access_scope, 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 data access scope. - # - # @overload delete_data_access_scope(request, options = nil) - # Pass arguments to `delete_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::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_data_access_scope(name: nil) - # Pass arguments to `delete_data_access_scope` 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 ID of the data access scope to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new - # - # # Call the delete_data_access_scope method. - # result = client.delete_data_access_scope request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :delete_data_access_scope, 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 - - ## - # Configuration class for the DataAccessControlService API. - # - # This class represents the configuration for DataAccessControlService, - # 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::Chronicle::V1::DataAccessControlService::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_data_access_label to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.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::Chronicle::V1::DataAccessControlService::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. - # * `: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 = "chronicle.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 DataAccessControlService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_label - ## - # RPC-specific configuration for `get_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_label - ## - # RPC-specific configuration for `list_data_access_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_labels - ## - # RPC-specific configuration for `update_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_label - ## - # RPC-specific configuration for `delete_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_label - ## - # RPC-specific configuration for `create_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_scope - ## - # RPC-specific configuration for `get_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_scope - ## - # RPC-specific configuration for `list_data_access_scopes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_scopes - ## - # RPC-specific configuration for `update_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_scope - ## - # RPC-specific configuration for `delete_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_scope - - # @private - def initialize parent_rpcs = nil - create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label - @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config - get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label - @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config - list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels - @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config - update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label - @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config - delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label - @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config - create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope - @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config - get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope - @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config - list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes - @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config - update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope - @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config - delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope - @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb deleted file mode 100644 index 2e86b999c1a0..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - # Credentials for the DataAccessControlService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb deleted file mode 100644 index f3ec957a19df..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb +++ /dev/null @@ -1,94 +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 Chronicle - module V1 - module DataAccessControlService - # Path helper methods for the DataAccessControlService API. - module Paths - ## - # Create a fully-qualified DataAccessLabel resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_label [String] - # - # @return [::String] - def data_access_label_path project:, location:, instance:, data_access_label: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessLabels/#{data_access_label}" - end - - ## - # Create a fully-qualified DataAccessScope resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_scope [String] - # - # @return [::String] - def data_access_scope_path project:, location:, instance:, data_access_scope: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb deleted file mode 100644 index e93f75e06d2d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/data_access_control_service/credentials" -require "google/cloud/chronicle/v1/data_access_control_service/paths" -require "google/cloud/chronicle/v1/data_access_control_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/data_access_control_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - module DataAccessControlService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/data_access_control_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb deleted file mode 100644 index 88d1752de0f5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb +++ /dev/null @@ -1,1318 +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/chronicle/v1/data_access_control_pb" -require "google/cloud/chronicle/v1/data_access_control_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - module Rest - ## - # REST client for the DataAccessControlService service. - # - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_access_control_service_stub - - ## - # Configure the DataAccessControlService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataAccessControlService clients - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] - 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_data_access_label.timeout = 60.0 - - default_config.rpcs.get_data_access_label.timeout = 60.0 - default_config.rpcs.get_data_access_label.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_labels.timeout = 60.0 - default_config.rpcs.list_data_access_labels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_label.timeout = 60.0 - - default_config.rpcs.delete_data_access_label.timeout = 60.0 - - default_config.rpcs.create_data_access_scope.timeout = 60.0 - - default_config.rpcs.get_data_access_scope.timeout = 60.0 - default_config.rpcs.get_data_access_scope.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_scopes.timeout = 60.0 - default_config.rpcs.list_data_access_scopes.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_scope.timeout = 60.0 - - default_config.rpcs.delete_data_access_scope.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 - @data_access_control_service_stub.universe_domain - end - - ## - # Create a new DataAccessControlService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataAccessControlService 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 - - @data_access_control_service_stub = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_access_control_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_access_control_service_stub.logger - end - - # Service calls - - ## - # Creates a data access label. - # Data access labels are applied to incoming event data and selected in data - # access scopes (another resource), and only users with scopes containing the - # label can see data with that label. Currently, the data access label - # resource only includes custom labels, which are labels that correspond - # to UDM queries over event data. - # - # @overload create_data_access_label(request, options = nil) - # Pass arguments to `create_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) - # Pass arguments to `create_data_access_label` 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 parent resource where this Data Access Label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. Data access label to create. - # @param data_access_label_id [::String] - # Required. The ID to use for the data access label, which will become the - # label's display name and the final component of the label's resource name. - # The maximum number of characters should be 63. Regex pattern is as per AIP: - # https://google.aip.dev/122#resource-id-segments - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new - # - # # Call the create_data_access_label method. - # result = client.create_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def create_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.create_data_access_label 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 data access label. - # - # @overload get_data_access_label(request, options = nil) - # Pass arguments to `get_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::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_data_access_label(name: nil) - # Pass arguments to `get_data_access_label` 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 ID of the data access label to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new - # - # # Call the get_data_access_label method. - # result = client.get_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def get_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.get_data_access_label 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 all data access labels for the customer. - # - # @overload list_data_access_labels(request, options = nil) - # Pass arguments to `list_data_access_labels` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_labels` 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 parent resource where this data access label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access labels to return. The service may return - # fewer than this value. If unspecified, at most 100 data access labels will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessLabelsRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessLabel and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new - # - # # Call the list_data_access_labels method. - # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. - # p item - # end - # - def list_data_access_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest - - # 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_data_access_labels.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::Chronicle::V1::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_data_access_labels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_access_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.list_data_access_labels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, "data_access_labels", 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 data access label. - # - # @overload update_data_access_label(request, options = nil) - # Pass arguments to `update_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::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_data_access_label(data_access_label: nil, update_mask: nil) - # Pass arguments to `update_data_access_label` 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 data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. The data access label to update. - # - # The label's `name` field is used to identify the label to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description and definition - # fields are supported for update; an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new - # - # # Call the update_data_access_label method. - # result = client.update_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def update_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.update_data_access_label 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 data access label. When a label is deleted, new - # data that enters in the system will not receive the label, but the label - # will not be removed from old data that still refers to it. - # - # @overload delete_data_access_label(request, options = nil) - # Pass arguments to `delete_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::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_data_access_label(name: nil) - # Pass arguments to `delete_data_access_label` 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 ID of the data access label to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new - # - # # Call the delete_data_access_label method. - # result = client.delete_data_access_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.delete_data_access_label 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 data access scope. - # Data access scope is a combination of allowed and denied labels attached - # to a permission group. If a scope has allowed labels A and B and denied - # labels C and D, then the group of people attached to the scope - # will have permissions to see all events labeled with A or B (or both) and - # not labeled with either C or D. - # - # @overload create_data_access_scope(request, options = nil) - # Pass arguments to `create_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) - # Pass arguments to `create_data_access_scope` 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 parent resource where this Data Access Scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. Data access scope to create. - # @param data_access_scope_id [::String] - # Required. The user provided scope id which will become the last part of the - # name of the scope resource. Needs to be compliant with - # https://google.aip.dev/122 - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new - # - # # Call the create_data_access_scope method. - # result = client.create_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def create_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.create_data_access_scope 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 - - ## - # Retrieves an existing data access scope. - # - # @overload get_data_access_scope(request, options = nil) - # Pass arguments to `get_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::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_data_access_scope(name: nil) - # Pass arguments to `get_data_access_scope` 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 ID of the data access scope to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new - # - # # Call the get_data_access_scope method. - # result = client.get_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def get_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.get_data_access_scope 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 all existing data access scopes for the customer. - # - # @overload list_data_access_scopes(request, options = nil) - # Pass arguments to `list_data_access_scopes` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_scopes` 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 parent resource where this data access scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access scopes to return. The service may return - # fewer than this value. If unspecified, at most 100 data access scopes will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessScopesRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessScope and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new - # - # # Call the list_data_access_scopes method. - # result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. - # p item - # end - # - def list_data_access_scopes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest - - # 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_data_access_scopes.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::Chronicle::V1::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_data_access_scopes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_access_scopes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.list_data_access_scopes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_scopes, "data_access_scopes", 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 data access scope. - # - # @overload update_data_access_scope(request, options = nil) - # Pass arguments to `update_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::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_data_access_scope(data_access_scope: nil, update_mask: nil) - # Pass arguments to `update_data_access_scope` 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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. The data access scope to update. - # - # The scope's `name` field is used to identify the scope to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description, the allowed - # and denied labels list fields are supported for update; - # an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new - # - # # Call the update_data_access_scope method. - # result = client.update_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def update_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.update_data_access_scope 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 data access scope. - # - # @overload delete_data_access_scope(request, options = nil) - # Pass arguments to `delete_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::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_data_access_scope(name: nil) - # Pass arguments to `delete_data_access_scope` 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 ID of the data access scope to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new - # - # # Call the delete_data_access_scope method. - # result = client.delete_data_access_scope request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.delete_data_access_scope 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 - - ## - # Configuration class for the DataAccessControlService REST API. - # - # This class represents the configuration for DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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_data_access_label to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.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. - # * `: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 = "chronicle.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 DataAccessControlService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_label - ## - # RPC-specific configuration for `get_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_label - ## - # RPC-specific configuration for `list_data_access_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_labels - ## - # RPC-specific configuration for `update_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_label - ## - # RPC-specific configuration for `delete_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_label - ## - # RPC-specific configuration for `create_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_scope - ## - # RPC-specific configuration for `get_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_scope - ## - # RPC-specific configuration for `list_data_access_scopes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_scopes - ## - # RPC-specific configuration for `update_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_scope - ## - # RPC-specific configuration for `delete_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_scope - - # @private - def initialize parent_rpcs = nil - create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label - @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config - get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label - @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config - list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels - @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config - update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label - @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config - delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label - @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config - create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope - @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config - get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope - @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config - list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes - @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config - update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope - @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config - delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope - @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb deleted file mode 100644 index c11b9f42da29..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb +++ /dev/null @@ -1,695 +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/chronicle/v1/data_access_control_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - module Rest - ## - # REST service stub for the DataAccessControlService 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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] - # 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::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # A result object deserialized from the server's reply - def create_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_label_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_data_access_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] - # 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::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # A result object deserialized from the server's reply - def get_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_label_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_data_access_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_labels REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] - # 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::Chronicle::V1::ListDataAccessLabelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse] - # A result object deserialized from the server's reply - def list_data_access_labels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_labels_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_data_access_labels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] - # 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::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # A result object deserialized from the server's reply - def update_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_label_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_data_access_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] - # 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_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_label_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_data_access_label", - 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 create_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] - # 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::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # A result object deserialized from the server's reply - def create_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_scope_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_data_access_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] - # 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::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # A result object deserialized from the server's reply - def get_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_scope_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_data_access_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scopes REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] - # 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::Chronicle::V1::ListDataAccessScopesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse] - # A result object deserialized from the server's reply - def list_data_access_scopes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_scopes_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_data_access_scopes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] - # 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::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # A result object deserialized from the server's reply - def update_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_scope_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_data_access_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] - # 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_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_scope_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_data_access_scope", - 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 - - ## - # @private - # - # GRPC transcoding helper method for the create_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataAccessLabels", - body: "data_access_label", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_access_labels REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] - # 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_data_access_labels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataAccessLabels", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_access_label.name}", - body: "data_access_label", - matches: [ - ["data_access_label.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataAccessScopes", - body: "data_access_scope", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_access_scopes REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] - # 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_data_access_scopes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataAccessScopes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_access_scope.name}", - body: "data_access_scope", - matches: [ - ["data_access_scope.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb deleted file mode 100644 index 0ef90feac2fc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb +++ /dev/null @@ -1,76 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/data_access_control.proto for package 'Google.Cloud.Chronicle.V1' -# 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/chronicle/v1/data_access_control_pb' - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - # DataAccessControlService exposes resources and endpoints related to data - # access control. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.DataAccessControlService' - - # Creates a data access label. - # Data access labels are applied to incoming event data and selected in data - # access scopes (another resource), and only users with scopes containing the - # label can see data with that label. Currently, the data access label - # resource only includes custom labels, which are labels that correspond - # to UDM queries over event data. - rpc :CreateDataAccessLabel, ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel - # Gets a data access label. - rpc :GetDataAccessLabel, ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel - # Lists all data access labels for the customer. - rpc :ListDataAccessLabels, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse - # Updates a data access label. - rpc :UpdateDataAccessLabel, ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel - # Deletes a data access label. When a label is deleted, new - # data that enters in the system will not receive the label, but the label - # will not be removed from old data that still refers to it. - rpc :DeleteDataAccessLabel, ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::Google::Protobuf::Empty - # Creates a data access scope. - # Data access scope is a combination of allowed and denied labels attached - # to a permission group. If a scope has allowed labels A and B and denied - # labels C and D, then the group of people attached to the scope - # will have permissions to see all events labeled with A or B (or both) and - # not labeled with either C or D. - rpc :CreateDataAccessScope, ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope - # Retrieves an existing data access scope. - rpc :GetDataAccessScope, ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope - # Lists all existing data access scopes for the customer. - rpc :ListDataAccessScopes, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse - # Updates a data access scope. - rpc :UpdateDataAccessScope, ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope - # Deletes a data access scope. - rpc :DeleteDataAccessScope, ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb deleted file mode 100644 index 7b754fbc9e2a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/data_table.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/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n*google/cloud/chronicle/v1/data_table.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xaf\x01\n\x16\x43reateDataTableRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/DataTable\x12=\n\ndata_table\x18\x02 \x01(\x0b\x32$.google.cloud.chronicle.v1.DataTableB\x03\xe0\x41\x02\x12\x1a\n\rdata_table_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"O\n\x13GetDataTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/DataTable\"\x8d\x01\n\x16UpdateDataTableRequest\x12=\n\ndata_table\x18\x01 \x01(\x0b\x32$.google.cloud.chronicle.v1.DataTableB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x9b\x01\n\x15ListDataTablesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/DataTable\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\"f\n\x16\x44\x65leteDataTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/DataTable\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"l\n\x16ListDataTablesResponse\x12\x39\n\x0b\x64\x61ta_tables\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.DataTable\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa0\x01\n\x19\x43reateDataTableRowRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12\x44\n\x0e\x64\x61ta_table_row\x18\x02 \x01(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRowB\x03\xe0\x41\x02\"\x97\x01\n\x19UpdateDataTableRowRequest\x12\x44\n\x0e\x64\x61ta_table_row\x18\x01 \x01(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRowB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb6\x01\n\x18ListDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"{\n\x19ListDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"U\n\x16GetDataTableRowRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%chronicle.googleapis.com/DataTableRow\"X\n\x19\x44\x65leteDataTableRowRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%chronicle.googleapis.com/DataTableRow\"\xac\x01\n\x1e\x42ulkCreateDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.CreateDataTableRowRequestB\x03\xe0\x41\x02\"c\n\x1f\x42ulkCreateDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xa6\x01\n\x1b\x42ulkGetDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12H\n\x08requests\x18\x02 \x03(\x0b\x32\x31.google.cloud.chronicle.v1.GetDataTableRowRequestB\x03\xe0\x41\x02\"`\n\x1c\x42ulkGetDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xad\x01\n\x1f\x42ulkReplaceDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.CreateDataTableRowRequestB\x03\xe0\x41\x02\"d\n BulkReplaceDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xac\x01\n\x1e\x42ulkUpdateDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.UpdateDataTableRowRequestB\x03\xe0\x41\x02\"c\n\x1f\x42ulkUpdateDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"b\n\x12\x44\x61taTableScopeInfo\x12L\n\x12\x64\x61ta_access_scopes\x18\x01 \x03(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\x99\x06\n\tDataTable\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0b\x63olumn_info\x18\x06 \x03(\x0b\x32..google.cloud.chronicle.v1.DataTableColumnInfoB\x03\xe0\x41\x05\x12\x1c\n\x0f\x64\x61ta_table_uuid\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05rules\x18\x08 \x03(\tB\x03\xe0\x41\x03\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x1d\n\x10row_time_to_live\x18\n \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15\x61pproximate_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12\x46\n\nscope_info\x18\x0c \x01(\x0b\x32-.google.cloud.chronicle.v1.DataTableScopeInfoB\x03\xe0\x41\x01\x12L\n\rupdate_source\x18\r \x01(\x0e\x32\x30.google.cloud.chronicle.v1.DataTableUpdateSourceB\x03\xe0\x41\x03\x12\x45\n\x1crow_time_to_live_update_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x95\x01\xea\x41\x91\x01\n\"chronicle.googleapis.com/DataTable\x12Tprojects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}*\ndataTables2\tdataTable\"\x81\x03\n\x0c\x44\x61taTableRow\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x06values\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1d\n\x10row_time_to_live\x18\x05 \x01(\tB\x03\xe0\x41\x01:\xbd\x01\xea\x41\xb9\x01\n%chronicle.googleapis.com/DataTableRow\x12sprojects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}*\rdataTableRows2\x0c\x64\x61taTableRow\"\xfa\x02\n\x13\x44\x61taTableColumnInfo\x12\x1c\n\x12mapped_column_path\x18\x03 \x01(\tH\x00\x12Y\n\x0b\x63olumn_type\x18\x04 \x01(\x0e\x32\x42.google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnTypeH\x00\x12\x19\n\x0c\x63olumn_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0foriginal_column\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nkey_column\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0frepeated_values\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"j\n\x13\x44\x61taTableColumnType\x12&\n\"DATA_TABLE_COLUMN_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\t\n\x05REGEX\x10\x02\x12\x08\n\x04\x43IDR\x10\x03\x12\n\n\x06NUMBER\x10\x04\x42\x0e\n\x0cpath_or_type\"m\n\"GetDataTableOperationErrorsRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1chronicle.googleapis.com/DataTableOperationErrors\"\xb8\x02\n\x18\x44\x61taTableOperationErrors\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12&\n\nrpc_errors\x18\x03 \x03(\x0b\x32\x12.google.rpc.Status:\xe0\x01\xea\x41\xdc\x01\n1chronicle.googleapis.com/DataTableOperationErrors\x12sprojects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}*\x18\x64\x61taTableOperationErrors2\x18\x64\x61taTableOperationErrors*a\n\x15\x44\x61taTableUpdateSource\x12(\n$DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x08\n\x04RULE\x10\x02\x12\n\n\x06SEARCH\x10\x03\x32\x89\x1c\n\x10\x44\x61taTableService\x12\xdc\x01\n\x0f\x43reateDataTable\x12\x31.google.cloud.chronicle.v1.CreateDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"p\xda\x41\x1fparent,data_table,data_table_id\x82\xd3\xe4\x93\x02H\":/v1/{parent=projects/*/locations/*/instances/*}/dataTables:\ndata_table\x12\xc2\x01\n\x0eListDataTables\x12\x30.google.cloud.chronicle.v1.ListDataTablesRequest\x1a\x31.google.cloud.chronicle.v1.ListDataTablesResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/dataTables\x12\xaf\x01\n\x0cGetDataTable\x12..google.cloud.chronicle.v1.GetDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/dataTables/*}\x12\xde\x01\n\x0fUpdateDataTable\x12\x31.google.cloud.chronicle.v1.UpdateDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"r\xda\x41\x16\x64\x61ta_table,update_mask\x82\xd3\xe4\x93\x02S2E/v1/{data_table.name=projects/*/locations/*/instances/*/dataTables/*}:\ndata_table\x12\xad\x01\n\x0f\x44\x65leteDataTable\x12\x31.google.cloud.chronicle.v1.DeleteDataTableRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\nname,force\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/dataTables/*}\x12\xef\x01\n\x12\x43reateDataTableRow\x12\x34.google.cloud.chronicle.v1.CreateDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"z\xda\x41\x15parent,data_table_row\x82\xd3\xe4\x93\x02\\\"J/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:\x0e\x64\x61ta_table_row\x12\x84\x02\n\x12UpdateDataTableRow\x12\x34.google.cloud.chronicle.v1.UpdateDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"\x8e\x01\xda\x41\x1a\x64\x61ta_table_row,update_mask\x82\xd3\xe4\x93\x02k2Y/v1/{data_table_row.name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}:\x0e\x64\x61ta_table_row\x12\xdb\x01\n\x11ListDataTableRows\x12\x33.google.cloud.chronicle.v1.ListDataTableRowsRequest\x1a\x34.google.cloud.chronicle.v1.ListDataTableRowsResponse\"[\xda\x41\x06parent\x82\xd3\xe4\x93\x02L\x12J/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows\x12\xc8\x01\n\x0fGetDataTableRow\x12\x31.google.cloud.chronicle.v1.GetDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}\x12\xbd\x01\n\x12\x44\x65leteDataTableRow\x12\x34.google.cloud.chronicle.v1.DeleteDataTableRowRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*J/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}\x12\x84\x02\n\x17\x42ulkCreateDataTableRows\x12\x39.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest\x1a:.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse\"r\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02Z\"U/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkCreate:\x01*\x12\xf8\x01\n\x14\x42ulkGetDataTableRows\x12\x36.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest\x1a\x37.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse\"o\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02W\"R/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkGet:\x01*\x12\x88\x02\n\x18\x42ulkReplaceDataTableRows\x12:.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest\x1a;.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse\"s\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02[\"V/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkReplace:\x01*\x12\x84\x02\n\x17\x42ulkUpdateDataTableRows\x12\x39.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest\x1a:.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse\"r\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02Z\"U/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkUpdate:\x01*\x12\xea\x01\n\x1bGetDataTableOperationErrors\x12=.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest\x1a\x33.google.cloud.chronicle.v1.DataTableOperationErrors\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/instances/*/dataTableOperationErrors/*}\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xc5\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0e\x44\x61taTableProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - CreateDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataTableRequest").msgclass - GetDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableRequest").msgclass - UpdateDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataTableRequest").msgclass - ListDataTablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTablesRequest").msgclass - DeleteDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataTableRequest").msgclass - ListDataTablesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTablesResponse").msgclass - CreateDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataTableRowRequest").msgclass - UpdateDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataTableRowRequest").msgclass - ListDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTableRowsRequest").msgclass - ListDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTableRowsResponse").msgclass - GetDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableRowRequest").msgclass - DeleteDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataTableRowRequest").msgclass - BulkCreateDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest").msgclass - BulkCreateDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse").msgclass - BulkGetDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkGetDataTableRowsRequest").msgclass - BulkGetDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkGetDataTableRowsResponse").msgclass - BulkReplaceDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest").msgclass - BulkReplaceDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse").msgclass - BulkUpdateDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest").msgclass - BulkUpdateDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse").msgclass - DataTableScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableScopeInfo").msgclass - DataTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTable").msgclass - DataTableRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableRow").msgclass - DataTableColumnInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableColumnInfo").msgclass - DataTableColumnInfo::DataTableColumnType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType").enummodule - GetDataTableOperationErrorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest").msgclass - DataTableOperationErrors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableOperationErrors").msgclass - DataTableUpdateSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableUpdateSource").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb deleted file mode 100644 index db30ac0f8aa8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/data_table_service/credentials" -require "google/cloud/chronicle/v1/data_table_service/paths" -require "google/cloud/chronicle/v1/data_table_service/client" -require "google/cloud/chronicle/v1/data_table_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # DataTableManager provides an interface for managing data tables. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/data_table_service" - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/data_table_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - module DataTableService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_table_service", "helpers.rb" -require "google/cloud/chronicle/v1/data_table_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb deleted file mode 100644 index 9575eeb78010..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb +++ /dev/null @@ -1,1915 +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/chronicle/v1/data_table_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DataTableService - ## - # Client for the DataTableService service. - # - # DataTableManager provides an interface for managing data tables. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_table_service_stub - - ## - # Configure the DataTableService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DataTableService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTableService clients - # ::Google::Cloud::Chronicle::V1::DataTableService::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", "Chronicle", "V1"] - 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_data_table.timeout = 600.0 - - default_config.rpcs.list_data_tables.timeout = 600.0 - default_config.rpcs.list_data_tables.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_table.timeout = 600.0 - default_config.rpcs.get_data_table.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_table.timeout = 600.0 - - default_config.rpcs.delete_data_table.timeout = 600.0 - - default_config.rpcs.create_data_table_row.timeout = 600.0 - - default_config.rpcs.update_data_table_row.timeout = 600.0 - - default_config.rpcs.list_data_table_rows.timeout = 600.0 - default_config.rpcs.list_data_table_rows.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_table_row.timeout = 600.0 - default_config.rpcs.get_data_table_row.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_data_table_row.timeout = 600.0 - - default_config.rpcs.bulk_create_data_table_rows.timeout = 600.0 - - default_config.rpcs.bulk_get_data_table_rows.timeout = 600.0 - default_config.rpcs.bulk_get_data_table_rows.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.bulk_replace_data_table_rows.timeout = 600.0 - - default_config.rpcs.bulk_update_data_table_rows.timeout = 600.0 - - default_config.rpcs.get_data_table_operation_errors.timeout = 600.0 - default_config.rpcs.get_data_table_operation_errors.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTableService 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::Chronicle::V1::DataTableService::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 - @data_table_service_stub.universe_domain - end - - ## - # Create a new DataTableService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTableService 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/chronicle/v1/data_table_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 - - @data_table_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::DataTableService::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 - ) - - @data_table_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_table_service_stub.logger - end - - # Service calls - - ## - # Create a new data table. - # - # @overload create_data_table(request, options = nil) - # Pass arguments to `create_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::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_data_table(parent: nil, data_table: nil, data_table_id: nil) - # Pass arguments to `create_data_table` 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 parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] - # Required. The data table being created. - # @param data_table_id [::String] - # Required. The ID to use for the data table. This is also the display name - # for the data table. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Must be unique and has length < 256. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new - # - # # Call the create_data_table method. - # result = client.create_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def create_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :create_data_table, 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 - - ## - # List data tables. - # - # @overload list_data_tables(request, options = nil) - # Pass arguments to `list_data_tables` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataTablesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::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_data_tables(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_data_tables` 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 parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param page_size [::Integer] - # Optional. The maximum number of data tables to return. The service may - # return fewer than this value. If unspecified, at most 100 data tables will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataTables` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to - # `ListDataTables` must match the call that provided the page - # token. - # @param order_by [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new - # - # # Call the list_data_tables method. - # result = client.list_data_tables 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::Chronicle::V1::DataTable. - # p item - # end - # - def list_data_tables request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTablesRequest - - # 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_data_tables.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::Chronicle::V1::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_data_tables.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_tables.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :list_data_tables, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_table_service_stub, :list_data_tables, 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 - - ## - # Get data table info. - # - # @overload get_data_table(request, options = nil) - # Pass arguments to `get_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::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_data_table(name: nil) - # Pass arguments to `get_data_table` 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 data table to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new - # - # # Call the get_data_table method. - # result = client.get_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def get_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :get_data_table, 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 - - ## - # Update data table. - # - # @overload update_data_table(request, options = nil) - # Pass arguments to `update_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::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_data_table(data_table: nil, update_mask: nil) - # Pass arguments to `update_data_table` 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 data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] - # Required. This field is used to identify the datatable to update. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of metadata fields to update. Currently data tables only - # support updating the `description`, `row_time_to_live` and `scope_info` - # fields. When no field mask is supplied, all non-empty fields will be - # updated. A field mask of "*" will update all fields, whether empty or not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new - # - # # Call the update_data_table method. - # result = client.update_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def update_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest - - # 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_data_table.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::Chronicle::V1::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.data_table&.name - header_params["data_table.name"] = request.data_table.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_data_table.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :update_data_table, 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 - - ## - # Delete data table. - # - # @overload delete_data_table(request, options = nil) - # Pass arguments to `delete_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::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_data_table(name: nil, force: nil) - # Pass arguments to `delete_data_table` 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 data table to delete. - # Format - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - # @param force [::Boolean] - # Optional. If set to true, any rows under this data table will also be - # deleted. (Otherwise, the request will only work if the data table has no - # rows.) - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new - # - # # Call the delete_data_table method. - # result = client.delete_data_table request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :delete_data_table, 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 - - ## - # Create a new data table row. - # - # @overload create_data_table_row(request, options = nil) - # Pass arguments to `create_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::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_data_table_row(parent: nil, data_table_row: nil) - # Pass arguments to `create_data_table_row` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] - # Required. The data table row to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new - # - # # Call the create_data_table_row method. - # result = client.create_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def create_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :create_data_table_row, 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 - - ## - # Update data table row - # - # @overload update_data_table_row(request, options = nil) - # Pass arguments to `update_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::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_data_table_row(data_table_row: nil, update_mask: nil) - # Pass arguments to `update_data_table_row` 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 data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] - # Required. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. Currently data table rows only - # support updating the `values` field. When no field mask is supplied, all - # non-empty fields will be updated. A field mask of "*" will update all - # fields, whether empty or not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new - # - # # Call the update_data_table_row method. - # result = client.update_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def update_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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.data_table_row&.name - header_params["data_table_row.name"] = request.data_table_row.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_data_table_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :update_data_table_row, 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 - - ## - # List data table rows. - # - # @overload list_data_table_rows(request, options = nil) - # Pass arguments to `list_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::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_data_table_rows(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_data_table_rows` 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 id of the data table. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @param page_size [::Integer] - # Optional. The maximum number of data table rows to return. The service may - # return fewer than this value. If unspecified, at most 100 data table rows - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataTableRows` call. - # @param order_by [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - # @param filter [::String] - # Optional. Filter facilitating search over data table rows. This filter - # performs a case-insensitive substring match on the row values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new - # - # # Call the list_data_table_rows method. - # result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. - # p item - # end - # - def list_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest - - # 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_data_table_rows.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::Chronicle::V1::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_data_table_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :list_data_table_rows, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_table_service_stub, :list_data_table_rows, 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 - - ## - # Get data table row - # - # @overload get_data_table_row(request, options = nil) - # Pass arguments to `get_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::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_data_table_row(name: nil) - # Pass arguments to `get_data_table_row` 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 data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new - # - # # Call the get_data_table_row method. - # result = client.get_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def get_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :get_data_table_row, 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 - - ## - # Delete data table row. - # - # @overload delete_data_table_row(request, options = nil) - # Pass arguments to `delete_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::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_data_table_row(name: nil) - # Pass arguments to `delete_data_table_row` 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 data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new - # - # # Call the delete_data_table_row method. - # result = client.delete_data_table_row request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :delete_data_table_row, 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 - - ## - # Create data table rows in bulk. - # - # @overload bulk_create_data_table_rows(request, options = nil) - # Pass arguments to `bulk_create_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::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 bulk_create_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_create_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] - # Required. Data table rows to create. A maximum of 1000 rows (for sync - # requests) or 2000 rows (for async requests) can be created in a single - # request. Total size of the rows should be less than 4MB. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new - # - # # Call the bulk_create_data_table_rows method. - # result = client.bulk_create_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. - # p result - # - def bulk_create_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest - - # 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.bulk_create_data_table_rows.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::Chronicle::V1::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.bulk_create_data_table_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_create_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :bulk_create_data_table_rows, 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 - - ## - # Get data table rows in bulk. - # - # @overload bulk_get_data_table_rows(request, options = nil) - # Pass arguments to `bulk_get_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::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 bulk_get_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_get_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Hash>] - # Required. Data table rows to get. At max 1,000 rows can be there in a - # request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new - # - # # Call the bulk_get_data_table_rows method. - # result = client.bulk_get_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. - # p result - # - def bulk_get_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest - - # 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.bulk_get_data_table_rows.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::Chronicle::V1::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.bulk_get_data_table_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_get_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :bulk_get_data_table_rows, 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 - - ## - # Replace all existing data table rows with new data table rows. - # - # @overload bulk_replace_data_table_rows(request, options = nil) - # Pass arguments to `bulk_replace_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::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 bulk_replace_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_replace_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] - # Required. Data table rows to replace the existing data table rows. A - # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) - # can be replaced in a single request. Total size of the rows should be less - # than 4MB. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new - # - # # Call the bulk_replace_data_table_rows method. - # result = client.bulk_replace_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. - # p result - # - def bulk_replace_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest - - # 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.bulk_replace_data_table_rows.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::Chronicle::V1::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.bulk_replace_data_table_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_replace_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :bulk_replace_data_table_rows, 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 - - ## - # Update data table rows in bulk. - # - # @overload bulk_update_data_table_rows(request, options = nil) - # Pass arguments to `bulk_update_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::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 bulk_update_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_update_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Hash>] - # Required. Data table rows to update. At max 1,000 rows (or rows with size - # less than 2MB) can be there in a request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new - # - # # Call the bulk_update_data_table_rows method. - # result = client.bulk_update_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. - # p result - # - def bulk_update_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest - - # 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.bulk_update_data_table_rows.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::Chronicle::V1::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.bulk_update_data_table_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_update_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :bulk_update_data_table_rows, 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 - - ## - # Get the error for a data table operation. - # - # @overload get_data_table_operation_errors(request, options = nil) - # Pass arguments to `get_data_table_operation_errors` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::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_data_table_operation_errors(name: nil) - # Pass arguments to `get_data_table_operation_errors` 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 data table operation errors. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new - # - # # Call the get_data_table_operation_errors method. - # result = client.get_data_table_operation_errors request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. - # p result - # - def get_data_table_operation_errors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest - - # 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_data_table_operation_errors.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::Chronicle::V1::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_data_table_operation_errors.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_table_operation_errors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :get_data_table_operation_errors, 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 - - ## - # Configuration class for the DataTableService API. - # - # This class represents the configuration for DataTableService, - # 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::Chronicle::V1::DataTableService::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_data_table to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DataTableService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_table.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_table.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::Chronicle::V1::DataTableService::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. - # * `: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 = "chronicle.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 DataTableService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_table - ## - # RPC-specific configuration for `list_data_tables` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_tables - ## - # RPC-specific configuration for `get_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table - ## - # RPC-specific configuration for `update_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_table - ## - # RPC-specific configuration for `delete_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_table - ## - # RPC-specific configuration for `create_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_table_row - ## - # RPC-specific configuration for `update_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_table_row - ## - # RPC-specific configuration for `list_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_table_rows - ## - # RPC-specific configuration for `get_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table_row - ## - # RPC-specific configuration for `delete_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_table_row - ## - # RPC-specific configuration for `bulk_create_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_create_data_table_rows - ## - # RPC-specific configuration for `bulk_get_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_get_data_table_rows - ## - # RPC-specific configuration for `bulk_replace_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_replace_data_table_rows - ## - # RPC-specific configuration for `bulk_update_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_update_data_table_rows - ## - # RPC-specific configuration for `get_data_table_operation_errors` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table_operation_errors - - # @private - def initialize parent_rpcs = nil - create_data_table_config = parent_rpcs.create_data_table if parent_rpcs.respond_to? :create_data_table - @create_data_table = ::Gapic::Config::Method.new create_data_table_config - list_data_tables_config = parent_rpcs.list_data_tables if parent_rpcs.respond_to? :list_data_tables - @list_data_tables = ::Gapic::Config::Method.new list_data_tables_config - get_data_table_config = parent_rpcs.get_data_table if parent_rpcs.respond_to? :get_data_table - @get_data_table = ::Gapic::Config::Method.new get_data_table_config - update_data_table_config = parent_rpcs.update_data_table if parent_rpcs.respond_to? :update_data_table - @update_data_table = ::Gapic::Config::Method.new update_data_table_config - delete_data_table_config = parent_rpcs.delete_data_table if parent_rpcs.respond_to? :delete_data_table - @delete_data_table = ::Gapic::Config::Method.new delete_data_table_config - create_data_table_row_config = parent_rpcs.create_data_table_row if parent_rpcs.respond_to? :create_data_table_row - @create_data_table_row = ::Gapic::Config::Method.new create_data_table_row_config - update_data_table_row_config = parent_rpcs.update_data_table_row if parent_rpcs.respond_to? :update_data_table_row - @update_data_table_row = ::Gapic::Config::Method.new update_data_table_row_config - list_data_table_rows_config = parent_rpcs.list_data_table_rows if parent_rpcs.respond_to? :list_data_table_rows - @list_data_table_rows = ::Gapic::Config::Method.new list_data_table_rows_config - get_data_table_row_config = parent_rpcs.get_data_table_row if parent_rpcs.respond_to? :get_data_table_row - @get_data_table_row = ::Gapic::Config::Method.new get_data_table_row_config - delete_data_table_row_config = parent_rpcs.delete_data_table_row if parent_rpcs.respond_to? :delete_data_table_row - @delete_data_table_row = ::Gapic::Config::Method.new delete_data_table_row_config - bulk_create_data_table_rows_config = parent_rpcs.bulk_create_data_table_rows if parent_rpcs.respond_to? :bulk_create_data_table_rows - @bulk_create_data_table_rows = ::Gapic::Config::Method.new bulk_create_data_table_rows_config - bulk_get_data_table_rows_config = parent_rpcs.bulk_get_data_table_rows if parent_rpcs.respond_to? :bulk_get_data_table_rows - @bulk_get_data_table_rows = ::Gapic::Config::Method.new bulk_get_data_table_rows_config - bulk_replace_data_table_rows_config = parent_rpcs.bulk_replace_data_table_rows if parent_rpcs.respond_to? :bulk_replace_data_table_rows - @bulk_replace_data_table_rows = ::Gapic::Config::Method.new bulk_replace_data_table_rows_config - bulk_update_data_table_rows_config = parent_rpcs.bulk_update_data_table_rows if parent_rpcs.respond_to? :bulk_update_data_table_rows - @bulk_update_data_table_rows = ::Gapic::Config::Method.new bulk_update_data_table_rows_config - get_data_table_operation_errors_config = parent_rpcs.get_data_table_operation_errors if parent_rpcs.respond_to? :get_data_table_operation_errors - @get_data_table_operation_errors = ::Gapic::Config::Method.new get_data_table_operation_errors_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb deleted file mode 100644 index 1ed772b14e1b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb +++ /dev/null @@ -1,49 +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 Chronicle - module V1 - module DataTableService - # Credentials for the DataTableService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/chronicle", - "https://www.googleapis.com/auth/chronicle.readonly", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb deleted file mode 100644 index 9d9e63d2bcae..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb +++ /dev/null @@ -1,138 +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 Chronicle - module V1 - module DataTableService - # Path helper methods for the DataTableService API. - module Paths - ## - # Create a fully-qualified DataAccessScope resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_scope [String] - # - # @return [::String] - def data_access_scope_path project:, location:, instance:, data_access_scope: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" - end - - ## - # Create a fully-qualified DataTable resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_table [String] - # - # @return [::String] - def data_table_path project:, location:, instance:, data_table: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataTables/#{data_table}" - end - - ## - # Create a fully-qualified DataTableOperationErrors resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_table_operation_errors [String] - # - # @return [::String] - def data_table_operation_errors_path project:, location:, instance:, data_table_operation_errors: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataTableOperationErrors/#{data_table_operation_errors}" - end - - ## - # Create a fully-qualified DataTableRow resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_table [String] - # @param data_table_row [String] - # - # @return [::String] - def data_table_row_path project:, location:, instance:, data_table:, data_table_row: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - raise ::ArgumentError, "data_table cannot contain /" if data_table.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataTables/#{data_table}/dataTableRows/#{data_table_row}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb deleted file mode 100644 index 9f355abee4eb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/data_table_service/credentials" -require "google/cloud/chronicle/v1/data_table_service/paths" -require "google/cloud/chronicle/v1/data_table_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # DataTableManager provides an interface for managing data tables. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/data_table_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - module DataTableService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/data_table_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb deleted file mode 100644 index 30ed96d59257..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb +++ /dev/null @@ -1,1767 +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/chronicle/v1/data_table_pb" -require "google/cloud/chronicle/v1/data_table_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module DataTableService - module Rest - ## - # REST client for the DataTableService service. - # - # DataTableManager provides an interface for managing data tables. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_table_service_stub - - ## - # Configure the DataTableService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTableService clients - # ::Google::Cloud::Chronicle::V1::DataTableService::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", "Chronicle", "V1"] - 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_data_table.timeout = 600.0 - - default_config.rpcs.list_data_tables.timeout = 600.0 - default_config.rpcs.list_data_tables.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_table.timeout = 600.0 - default_config.rpcs.get_data_table.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_table.timeout = 600.0 - - default_config.rpcs.delete_data_table.timeout = 600.0 - - default_config.rpcs.create_data_table_row.timeout = 600.0 - - default_config.rpcs.update_data_table_row.timeout = 600.0 - - default_config.rpcs.list_data_table_rows.timeout = 600.0 - default_config.rpcs.list_data_table_rows.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_table_row.timeout = 600.0 - default_config.rpcs.get_data_table_row.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_data_table_row.timeout = 600.0 - - default_config.rpcs.bulk_create_data_table_rows.timeout = 600.0 - - default_config.rpcs.bulk_get_data_table_rows.timeout = 600.0 - default_config.rpcs.bulk_get_data_table_rows.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.bulk_replace_data_table_rows.timeout = 600.0 - - default_config.rpcs.bulk_update_data_table_rows.timeout = 600.0 - - default_config.rpcs.get_data_table_operation_errors.timeout = 600.0 - default_config.rpcs.get_data_table_operation_errors.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTableService 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::Chronicle::V1::DataTableService::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 - @data_table_service_stub.universe_domain - end - - ## - # Create a new DataTableService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTableService 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 - - @data_table_service_stub = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_table_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_table_service_stub.logger - end - - # Service calls - - ## - # Create a new data table. - # - # @overload create_data_table(request, options = nil) - # Pass arguments to `create_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::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_data_table(parent: nil, data_table: nil, data_table_id: nil) - # Pass arguments to `create_data_table` 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 parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] - # Required. The data table being created. - # @param data_table_id [::String] - # Required. The ID to use for the data table. This is also the display name - # for the data table. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Must be unique and has length < 256. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new - # - # # Call the create_data_table method. - # result = client.create_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def create_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.create_data_table 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 - - ## - # List data tables. - # - # @overload list_data_tables(request, options = nil) - # Pass arguments to `list_data_tables` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataTablesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::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_data_tables(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_data_tables` 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 parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param page_size [::Integer] - # Optional. The maximum number of data tables to return. The service may - # return fewer than this value. If unspecified, at most 100 data tables will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataTables` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to - # `ListDataTables` must match the call that provided the page - # token. - # @param order_by [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new - # - # # Call the list_data_tables method. - # result = client.list_data_tables 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::Chronicle::V1::DataTable. - # p item - # end - # - def list_data_tables request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTablesRequest - - # 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_data_tables.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::Chronicle::V1::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_data_tables.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_tables.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.list_data_tables request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_table_service_stub, :list_data_tables, "data_tables", 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 - - ## - # Get data table info. - # - # @overload get_data_table(request, options = nil) - # Pass arguments to `get_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::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_data_table(name: nil) - # Pass arguments to `get_data_table` 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 data table to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new - # - # # Call the get_data_table method. - # result = client.get_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def get_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.get_data_table 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 - - ## - # Update data table. - # - # @overload update_data_table(request, options = nil) - # Pass arguments to `update_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::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_data_table(data_table: nil, update_mask: nil) - # Pass arguments to `update_data_table` 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 data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] - # Required. This field is used to identify the datatable to update. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of metadata fields to update. Currently data tables only - # support updating the `description`, `row_time_to_live` and `scope_info` - # fields. When no field mask is supplied, all non-empty fields will be - # updated. A field mask of "*" will update all fields, whether empty or not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new - # - # # Call the update_data_table method. - # result = client.update_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def update_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.update_data_table 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 - - ## - # Delete data table. - # - # @overload delete_data_table(request, options = nil) - # Pass arguments to `delete_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::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_data_table(name: nil, force: nil) - # Pass arguments to `delete_data_table` 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 data table to delete. - # Format - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - # @param force [::Boolean] - # Optional. If set to true, any rows under this data table will also be - # deleted. (Otherwise, the request will only work if the data table has no - # rows.) - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new - # - # # Call the delete_data_table method. - # result = client.delete_data_table request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.delete_data_table 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 - - ## - # Create a new data table row. - # - # @overload create_data_table_row(request, options = nil) - # Pass arguments to `create_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::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_data_table_row(parent: nil, data_table_row: nil) - # Pass arguments to `create_data_table_row` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] - # Required. The data table row to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new - # - # # Call the create_data_table_row method. - # result = client.create_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def create_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.create_data_table_row 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 - - ## - # Update data table row - # - # @overload update_data_table_row(request, options = nil) - # Pass arguments to `update_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::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_data_table_row(data_table_row: nil, update_mask: nil) - # Pass arguments to `update_data_table_row` 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 data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] - # Required. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. Currently data table rows only - # support updating the `values` field. When no field mask is supplied, all - # non-empty fields will be updated. A field mask of "*" will update all - # fields, whether empty or not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new - # - # # Call the update_data_table_row method. - # result = client.update_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def update_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.update_data_table_row 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 - - ## - # List data table rows. - # - # @overload list_data_table_rows(request, options = nil) - # Pass arguments to `list_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::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_data_table_rows(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_data_table_rows` 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 id of the data table. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @param page_size [::Integer] - # Optional. The maximum number of data table rows to return. The service may - # return fewer than this value. If unspecified, at most 100 data table rows - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataTableRows` call. - # @param order_by [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - # @param filter [::String] - # Optional. Filter facilitating search over data table rows. This filter - # performs a case-insensitive substring match on the row values. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new - # - # # Call the list_data_table_rows method. - # result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. - # p item - # end - # - def list_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest - - # 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_data_table_rows.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::Chronicle::V1::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_data_table_rows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.list_data_table_rows request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_table_service_stub, :list_data_table_rows, "data_table_rows", 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 - - ## - # Get data table row - # - # @overload get_data_table_row(request, options = nil) - # Pass arguments to `get_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::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_data_table_row(name: nil) - # Pass arguments to `get_data_table_row` 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 data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new - # - # # Call the get_data_table_row method. - # result = client.get_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def get_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.get_data_table_row 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 - - ## - # Delete data table row. - # - # @overload delete_data_table_row(request, options = nil) - # Pass arguments to `delete_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::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_data_table_row(name: nil) - # Pass arguments to `delete_data_table_row` 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 data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new - # - # # Call the delete_data_table_row method. - # result = client.delete_data_table_row request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.delete_data_table_row 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 - - ## - # Create data table rows in bulk. - # - # @overload bulk_create_data_table_rows(request, options = nil) - # Pass arguments to `bulk_create_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::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 bulk_create_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_create_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] - # Required. Data table rows to create. A maximum of 1000 rows (for sync - # requests) or 2000 rows (for async requests) can be created in a single - # request. Total size of the rows should be less than 4MB. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new - # - # # Call the bulk_create_data_table_rows method. - # result = client.bulk_create_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. - # p result - # - def bulk_create_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest - - # 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.bulk_create_data_table_rows.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::Chronicle::V1::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.bulk_create_data_table_rows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_create_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.bulk_create_data_table_rows 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 - - ## - # Get data table rows in bulk. - # - # @overload bulk_get_data_table_rows(request, options = nil) - # Pass arguments to `bulk_get_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::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 bulk_get_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_get_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Hash>] - # Required. Data table rows to get. At max 1,000 rows can be there in a - # request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new - # - # # Call the bulk_get_data_table_rows method. - # result = client.bulk_get_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. - # p result - # - def bulk_get_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest - - # 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.bulk_get_data_table_rows.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::Chronicle::V1::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.bulk_get_data_table_rows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_get_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.bulk_get_data_table_rows 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 - - ## - # Replace all existing data table rows with new data table rows. - # - # @overload bulk_replace_data_table_rows(request, options = nil) - # Pass arguments to `bulk_replace_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::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 bulk_replace_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_replace_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] - # Required. Data table rows to replace the existing data table rows. A - # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) - # can be replaced in a single request. Total size of the rows should be less - # than 4MB. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new - # - # # Call the bulk_replace_data_table_rows method. - # result = client.bulk_replace_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. - # p result - # - def bulk_replace_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest - - # 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.bulk_replace_data_table_rows.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::Chronicle::V1::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.bulk_replace_data_table_rows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_replace_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.bulk_replace_data_table_rows 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 - - ## - # Update data table rows in bulk. - # - # @overload bulk_update_data_table_rows(request, options = nil) - # Pass arguments to `bulk_update_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::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 bulk_update_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_update_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Hash>] - # Required. Data table rows to update. At max 1,000 rows (or rows with size - # less than 2MB) can be there in a request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new - # - # # Call the bulk_update_data_table_rows method. - # result = client.bulk_update_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. - # p result - # - def bulk_update_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest - - # 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.bulk_update_data_table_rows.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::Chronicle::V1::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.bulk_update_data_table_rows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_update_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.bulk_update_data_table_rows 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 - - ## - # Get the error for a data table operation. - # - # @overload get_data_table_operation_errors(request, options = nil) - # Pass arguments to `get_data_table_operation_errors` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::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_data_table_operation_errors(name: nil) - # Pass arguments to `get_data_table_operation_errors` 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 data table operation errors. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new - # - # # Call the get_data_table_operation_errors method. - # result = client.get_data_table_operation_errors request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. - # p result - # - def get_data_table_operation_errors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest - - # 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_data_table_operation_errors.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::Chronicle::V1::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_data_table_operation_errors.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_table_operation_errors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.get_data_table_operation_errors 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 - - ## - # Configuration class for the DataTableService REST API. - # - # This class represents the configuration for DataTableService 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::Chronicle::V1::DataTableService::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_data_table to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_table.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_table.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. - # * `: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 = "chronicle.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 DataTableService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_table - ## - # RPC-specific configuration for `list_data_tables` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_tables - ## - # RPC-specific configuration for `get_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table - ## - # RPC-specific configuration for `update_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_table - ## - # RPC-specific configuration for `delete_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_table - ## - # RPC-specific configuration for `create_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_table_row - ## - # RPC-specific configuration for `update_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_table_row - ## - # RPC-specific configuration for `list_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_table_rows - ## - # RPC-specific configuration for `get_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table_row - ## - # RPC-specific configuration for `delete_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_table_row - ## - # RPC-specific configuration for `bulk_create_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_create_data_table_rows - ## - # RPC-specific configuration for `bulk_get_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_get_data_table_rows - ## - # RPC-specific configuration for `bulk_replace_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_replace_data_table_rows - ## - # RPC-specific configuration for `bulk_update_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_update_data_table_rows - ## - # RPC-specific configuration for `get_data_table_operation_errors` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table_operation_errors - - # @private - def initialize parent_rpcs = nil - create_data_table_config = parent_rpcs.create_data_table if parent_rpcs.respond_to? :create_data_table - @create_data_table = ::Gapic::Config::Method.new create_data_table_config - list_data_tables_config = parent_rpcs.list_data_tables if parent_rpcs.respond_to? :list_data_tables - @list_data_tables = ::Gapic::Config::Method.new list_data_tables_config - get_data_table_config = parent_rpcs.get_data_table if parent_rpcs.respond_to? :get_data_table - @get_data_table = ::Gapic::Config::Method.new get_data_table_config - update_data_table_config = parent_rpcs.update_data_table if parent_rpcs.respond_to? :update_data_table - @update_data_table = ::Gapic::Config::Method.new update_data_table_config - delete_data_table_config = parent_rpcs.delete_data_table if parent_rpcs.respond_to? :delete_data_table - @delete_data_table = ::Gapic::Config::Method.new delete_data_table_config - create_data_table_row_config = parent_rpcs.create_data_table_row if parent_rpcs.respond_to? :create_data_table_row - @create_data_table_row = ::Gapic::Config::Method.new create_data_table_row_config - update_data_table_row_config = parent_rpcs.update_data_table_row if parent_rpcs.respond_to? :update_data_table_row - @update_data_table_row = ::Gapic::Config::Method.new update_data_table_row_config - list_data_table_rows_config = parent_rpcs.list_data_table_rows if parent_rpcs.respond_to? :list_data_table_rows - @list_data_table_rows = ::Gapic::Config::Method.new list_data_table_rows_config - get_data_table_row_config = parent_rpcs.get_data_table_row if parent_rpcs.respond_to? :get_data_table_row - @get_data_table_row = ::Gapic::Config::Method.new get_data_table_row_config - delete_data_table_row_config = parent_rpcs.delete_data_table_row if parent_rpcs.respond_to? :delete_data_table_row - @delete_data_table_row = ::Gapic::Config::Method.new delete_data_table_row_config - bulk_create_data_table_rows_config = parent_rpcs.bulk_create_data_table_rows if parent_rpcs.respond_to? :bulk_create_data_table_rows - @bulk_create_data_table_rows = ::Gapic::Config::Method.new bulk_create_data_table_rows_config - bulk_get_data_table_rows_config = parent_rpcs.bulk_get_data_table_rows if parent_rpcs.respond_to? :bulk_get_data_table_rows - @bulk_get_data_table_rows = ::Gapic::Config::Method.new bulk_get_data_table_rows_config - bulk_replace_data_table_rows_config = parent_rpcs.bulk_replace_data_table_rows if parent_rpcs.respond_to? :bulk_replace_data_table_rows - @bulk_replace_data_table_rows = ::Gapic::Config::Method.new bulk_replace_data_table_rows_config - bulk_update_data_table_rows_config = parent_rpcs.bulk_update_data_table_rows if parent_rpcs.respond_to? :bulk_update_data_table_rows - @bulk_update_data_table_rows = ::Gapic::Config::Method.new bulk_update_data_table_rows_config - get_data_table_operation_errors_config = parent_rpcs.get_data_table_operation_errors if parent_rpcs.respond_to? :get_data_table_operation_errors - @get_data_table_operation_errors = ::Gapic::Config::Method.new get_data_table_operation_errors_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb deleted file mode 100644 index 110794e9d528..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb +++ /dev/null @@ -1,1004 +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/chronicle/v1/data_table_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DataTableService - module Rest - ## - # REST service stub for the DataTableService 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_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRequest] - # 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::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # A result object deserialized from the server's reply - def create_data_table request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_table_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_data_table", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_tables REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTablesRequest] - # 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::Chronicle::V1::ListDataTablesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListDataTablesResponse] - # A result object deserialized from the server's reply - def list_data_tables request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_tables_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_data_tables", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.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_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRequest] - # 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::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # A result object deserialized from the server's reply - def get_data_table request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_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_data_table", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest] - # 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::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # A result object deserialized from the server's reply - def update_data_table request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_table_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_data_table", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest] - # 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_data_table request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_table_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_data_table", - 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 create_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest] - # 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::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # A result object deserialized from the server's reply - def create_data_table_row request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_table_row_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_data_table_row", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest] - # 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::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # A result object deserialized from the server's reply - def update_data_table_row request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_table_row_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_data_table_row", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest] - # 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::Chronicle::V1::ListDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse] - # A result object deserialized from the server's reply - def list_data_table_rows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_table_rows_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_data_table_rows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.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_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest] - # 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::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # A result object deserialized from the server's reply - def get_data_table_row request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_row_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_data_table_row", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest] - # 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_data_table_row request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_table_row_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_data_table_row", - 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 bulk_create_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest] - # 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::Chronicle::V1::BulkCreateDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] - # A result object deserialized from the server's reply - def bulk_create_data_table_rows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_create_data_table_rows_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: "bulk_create_data_table_rows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the bulk_get_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest] - # 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::Chronicle::V1::BulkGetDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] - # A result object deserialized from the server's reply - def bulk_get_data_table_rows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_get_data_table_rows_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: "bulk_get_data_table_rows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the bulk_replace_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest] - # 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::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # A result object deserialized from the server's reply - def bulk_replace_data_table_rows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_replace_data_table_rows_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: "bulk_replace_data_table_rows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the bulk_update_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest] - # 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::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # A result object deserialized from the server's reply - def bulk_update_data_table_rows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_update_data_table_rows_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: "bulk_update_data_table_rows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.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_data_table_operation_errors REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest] - # 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::Chronicle::V1::DataTableOperationErrors] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] - # A result object deserialized from the server's reply - def get_data_table_operation_errors request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_operation_errors_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_data_table_operation_errors", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.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_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRequest] - # 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_data_table_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTables", - body: "data_table", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_tables REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTablesRequest] - # 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_data_tables_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataTables", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRequest] - # 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_data_table_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest] - # 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_data_table_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_table.name}", - body: "data_table", - matches: [ - ["data_table.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest] - # 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_data_table_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest] - # 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_data_table_row_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTableRows", - body: "data_table_row", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest] - # 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_data_table_row_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_table_row.name}", - body: "data_table_row", - matches: [ - ["data_table_row.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest] - # 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_data_table_rows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataTableRows", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest] - # 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_data_table_row_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest] - # 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_data_table_row_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_create_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_create_data_table_rows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTableRows:bulkCreate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_get_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_get_data_table_rows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTableRows:bulkGet", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_replace_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_replace_data_table_rows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTableRows:bulkReplace", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_update_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_update_data_table_rows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTableRows:bulkUpdate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_table_operation_errors REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest] - # 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_data_table_operation_errors_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTableOperationErrors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb deleted file mode 100644 index 39896c092027..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb +++ /dev/null @@ -1,73 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/data_table.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# 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 -# -# 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/chronicle/v1/data_table_pb' - -module Google - module Cloud - module Chronicle - module V1 - module DataTableService - # DataTableManager provides an interface for managing data tables. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.DataTableService' - - # Create a new data table. - rpc :CreateDataTable, ::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable - # List data tables. - rpc :ListDataTables, ::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::Google::Cloud::Chronicle::V1::ListDataTablesResponse - # Get data table info. - rpc :GetDataTable, ::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable - # Update data table. - rpc :UpdateDataTable, ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable - # Delete data table. - rpc :DeleteDataTable, ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::Google::Protobuf::Empty - # Create a new data table row. - rpc :CreateDataTableRow, ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow - # Update data table row - rpc :UpdateDataTableRow, ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow - # List data table rows. - rpc :ListDataTableRows, ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse - # Get data table row - rpc :GetDataTableRow, ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow - # Delete data table row. - rpc :DeleteDataTableRow, ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::Google::Protobuf::Empty - # Create data table rows in bulk. - rpc :BulkCreateDataTableRows, ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse - # Get data table rows in bulk. - rpc :BulkGetDataTableRows, ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse - # Replace all existing data table rows with new data table rows. - rpc :BulkReplaceDataTableRows, ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse - # Update data table rows in bulk. - rpc :BulkUpdateDataTableRows, ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse - # Get the error for a data table operation. - rpc :GetDataTableOperationErrors, ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::Google::Cloud::Chronicle::V1::DataTableOperationErrors - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb deleted file mode 100644 index 80fdf542b870..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/entity.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/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/chronicle/v1/entity.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\x06\n\tWatchlist\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12multiplying_factor\x18\x05 \x01(\x02\x42\x03\xe0\x41\x01\x12h\n\x1b\x65ntity_population_mechanism\x18\x06 \x01(\x0b\x32>.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanismB\x03\xe0\x41\x02\x12K\n\x0c\x65ntity_count\x18\x07 \x01(\x0b\x32\x30.google.cloud.chronicle.v1.Watchlist.EntityCountB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\\\n\x1awatchlist_user_preferences\x18\n \x01(\x0b\x32\x33.google.cloud.chronicle.v1.WatchlistUserPreferencesB\x03\xe0\x41\x01\x1a\x90\x01\n\x19\x45ntityPopulationMechanism\x12\\\n\x06manual\x18\x01 \x01(\x0b\x32\x45.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.ManualB\x03\xe0\x41\x01H\x00\x1a\x08\n\x06ManualB\x0b\n\tmechanism\x1a\x34\n\x0b\x45ntityCount\x12\x11\n\x04user\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x12\n\x05\x61sset\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03:\x94\x01\xea\x41\x90\x01\n\"chronicle.googleapis.com/Watchlist\x12Sprojects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}*\nwatchlists2\twatchlist\"/\n\x18WatchlistUserPreferences\x12\x13\n\x06pinned\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x13GetWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\"\x99\x01\n\x15ListWatchlistsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"u\n\x16ListWatchlistsResponse\x12=\n\nwatchlists\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n\x16\x43reateWatchlistRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\x12\x19\n\x0cwatchlist_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12<\n\twatchlist\x18\x03 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\"\x8c\x01\n\x16UpdateWatchlistRequest\x12<\n\twatchlist\x18\x01 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x16\x44\x65leteWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x32\xbe\x08\n\rEntityService\x12\xaf\x01\n\x0cGetWatchlist\x12..google.cloud.chronicle.v1.GetWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x12\xc2\x01\n\x0eListWatchlists\x12\x30.google.cloud.chronicle.v1.ListWatchlistsRequest\x1a\x31.google.cloud.chronicle.v1.ListWatchlistsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/watchlists\x12\xd9\x01\n\x0f\x43reateWatchlist\x12\x31.google.cloud.chronicle.v1.CreateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"m\xda\x41\x1dparent,watchlist,watchlist_id\x82\xd3\xe4\x93\x02G\":/v1/{parent=projects/*/locations/*/instances/*}/watchlists:\twatchlist\x12\xdb\x01\n\x0fUpdateWatchlist\x12\x31.google.cloud.chronicle.v1.UpdateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"o\xda\x41\x15watchlist,update_mask\x82\xd3\xe4\x93\x02Q2D/v1/{watchlist.name=projects/*/locations/*/instances/*/watchlists/*}:\twatchlist\x12\xad\x01\n\x0f\x44\x65leteWatchlist\x12\x31.google.cloud.chronicle.v1.DeleteWatchlistRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\nname,force\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc2\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0b\x45ntityProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - Watchlist = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist").msgclass - Watchlist::EntityPopulationMechanism = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism").msgclass - Watchlist::EntityPopulationMechanism::Manual = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual").msgclass - Watchlist::EntityCount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityCount").msgclass - WatchlistUserPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.WatchlistUserPreferences").msgclass - GetWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetWatchlistRequest").msgclass - ListWatchlistsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsRequest").msgclass - ListWatchlistsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsResponse").msgclass - CreateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateWatchlistRequest").msgclass - UpdateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateWatchlistRequest").msgclass - DeleteWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteWatchlistRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb deleted file mode 100644 index 5dd703d38f49..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/entity_service/credentials" -require "google/cloud/chronicle/v1/entity_service/paths" -require "google/cloud/chronicle/v1/entity_service/client" -require "google/cloud/chronicle/v1/entity_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # EntityService contains apis for finding entities. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/entity_service" - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/entity_service/rest" - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - module EntityService - end - end - end - end -end - -helper_path = ::File.join __dir__, "entity_service", "helpers.rb" -require "google/cloud/chronicle/v1/entity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb deleted file mode 100644 index 58bdcbe09913..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb +++ /dev/null @@ -1,908 +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/chronicle/v1/entity_pb" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - ## - # Client for the EntityService service. - # - # EntityService contains apis for finding entities. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :entity_service_stub - - ## - # Configure the EntityService Client class. - # - # See {::Google::Cloud::Chronicle::V1::EntityService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EntityService clients - # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] - 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.get_watchlist.timeout = 90.0 - default_config.rpcs.get_watchlist.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_watchlists.timeout = 90.0 - default_config.rpcs.list_watchlists.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_watchlist.timeout = 90.0 - - default_config.rpcs.update_watchlist.timeout = 90.0 - - default_config.rpcs.delete_watchlist.timeout = 90.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EntityService 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::Chronicle::V1::EntityService::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 - @entity_service_stub.universe_domain - end - - ## - # Create a new EntityService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EntityService 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/chronicle/v1/entity_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 - - @entity_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::EntityService::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 - ) - - @entity_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @entity_service_stub.logger - end - - # Service calls - - ## - # Gets watchlist details for the given watchlist ID. - # - # @overload get_watchlist(request, options = nil) - # Pass arguments to `get_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::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_watchlist(name: nil) - # Pass arguments to `get_watchlist` 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 parent, which owns this collection of watchlists. - # The name of the watchlist to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new - # - # # Call the get_watchlist method. - # result = client.get_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def get_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :get_watchlist, 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 all watchlists for the given instance. - # - # @overload list_watchlists(request, options = nil) - # Pass arguments to `list_watchlists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_watchlists` 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 parent, which owns this collection of watchlists. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # Optional. The maximum number of watchlists to return. - # The service may return fewer than this value. - # If unspecified, at most 200 watchlists will be returned. - # The maximum value is 200; values above 200 will be coerced to 200. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListWatchlists` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListWatchlists` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Which watchlist to return in aip.dev/160 form. - # Currently, only the following filters are supported: - # - `watchlist_user_preferences.pinned=true` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new - # - # # Call the list_watchlists method. - # result = client.list_watchlists 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::Chronicle::V1::Watchlist. - # p item - # end - # - def list_watchlists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest - - # 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_watchlists.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::Chronicle::V1::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_watchlists.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_watchlists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :list_watchlists, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @entity_service_stub, :list_watchlists, 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 - - ## - # Creates a watchlist for the given instance. - # Note that there can be at most 200 watchlists per instance. - # - # @overload create_watchlist(request, options = nil) - # Pass arguments to `create_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) - # Pass arguments to `create_watchlist` 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 parent resource where this watchlist will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param watchlist_id [::String] - # Optional. The ID to use for the watchlist, - # which will become the final component of the watchlist's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new - # - # # Call the create_watchlist method. - # result = client.create_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def create_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :create_watchlist, 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 - - ## - # Updates the watchlist for the given instance. - # - # @overload update_watchlist(request, options = nil) - # Pass arguments to `update_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::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_watchlist(watchlist: nil, update_mask: nil) - # Pass arguments to `update_watchlist` 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 watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to update. - # - # The watchlist's `name` field is used to identify the watchlist to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new - # - # # Call the update_watchlist method. - # result = client.update_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def update_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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.watchlist&.name - header_params["watchlist.name"] = request.watchlist.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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :update_watchlist, 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 the watchlist for the given instance. - # - # @overload delete_watchlist(request, options = nil) - # Pass arguments to `delete_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::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_watchlist(name: nil, force: nil) - # Pass arguments to `delete_watchlist` 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 name of the watchlist to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param force [::Boolean] - # Optional. If set to true, any entities under this watchlist will also be - # deleted. (Otherwise, the request will only work if the watchlist has no - # entities.) - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new - # - # # Call the delete_watchlist method. - # result = client.delete_watchlist request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :delete_watchlist, 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 - - ## - # Configuration class for the EntityService API. - # - # This class represents the configuration for EntityService, - # 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::Chronicle::V1::EntityService::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 - # # get_watchlist to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::EntityService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.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::Chronicle::V1::EntityService::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. - # * `: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 = "chronicle.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 EntityService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :get_watchlist - ## - # RPC-specific configuration for `list_watchlists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_watchlists - ## - # RPC-specific configuration for `create_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :create_watchlist - ## - # RPC-specific configuration for `update_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :update_watchlist - ## - # RPC-specific configuration for `delete_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_watchlist - - # @private - def initialize parent_rpcs = nil - get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist - @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config - list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists - @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config - create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist - @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config - update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist - @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config - delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist - @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb deleted file mode 100644 index d22648b53244..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - # Credentials for the EntityService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb deleted file mode 100644 index 21433575930f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.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 Chronicle - module V1 - module EntityService - # Path helper methods for the EntityService API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified Watchlist resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param watchlist [String] - # - # @return [::String] - def watchlist_path project:, location:, instance:, watchlist: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/watchlists/#{watchlist}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb deleted file mode 100644 index 5e1f8b48cf66..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/entity_service/credentials" -require "google/cloud/chronicle/v1/entity_service/paths" -require "google/cloud/chronicle/v1/entity_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # EntityService contains apis for finding entities. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/entity_service/rest" - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - module EntityService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/entity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb deleted file mode 100644 index fc82038f4319..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb +++ /dev/null @@ -1,830 +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/chronicle/v1/entity_pb" -require "google/cloud/chronicle/v1/entity_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - module Rest - ## - # REST client for the EntityService service. - # - # EntityService contains apis for finding entities. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :entity_service_stub - - ## - # Configure the EntityService Client class. - # - # See {::Google::Cloud::Chronicle::V1::EntityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EntityService clients - # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] - 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.get_watchlist.timeout = 90.0 - default_config.rpcs.get_watchlist.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_watchlists.timeout = 90.0 - default_config.rpcs.list_watchlists.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_watchlist.timeout = 90.0 - - default_config.rpcs.update_watchlist.timeout = 90.0 - - default_config.rpcs.delete_watchlist.timeout = 90.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EntityService 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::Chronicle::V1::EntityService::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 - @entity_service_stub.universe_domain - end - - ## - # Create a new EntityService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EntityService 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 - - @entity_service_stub = ::Google::Cloud::Chronicle::V1::EntityService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @entity_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @entity_service_stub.logger - end - - # Service calls - - ## - # Gets watchlist details for the given watchlist ID. - # - # @overload get_watchlist(request, options = nil) - # Pass arguments to `get_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::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_watchlist(name: nil) - # Pass arguments to `get_watchlist` 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 parent, which owns this collection of watchlists. - # The name of the watchlist to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new - # - # # Call the get_watchlist method. - # result = client.get_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def get_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.get_watchlist 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 all watchlists for the given instance. - # - # @overload list_watchlists(request, options = nil) - # Pass arguments to `list_watchlists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_watchlists` 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 parent, which owns this collection of watchlists. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # Optional. The maximum number of watchlists to return. - # The service may return fewer than this value. - # If unspecified, at most 200 watchlists will be returned. - # The maximum value is 200; values above 200 will be coerced to 200. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListWatchlists` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListWatchlists` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Which watchlist to return in aip.dev/160 form. - # Currently, only the following filters are supported: - # - `watchlist_user_preferences.pinned=true` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new - # - # # Call the list_watchlists method. - # result = client.list_watchlists 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::Chronicle::V1::Watchlist. - # p item - # end - # - def list_watchlists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest - - # 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_watchlists.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::Chronicle::V1::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_watchlists.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_watchlists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.list_watchlists request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @entity_service_stub, :list_watchlists, "watchlists", 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 - - ## - # Creates a watchlist for the given instance. - # Note that there can be at most 200 watchlists per instance. - # - # @overload create_watchlist(request, options = nil) - # Pass arguments to `create_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) - # Pass arguments to `create_watchlist` 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 parent resource where this watchlist will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param watchlist_id [::String] - # Optional. The ID to use for the watchlist, - # which will become the final component of the watchlist's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new - # - # # Call the create_watchlist method. - # result = client.create_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def create_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.create_watchlist 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 - - ## - # Updates the watchlist for the given instance. - # - # @overload update_watchlist(request, options = nil) - # Pass arguments to `update_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::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_watchlist(watchlist: nil, update_mask: nil) - # Pass arguments to `update_watchlist` 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 watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to update. - # - # The watchlist's `name` field is used to identify the watchlist to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new - # - # # Call the update_watchlist method. - # result = client.update_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def update_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.update_watchlist 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 the watchlist for the given instance. - # - # @overload delete_watchlist(request, options = nil) - # Pass arguments to `delete_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::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_watchlist(name: nil, force: nil) - # Pass arguments to `delete_watchlist` 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 name of the watchlist to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param force [::Boolean] - # Optional. If set to true, any entities under this watchlist will also be - # deleted. (Otherwise, the request will only work if the watchlist has no - # entities.) - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new - # - # # Call the delete_watchlist method. - # result = client.delete_watchlist request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.delete_watchlist 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 - - ## - # Configuration class for the EntityService REST API. - # - # This class represents the configuration for EntityService 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::Chronicle::V1::EntityService::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 - # # get_watchlist to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.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. - # * `: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 = "chronicle.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 EntityService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :get_watchlist - ## - # RPC-specific configuration for `list_watchlists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_watchlists - ## - # RPC-specific configuration for `create_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :create_watchlist - ## - # RPC-specific configuration for `update_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :update_watchlist - ## - # RPC-specific configuration for `delete_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_watchlist - - # @private - def initialize parent_rpcs = nil - get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist - @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config - list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists - @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config - create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist - @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config - update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist - @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config - delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist - @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb deleted file mode 100644 index 526e1e685af9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb +++ /dev/null @@ -1,388 +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/chronicle/v1/entity_pb" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - module Rest - ## - # REST service stub for the EntityService 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 get_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] - # 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::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # A result object deserialized from the server's reply - def get_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_watchlist_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_watchlist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] - # 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::Chronicle::V1::ListWatchlistsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListWatchlistsResponse] - # A result object deserialized from the server's reply - def list_watchlists request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_watchlists_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_watchlists", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] - # 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::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # A result object deserialized from the server's reply - def create_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_watchlist_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_watchlist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] - # 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::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # A result object deserialized from the server's reply - def update_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_watchlist_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_watchlist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] - # 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_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_watchlist_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_watchlist", - 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 - - ## - # @private - # - # GRPC transcoding helper method for the get_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_watchlists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] - # 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_watchlists_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/watchlists", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/watchlists", - body: "watchlist", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{watchlist.name}", - body: "watchlist", - matches: [ - ["watchlist.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb deleted file mode 100644 index c59e9b0b6f56..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/entity.proto for package 'Google.Cloud.Chronicle.V1' -# 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/chronicle/v1/entity_pb' - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - # EntityService contains apis for finding entities. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.EntityService' - - # Gets watchlist details for the given watchlist ID. - rpc :GetWatchlist, ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist - # Lists all watchlists for the given instance. - rpc :ListWatchlists, ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse - # Creates a watchlist for the given instance. - # Note that there can be at most 200 watchlists per instance. - rpc :CreateWatchlist, ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist - # Updates the watchlist for the given instance. - rpc :UpdateWatchlist, ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist - # Deletes the watchlist for the given instance. - rpc :DeleteWatchlist, ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb deleted file mode 100644 index 93db557b2ce9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/instance.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' - - -descriptor_data = "\n(google/cloud/chronicle/v1/instance.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x01\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:y\xea\x41v\n!chronicle.googleapis.com/Instance\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the InstanceService API. - # - # This class represents the configuration for InstanceService, - # 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::Chronicle::V1::InstanceService::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 - # # get_instance to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::InstanceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.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::Chronicle::V1::InstanceService::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. - # * `: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 = "chronicle.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 InstanceService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - - # @private - def initialize parent_rpcs = nil - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb deleted file mode 100644 index 63fbe3b5b5fb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - # Credentials for the InstanceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb deleted file mode 100644 index 71d7213a0c6d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_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 Chronicle - module V1 - module InstanceService - # Path helper methods for the InstanceService API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb deleted file mode 100644 index 40b1913eead4..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/instance_service/credentials" -require "google/cloud/chronicle/v1/instance_service/paths" -require "google/cloud/chronicle/v1/instance_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # InstanceService provides the entry interface for the Chronicle API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/instance_service/rest" - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new - # - module InstanceService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/instance_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb deleted file mode 100644 index 4b6f95ea6cbb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb +++ /dev/null @@ -1,431 +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/chronicle/v1/instance_pb" -require "google/cloud/chronicle/v1/instance_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - module Rest - ## - # REST client for the InstanceService service. - # - # InstanceService provides the entry interface for the Chronicle API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :instance_service_stub - - ## - # Configure the InstanceService Client class. - # - # See {::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all InstanceService clients - # ::Google::Cloud::Chronicle::V1::InstanceService::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", "Chronicle", "V1"] - 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.get_instance.timeout = 60.0 - default_config.rpcs.get_instance.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the InstanceService 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::Chronicle::V1::InstanceService::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 - @instance_service_stub.universe_domain - end - - ## - # Create a new InstanceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the InstanceService 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 - - @instance_service_stub = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @instance_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @instance_service_stub.logger - end - - # Service calls - - ## - # Gets a Instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::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_instance(name: nil) - # Pass arguments to `get_instance` 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 name of the instance to retrieve. - # Format: - # `projects/{project_id}/locations/{location}/instances/{instance}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetInstanceRequest - - # 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_instance.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::Chronicle::V1::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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_service_stub.get_instance 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 - - ## - # Configuration class for the InstanceService REST API. - # - # This class represents the configuration for InstanceService 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::Chronicle::V1::InstanceService::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 - # # get_instance to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.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. - # * `: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 = "chronicle.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 InstanceService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - - # @private - def initialize parent_rpcs = nil - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb deleted file mode 100644 index 54fc5b580ded..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb +++ /dev/null @@ -1,142 +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/chronicle/v1/instance_pb" - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - module Rest - ## - # REST service stub for the InstanceService 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 get_instance REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] - # 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::Chronicle::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_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_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Instance.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 get_instance REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb deleted file mode 100644 index 3465f58ac427..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/instance.proto for package 'Google.Cloud.Chronicle.V1' -# 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/chronicle/v1/instance_pb' - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - # InstanceService provides the entry interface for the Chronicle API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.InstanceService' - - # Gets a Instance. - rpc :GetInstance, ::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::Google::Cloud::Chronicle::V1::Instance - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb deleted file mode 100644 index 7cd0fc43edd1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/reference_list.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/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/chronicle/v1/reference_list.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"]\n\tScopeInfo\x12P\n\x14reference_list_scope\x18\x02 \x01(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListScopeB\x03\xe0\x41\x02\".\n\x12ReferenceListScope\x12\x18\n\x0bscope_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x93\x01\n\x17GetReferenceListRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12:\n\x04view\x18\x02 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"\xbe\x01\n\x19ListReferenceListsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12:\n\x04view\x18\x04 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"x\n\x1aListReferenceListsResponse\x12\x41\n\x0freference_lists\x18\x01 \x03(\x0b\x32(.google.cloud.chronicle.v1.ReferenceList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1a\x43reateReferenceListRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x45\n\x0ereference_list\x18\x02 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12\x1e\n\x11reference_list_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1aUpdateReferenceListRequest\x12\x45\n\x0ereference_list\x18\x01 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xaa\x04\n\rReferenceList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07\x65ntries\x18\x05 \x03(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xe0\x41\x02\x12\x12\n\x05rules\x18\x06 \x03(\tB\x03\xe0\x41\x03\x12L\n\x0bsyntax_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xe0\x41\x02\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x38\n\nscope_info\x18\x0b \x01(\x0b\x32$.google.cloud.chronicle.v1.ScopeInfo:\x8a\x01\xea\x41\x86\x01\n&chronicle.googleapis.com/ReferenceList\x12\\projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}\"(\n\x12ReferenceListEntry\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02*\xc2\x01\n\x17ReferenceListSyntaxType\x12*\n&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\x10\x00\x12\x30\n,REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\x10\x01\x12$\n REFERENCE_LIST_SYNTAX_TYPE_REGEX\x10\x02\x12#\n\x1fREFERENCE_LIST_SYNTAX_TYPE_CIDR\x10\x03*u\n\x11ReferenceListView\x12#\n\x1fREFERENCE_LIST_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19REFERENCE_LIST_VIEW_BASIC\x10\x01\x12\x1c\n\x18REFERENCE_LIST_VIEW_FULL\x10\x02\x32\xf5\x07\n\x14ReferenceListService\x12\xbf\x01\n\x10GetReferenceList\x12\x32.google.cloud.chronicle.v1.GetReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\x12\xd2\x01\n\x12ListReferenceLists\x12\x34.google.cloud.chronicle.v1.ListReferenceListsRequest\x1a\x35.google.cloud.chronicle.v1.ListReferenceListsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/referenceLists\x12\xf9\x01\n\x13\x43reateReferenceList\x12\x35.google.cloud.chronicle.v1.CreateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x80\x01\xda\x41\'parent,reference_list,reference_list_id\x82\xd3\xe4\x93\x02P\">/v1/{parent=projects/*/locations/*/instances/*}/referenceLists:\x0ereference_list\x12\xfb\x01\n\x13UpdateReferenceList\x12\x35.google.cloud.chronicle.v1.UpdateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x82\x01\xda\x41\x1areference_list,update_mask\x82\xd3\xe4\x93\x02_2M/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}:\x0ereference_list\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc9\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x12ReferenceListProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - ScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ScopeInfo").msgclass - ReferenceListScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListScope").msgclass - GetReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetReferenceListRequest").msgclass - ListReferenceListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsRequest").msgclass - ListReferenceListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsResponse").msgclass - CreateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateReferenceListRequest").msgclass - UpdateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateReferenceListRequest").msgclass - ReferenceList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceList").msgclass - ReferenceListEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListEntry").msgclass - ReferenceListSyntaxType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListSyntaxType").enummodule - ReferenceListView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb deleted file mode 100644 index e88bb3a15142..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/reference_list_service/credentials" -require "google/cloud/chronicle/v1/reference_list_service/paths" -require "google/cloud/chronicle/v1/reference_list_service/client" -require "google/cloud/chronicle/v1/reference_list_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # ReferenceListService provides an interface for managing reference lists. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/reference_list_service" - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/reference_list_service/rest" - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - module ReferenceListService - end - end - end - end -end - -helper_path = ::File.join __dir__, "reference_list_service", "helpers.rb" -require "google/cloud/chronicle/v1/reference_list_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb deleted file mode 100644 index 7472a7315b5a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb +++ /dev/null @@ -1,809 +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/chronicle/v1/reference_list_pb" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - ## - # Client for the ReferenceListService service. - # - # ReferenceListService provides an interface for managing reference lists. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reference_list_service_stub - - ## - # Configure the ReferenceListService Client class. - # - # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReferenceListService clients - # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] - 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.get_reference_list.timeout = 60.0 - default_config.rpcs.get_reference_list.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_reference_lists.timeout = 60.0 - default_config.rpcs.list_reference_lists.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_reference_list.timeout = 60.0 - - default_config.rpcs.update_reference_list.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 - @reference_list_service_stub.universe_domain - end - - ## - # Create a new ReferenceListService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReferenceListService 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/chronicle/v1/reference_list_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 - - @reference_list_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::ReferenceListService::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 - ) - - @reference_list_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reference_list_service_stub.logger - end - - # Service calls - - ## - # Gets a single reference list. - # - # @overload get_reference_list(request, options = nil) - # Pass arguments to `get_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::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_reference_list(name: nil, view: nil) - # Pass arguments to `get_reference_list` 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 reference list to retrieve. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of the ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_FULL. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new - # - # # Call the get_reference_list method. - # result = client.get_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def get_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :get_reference_list, 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 a collection of reference lists. - # - # @overload list_reference_lists(request, options = nil) - # Pass arguments to `list_reference_lists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_reference_lists` 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 parent, which owns this collection of reference lists. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of reference lists to return. - # The service may return fewer than this value. - # If unspecified, at most 100 reference lists will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListReferenceLists` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListReferenceLists` must - # match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of each ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new - # - # # Call the list_reference_lists method. - # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. - # p item - # end - # - def list_reference_lists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest - - # 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_reference_lists.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::Chronicle::V1::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_reference_lists.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reference_lists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :list_reference_lists, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, 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 - - ## - # Creates a new reference list. - # - # @overload create_reference_list(request, options = nil) - # Pass arguments to `create_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) - # Pass arguments to `create_reference_list` 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 parent resource where this reference list will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to create. - # @param reference_list_id [::String] - # Required. The ID to use for the reference list. This is also the display - # name for the reference list. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Has length less than 256. - # - Must be unique. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new - # - # # Call the create_reference_list method. - # result = client.create_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def create_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :create_reference_list, 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 - - ## - # Updates an existing reference list. - # - # @overload update_reference_list(request, options = nil) - # Pass arguments to `update_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::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_reference_list(reference_list: nil, update_mask: nil) - # Pass arguments to `update_reference_list` 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 reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to update. - # - # The reference list's `name` field is used to identify the reference list to - # update. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # When no field mask is supplied, all non-empty fields will be updated. - # A field mask of "*" will update all fields, whether empty or not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new - # - # # Call the update_reference_list method. - # result = client.update_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def update_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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.reference_list&.name - header_params["reference_list.name"] = request.reference_list.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_reference_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :update_reference_list, 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 - - ## - # Configuration class for the ReferenceListService API. - # - # This class represents the configuration for ReferenceListService, - # 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::Chronicle::V1::ReferenceListService::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 - # # get_reference_list to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.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::Chronicle::V1::ReferenceListService::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. - # * `: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 = "chronicle.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 ReferenceListService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reference_list - ## - # RPC-specific configuration for `list_reference_lists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reference_lists - ## - # RPC-specific configuration for `create_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reference_list - ## - # RPC-specific configuration for `update_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :update_reference_list - - # @private - def initialize parent_rpcs = nil - get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list - @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config - list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists - @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config - create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list - @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config - update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list - @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb deleted file mode 100644 index bc9bb656539c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - # Credentials for the ReferenceListService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb deleted file mode 100644 index 0655f1b591bb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.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 Chronicle - module V1 - module ReferenceListService - # Path helper methods for the ReferenceListService API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified ReferenceList resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param reference_list [String] - # - # @return [::String] - def reference_list_path project:, location:, instance:, reference_list: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb deleted file mode 100644 index 72c3da5feecc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/reference_list_service/credentials" -require "google/cloud/chronicle/v1/reference_list_service/paths" -require "google/cloud/chronicle/v1/reference_list_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # ReferenceListService provides an interface for managing reference lists. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/reference_list_service/rest" - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - module ReferenceListService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/reference_list_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb deleted file mode 100644 index 31d0d82a8c4c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb +++ /dev/null @@ -1,738 +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/chronicle/v1/reference_list_pb" -require "google/cloud/chronicle/v1/reference_list_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - module Rest - ## - # REST client for the ReferenceListService service. - # - # ReferenceListService provides an interface for managing reference lists. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reference_list_service_stub - - ## - # Configure the ReferenceListService Client class. - # - # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReferenceListService clients - # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] - 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.get_reference_list.timeout = 60.0 - default_config.rpcs.get_reference_list.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_reference_lists.timeout = 60.0 - default_config.rpcs.list_reference_lists.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_reference_list.timeout = 60.0 - - default_config.rpcs.update_reference_list.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 - @reference_list_service_stub.universe_domain - end - - ## - # Create a new ReferenceListService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReferenceListService 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 - - @reference_list_service_stub = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @reference_list_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reference_list_service_stub.logger - end - - # Service calls - - ## - # Gets a single reference list. - # - # @overload get_reference_list(request, options = nil) - # Pass arguments to `get_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::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_reference_list(name: nil, view: nil) - # Pass arguments to `get_reference_list` 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 reference list to retrieve. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of the ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_FULL. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new - # - # # Call the get_reference_list method. - # result = client.get_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def get_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.get_reference_list 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 a collection of reference lists. - # - # @overload list_reference_lists(request, options = nil) - # Pass arguments to `list_reference_lists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_reference_lists` 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 parent, which owns this collection of reference lists. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of reference lists to return. - # The service may return fewer than this value. - # If unspecified, at most 100 reference lists will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListReferenceLists` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListReferenceLists` must - # match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of each ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new - # - # # Call the list_reference_lists method. - # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. - # p item - # end - # - def list_reference_lists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest - - # 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_reference_lists.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::Chronicle::V1::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_reference_lists.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reference_lists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.list_reference_lists request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, "reference_lists", 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 - - ## - # Creates a new reference list. - # - # @overload create_reference_list(request, options = nil) - # Pass arguments to `create_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) - # Pass arguments to `create_reference_list` 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 parent resource where this reference list will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to create. - # @param reference_list_id [::String] - # Required. The ID to use for the reference list. This is also the display - # name for the reference list. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Has length less than 256. - # - Must be unique. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new - # - # # Call the create_reference_list method. - # result = client.create_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def create_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.create_reference_list 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 - - ## - # Updates an existing reference list. - # - # @overload update_reference_list(request, options = nil) - # Pass arguments to `update_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::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_reference_list(reference_list: nil, update_mask: nil) - # Pass arguments to `update_reference_list` 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 reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to update. - # - # The reference list's `name` field is used to identify the reference list to - # update. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # When no field mask is supplied, all non-empty fields will be updated. - # A field mask of "*" will update all fields, whether empty or not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new - # - # # Call the update_reference_list method. - # result = client.update_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def update_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.update_reference_list 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 - - ## - # Configuration class for the ReferenceListService REST API. - # - # This class represents the configuration for ReferenceListService 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::Chronicle::V1::ReferenceListService::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 - # # get_reference_list to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.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. - # * `: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 = "chronicle.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 ReferenceListService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reference_list - ## - # RPC-specific configuration for `list_reference_lists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reference_lists - ## - # RPC-specific configuration for `create_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reference_list - ## - # RPC-specific configuration for `update_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :update_reference_list - - # @private - def initialize parent_rpcs = nil - get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list - @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config - list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists - @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config - create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list - @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config - update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list - @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb deleted file mode 100644 index 718ce68bd0d6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb +++ /dev/null @@ -1,327 +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/chronicle/v1/reference_list_pb" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - module Rest - ## - # REST service stub for the ReferenceListService 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 get_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] - # 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::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # A result object deserialized from the server's reply - def get_reference_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_reference_list_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_reference_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_lists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] - # 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::Chronicle::V1::ListReferenceListsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListReferenceListsResponse] - # A result object deserialized from the server's reply - def list_reference_lists request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reference_lists_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_reference_lists", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] - # 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::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # A result object deserialized from the server's reply - def create_reference_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_reference_list_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_reference_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] - # 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::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # A result object deserialized from the server's reply - def update_reference_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_reference_list_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_reference_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ReferenceList.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 get_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] - # 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_reference_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reference_lists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] - # 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_reference_lists_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/referenceLists", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] - # 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_reference_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/referenceLists", - body: "reference_list", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] - # 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_reference_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{reference_list.name}", - body: "reference_list", - matches: [ - ["reference_list.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb deleted file mode 100644 index aa0cb32e7359..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/reference_list.proto for package 'Google.Cloud.Chronicle.V1' -# 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/chronicle/v1/reference_list_pb' - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - # ReferenceListService provides an interface for managing reference lists. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.ReferenceListService' - - # Gets a single reference list. - rpc :GetReferenceList, ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList - # Lists a collection of reference lists. - rpc :ListReferenceLists, ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse - # Creates a new reference list. - rpc :CreateReferenceList, ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList - # Updates an existing reference list. - rpc :UpdateReferenceList, ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb deleted file mode 100644 index 9311811310c4..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.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/chronicle/v1/dashboard_query_service/rest" -require "google/cloud/chronicle/v1/dashboard_chart_service/rest" -require "google/cloud/chronicle/v1/data_access_control_service/rest" -require "google/cloud/chronicle/v1/data_table_service/rest" -require "google/cloud/chronicle/v1/entity_service/rest" -require "google/cloud/chronicle/v1/native_dashboard_service/rest" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" -require "google/cloud/chronicle/v1/instance_service/rest" -require "google/cloud/chronicle/v1/reference_list_service/rest" -require "google/cloud/chronicle/v1/rule_service/rest" -require "google/cloud/chronicle/v1/version" - -module Google - module Cloud - module Chronicle - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/chronicle/v1/rest" - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb deleted file mode 100644 index e4b4236afdf1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/rule.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/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n$google/cloud/chronicle/v1/rule.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\x91\t\n\x04Rule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04text\x18\x04 \x01(\t\x12\x13\n\x06\x61uthor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12:\n\x08severity\x18\x06 \x01(\x0b\x32#.google.cloud.chronicle.v1.SeverityB\x03\xe0\x41\x03\x12\x44\n\x08metadata\x18\x07 \x03(\x0b\x32-.google.cloud.chronicle.v1.Rule.MetadataEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x11\x63ompilation_state\x18\n \x01(\x0e\x32\x30.google.cloud.chronicle.v1.Rule.CompilationStateB\x03\xe0\x41\x03\x12\x36\n\x04type\x18\x0c \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleTypeB\x03\xe0\x41\x03\x12G\n\x0freference_lists\x18\r \x03(\tB.\xe0\x41\x03\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12M\n\x17\x61llowed_run_frequencies\x18\x0e \x03(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequencyB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0f \x01(\t\x12<\n\x05scope\x18\x10 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12V\n\x17\x63ompilation_diagnostics\x18\x11 \x03(\x0b\x32\x30.google.cloud.chronicle.v1.CompilationDiagnosticB\x03\xe0\x41\x03\x12.\n!near_real_time_live_rule_eligible\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0binputs_used\x18\x14 \x01(\x0b\x32%.google.cloud.chronicle.v1.InputsUsedB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"P\n\x10\x43ompilationState\x12!\n\x1d\x43OMPILATION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02:m\xea\x41j\n\x1d\x63hronicle.googleapis.com/Rule\x12Iprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}\"\xcb\x05\n\x0eRuleDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x12\x10\n\x08\x61lerting\x18\x03 \x01(\x08\x12\x10\n\x08\x61rchived\x18\x04 \x01(\x08\x12\x35\n\x0c\x61rchive_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\rrun_frequency\x18\x06 \x01(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequency\x12V\n\x0f\x65xecution_state\x18\x07 \x01(\x0e\x32\x38.google.cloud.chronicle.v1.RuleDeployment.ExecutionStateB\x03\xe0\x41\x03\x12=\n\x0eproducer_rules\x18\x08 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12=\n\x0e\x63onsumer_rules\x18\t \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x46\n\x1dlast_alert_status_change_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"W\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0b\n\x07LIMITED\x10\x02\x12\n\n\x06PAUSED\x10\x03:\x82\x01\xea\x41\x7f\n\'chronicle.googleapis.com/RuleDeployment\x12Tprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment\"\xc8\x03\n\tRetrohunt\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x10process_interval\x18\x02 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x36\n\x12\x65xecution_interval\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.cloud.chronicle.v1.Retrohunt.StateB\x03\xe0\x41\x03\x12 \n\x13progress_percentage\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\"P\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x8a\x01\xea\x41\x86\x01\n\"chronicle.googleapis.com/Retrohunt\x12`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}\"~\n\x11\x43reateRuleRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x32\n\x04rule\x18\x02 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\"x\n\x0eGetRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"\xb3\x01\n\x10ListRulesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\\\n\x11ListRulesResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x11UpdateRuleRequest\x12\x32\n\x04rule\x18\x01 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\\\n\x11\x44\x65leteRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa9\x01\n\x18ListRuleRevisionsRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"d\n\x19ListRuleRevisionsResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x01\n\x16\x43reateRetrohuntRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\x12<\n\tretrohunt\x18\x02 \x01(\x0b\x32$.google.cloud.chronicle.v1.RetrohuntB\x03\xe0\x41\x02\"O\n\x13GetRetrohuntRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Retrohunt\"\x8a\x01\n\x15ListRetrohuntsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"k\n\x16ListRetrohuntsResponse\x12\x38\n\nretrohunts\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.Retrohunt\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x18GetRuleDeploymentRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/RuleDeployment\"\x94\x01\n\x1aListRuleDeploymentsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/RuleDeployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"{\n\x1bListRuleDeploymentsResponse\x12\x43\n\x10rule_deployments\x18\x01 \x03(\x0b\x32).google.cloud.chronicle.v1.RuleDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9c\x01\n\x1bUpdateRuleDeploymentRequest\x12G\n\x0frule_deployment\x18\x01 \x01(\x0b\x32).google.cloud.chronicle.v1.RuleDeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"y\n\x13\x43ompilationPosition\x12\x17\n\nstart_line\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cstart_column\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_line\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nend_column\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\"\x96\x02\n\x15\x43ompilationDiagnostic\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x08position\x18\x02 \x01(\x0b\x32..google.cloud.chronicle.v1.CompilationPositionB\x03\xe0\x41\x03\x12P\n\x08severity\x18\x03 \x01(\x0e\x32\x39.google.cloud.chronicle.v1.CompilationDiagnostic.SeverityB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x05 \x01(\tB\x03\xe0\x41\x03\"<\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\" \n\x08Severity\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\"\x9a\x01\n\x11RetrohuntMetadata\x12\x35\n\tretrohunt\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x12\x65xecution_interval\x18\x02 \x01(\x0b\x32\x15.google.type.Interval\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x02\"Z\n\nInputsUsed\x12\x15\n\x08uses_udm\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0buses_entity\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0euses_detection\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01*N\n\x0cRunFrequency\x12\x1d\n\x19RUN_FREQUENCY_UNSPECIFIED\x10\x00\x12\x08\n\x04LIVE\x10\x01\x12\n\n\x06HOURLY\x10\x02\x12\t\n\x05\x44\x41ILY\x10\x03*H\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSINGLE_EVENT\x10\x01\x12\x0f\n\x0bMULTI_EVENT\x10\x02*V\n\x08RuleView\x12\x19\n\x15RULE_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\x1a\n\x16REVISION_METADATA_ONLY\x10\x03\x32\xa9\x13\n\x0bRuleService\x12\xae\x01\n\nCreateRule\x12,.google.cloud.chronicle.v1.CreateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"Q\xda\x41\x0bparent,rule\x82\xd3\xe4\x93\x02=\"5/v1/{parent=projects/*/locations/*/instances/*}/rules:\x04rule\x12\x9b\x01\n\x07GetRule\x12).google.cloud.chronicle.v1.GetRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xae\x01\n\tListRules\x12+.google.cloud.chronicle.v1.ListRulesRequest\x1a,.google.cloud.chronicle.v1.ListRulesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*/instances/*}/rules\x12\xb8\x01\n\nUpdateRule\x12,.google.cloud.chronicle.v1.UpdateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"[\xda\x41\x10rule,update_mask\x82\xd3\xe4\x93\x02\x42\x32:/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}:\x04rule\x12\x98\x01\n\nDeleteRule\x12,.google.cloud.chronicle.v1.DeleteRuleRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xd2\x01\n\x11ListRuleRevisions\x12\x33.google.cloud.chronicle.v1.ListRuleRevisionsRequest\x1a\x34.google.cloud.chronicle.v1.ListRuleRevisionsResponse\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{name=projects/*/locations/*/instances/*/rules/*}:listRevisions\x12\xef\x01\n\x0f\x43reateRetrohunt\x12\x31.google.cloud.chronicle.v1.CreateRetrohuntRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1e\n\tRetrohunt\x12\x11RetrohuntMetadata\xda\x41\x10parent,retrohunt\x82\xd3\xe4\x93\x02O\"B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts:\tretrohunt\x12\xb7\x01\n\x0cGetRetrohunt\x12..google.cloud.chronicle.v1.GetRetrohuntRequest\x1a$.google.cloud.chronicle.v1.Retrohunt\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}\x12\xca\x01\n\x0eListRetrohunts\x12\x30.google.cloud.chronicle.v1.ListRetrohuntsRequest\x1a\x31.google.cloud.chronicle.v1.ListRetrohuntsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts\x12\xc4\x01\n\x11GetRuleDeployment\x12\x33.google.cloud.chronicle.v1.GetRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}\x12\xda\x01\n\x13ListRuleDeployments\x12\x35.google.cloud.chronicle.v1.ListRuleDeploymentsRequest\x1a\x36.google.cloud.chronicle.v1.ListRuleDeploymentsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments\x12\x83\x02\n\x14UpdateRuleDeployment\x12\x36.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"\x87\x01\xda\x41\x1brule_deployment,update_mask\x82\xd3\xe4\x93\x02\x63\x32P/v1/{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}:\x0frule_deployment\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc0\x01\n\x1d\x63om.google.cloud.chronicle.v1B\tRuleProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule").msgclass - Rule::CompilationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule.CompilationState").enummodule - RuleDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment").msgclass - RuleDeployment::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment.ExecutionState").enummodule - Retrohunt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt").msgclass - Retrohunt::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt.State").enummodule - CreateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRuleRequest").msgclass - GetRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleRequest").msgclass - ListRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesRequest").msgclass - ListRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesResponse").msgclass - UpdateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleRequest").msgclass - DeleteRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteRuleRequest").msgclass - ListRuleRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsRequest").msgclass - ListRuleRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsResponse").msgclass - CreateRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRetrohuntRequest").msgclass - GetRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRetrohuntRequest").msgclass - ListRetrohuntsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsRequest").msgclass - ListRetrohuntsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsResponse").msgclass - GetRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleDeploymentRequest").msgclass - ListRuleDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsRequest").msgclass - ListRuleDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsResponse").msgclass - UpdateRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleDeploymentRequest").msgclass - CompilationPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationPosition").msgclass - CompilationDiagnostic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic").msgclass - CompilationDiagnostic::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic.Severity").enummodule - Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Severity").msgclass - RetrohuntMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RetrohuntMetadata").msgclass - InputsUsed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InputsUsed").msgclass - RunFrequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RunFrequency").enummodule - RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleType").enummodule - RuleView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb deleted file mode 100644 index e84fdd68ca88..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/rule_service/credentials" -require "google/cloud/chronicle/v1/rule_service/paths" -require "google/cloud/chronicle/v1/rule_service/operations" -require "google/cloud/chronicle/v1/rule_service/client" -require "google/cloud/chronicle/v1/rule_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # RuleService provides interface for user-created rules. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/rule_service" - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/rule_service/rest" - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - module RuleService - end - end - end - end -end - -helper_path = ::File.join __dir__, "rule_service", "helpers.rb" -require "google/cloud/chronicle/v1/rule_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb deleted file mode 100644 index 53a82998663a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb +++ /dev/null @@ -1,1691 +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/chronicle/v1/rule_pb" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - ## - # Client for the RuleService service. - # - # RuleService provides interface for user-created rules. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :rule_service_stub - - ## - # Configure the RuleService Client class. - # - # See {::Google::Cloud::Chronicle::V1::RuleService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RuleService clients - # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] - 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_rule.timeout = 60.0 - - default_config.rpcs.get_rule.timeout = 60.0 - default_config.rpcs.get_rule.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rules.timeout = 600.0 - default_config.rpcs.list_rules.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule.timeout = 600.0 - - default_config.rpcs.delete_rule.timeout = 60.0 - - default_config.rpcs.list_rule_revisions.timeout = 600.0 - default_config.rpcs.list_rule_revisions.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_retrohunt.timeout = 600.0 - - default_config.rpcs.get_retrohunt.timeout = 60.0 - default_config.rpcs.get_retrohunt.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_retrohunts.timeout = 60.0 - default_config.rpcs.list_retrohunts.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_rule_deployment.timeout = 600.0 - default_config.rpcs.get_rule_deployment.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rule_deployments.timeout = 600.0 - default_config.rpcs.list_rule_deployments.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule_deployment.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RuleService 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::Chronicle::V1::RuleService::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 - @rule_service_stub.universe_domain - end - - ## - # Create a new RuleService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RuleService 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/chronicle/v1/rule_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 - - @rule_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::RuleService::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 - ) - - @rule_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::Chronicle::V1::RuleService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @rule_service_stub.logger - end - - # Service calls - - ## - # Creates a new Rule. - # - # @overload create_rule(request, options = nil) - # Pass arguments to `create_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::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_rule(parent: nil, rule: nil) - # Pass arguments to `create_rule` 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 parent resource where this rule will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new - # - # # Call the create_rule method. - # result = client.create_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def create_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :create_rule, 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 Rule. - # - # @overload get_rule(request, options = nil) - # Pass arguments to `get_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::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_rule(name: nil, view: nil) - # Pass arguments to `get_rule` 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 name of the rule to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the Rule being - # returned. If unspecified, defaults to FULL. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new - # - # # Call the get_rule method. - # result = client.get_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def get_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :get_rule, 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 Rules. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) - # Pass arguments to `list_rules` 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 parent, which owns this collection of rules. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of rules to return. The service may return fewer than - # this value. If unspecified, at most 100 rules will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRules` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRules` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # view indicates the scope of fields to populate for the Rule being returned. - # If unspecified, defaults to BASIC. - # @param filter [::String] - # Only the following filters are allowed: - # "reference_lists:\\{reference_list_name}" - # "data_tables:\\{data_table_name}" - # "display_name:\\{display_name}" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest - - # 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_rules.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::Chronicle::V1::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_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_rules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rules, 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 Rule. - # - # @overload update_rule(request, options = nil) - # Pass arguments to `update_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::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_rule(rule: nil, update_mask: nil) - # Pass arguments to `update_rule` 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 rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to update. - # - # The rule's `name` field is used to identify the rule to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new - # - # # Call the update_rule method. - # result = client.update_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def update_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest - - # 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_rule.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::Chronicle::V1::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.rule&.name - header_params["rule.name"] = request.rule.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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :update_rule, 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 Rule. - # - # @overload delete_rule(request, options = nil) - # Pass arguments to `delete_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::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_rule(name: nil, force: nil) - # Pass arguments to `delete_rule` 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 name of the rule to delete. A rule revision timestamp cannot - # be specified as part of the name, as deleting specific revisions is not - # supported. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param force [::Boolean] - # Optional. If set to true, any retrohunts and any detections associated with - # the rule will also be deleted. If set to false, the call will only succeed - # if the rule has no associated retrohunts, including completed retrohunts, - # and no associated detections. Regardless of this field's value, the rule - # deployment associated with this rule will also 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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new - # - # # Call the delete_rule method. - # result = client.delete_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :delete_rule, 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 all revisions of the rule. - # - # @overload list_rule_revisions(request, options = nil) - # Pass arguments to `list_rule_revisions` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_rule_revisions` 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 name of the rule to list revisions for. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of revisions to return per page. The service may return - # fewer than this value. If unspecified, at most 100 revisions will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # The page token, received from a previous `ListRuleRevisions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleRevisions` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the revision - # being returned. If unspecified, defaults to BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new - # - # # Call the list_rule_revisions method. - # result = client.list_rule_revisions 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rule_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest - - # 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_rule_revisions.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::Chronicle::V1::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_rule_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rule_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_rule_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, 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 - - ## - # Create a Retrohunt. - # - # @overload create_retrohunt(request, options = nil) - # Pass arguments to `create_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::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_retrohunt(parent: nil, retrohunt: nil) - # Pass arguments to `create_retrohunt` 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 parent of retrohunt, which is a rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] - # Required. The retrohunt 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/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new - # - # # Call the create_retrohunt method. - # result = client.create_retrohunt 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_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest - - # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :create_retrohunt, 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 - - ## - # Get a Retrohunt. - # - # @overload get_retrohunt(request, options = nil) - # Pass arguments to `get_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::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_retrohunt(name: nil) - # Pass arguments to `get_retrohunt` 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 name of the retrohunt to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Retrohunt] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new - # - # # Call the get_retrohunt method. - # result = client.get_retrohunt request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. - # p result - # - def get_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest - - # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :get_retrohunt, 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 - - ## - # List Retrohunts. - # - # @overload list_retrohunts(request, options = nil) - # Pass arguments to `list_retrohunts` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_retrohunts` 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 rule that the retrohunts belong to. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of retrohunt to return. The service may return fewer - # than this value. If unspecified, at most 100 retrohunts will be returned. - # The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRetrohunts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRetrohunts` must - # match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # state - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new - # - # # Call the list_retrohunts method. - # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. - # p item - # end - # - def list_retrohunts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest - - # 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_retrohunts.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::Chronicle::V1::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_retrohunts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_retrohunts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_retrohunts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_retrohunts, 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 - - ## - # Gets a RuleDeployment. - # - # @overload get_rule_deployment(request, options = nil) - # Pass arguments to `get_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::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_rule_deployment(name: nil) - # Pass arguments to `get_rule_deployment` 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 name of the rule deployment to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new - # - # # Call the get_rule_deployment method. - # result = client.get_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def get_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest - - # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :get_rule_deployment, 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 RuleDeployments across all Rules. - # - # @overload list_rule_deployments(request, options = nil) - # Pass arguments to `list_rule_deployments` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_rule_deployments` 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 collection of all parents which own all rule deployments. The - # "-" wildcard token must be used as the rule identifier in the resource - # path. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/-` - # @param page_size [::Integer] - # The maximum number of rule deployments to return. The service may return - # fewer than this value. If unspecified, at most 100 rule deployments will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRuleDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleDeployments` - # must match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # archived, name - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new - # - # # Call the list_rule_deployments method. - # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. - # p item - # end - # - def list_rule_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest - - # 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_rule_deployments.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::Chronicle::V1::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_rule_deployments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rule_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_rule_deployments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, 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 RuleDeployment. - # Failures are not necessarily atomic. If there is a request to update - # multiple fields, and any update to a single field fails, an error will be - # returned, but other fields may remain successfully updated. - # - # @overload update_rule_deployment(request, options = nil) - # Pass arguments to `update_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::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_rule_deployment(rule_deployment: nil, update_mask: nil) - # Pass arguments to `update_rule_deployment` 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 rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] - # Required. The rule deployment to update. - # - # The rule deployment's `name` field is used to identify the rule deployment - # to update. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new - # - # # Call the update_rule_deployment method. - # result = client.update_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def update_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest - - # 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_rule_deployment.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::Chronicle::V1::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.rule_deployment&.name - header_params["rule_deployment.name"] = request.rule_deployment.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_rule_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :update_rule_deployment, 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 - - ## - # Configuration class for the RuleService API. - # - # This class represents the configuration for RuleService, - # 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::Chronicle::V1::RuleService::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_rule to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::RuleService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.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::Chronicle::V1::RuleService::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. - # * `: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 = "chronicle.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 RuleService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_rule - ## - # RPC-specific configuration for `get_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `update_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule - ## - # RPC-specific configuration for `delete_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_rule - ## - # RPC-specific configuration for `list_rule_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_revisions - ## - # RPC-specific configuration for `create_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :create_retrohunt - ## - # RPC-specific configuration for `get_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :get_retrohunt - ## - # RPC-specific configuration for `list_retrohunts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_retrohunts - ## - # RPC-specific configuration for `get_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule_deployment - ## - # RPC-specific configuration for `list_rule_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_deployments - ## - # RPC-specific configuration for `update_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule_deployment - - # @private - def initialize parent_rpcs = nil - create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule - @create_rule = ::Gapic::Config::Method.new create_rule_config - get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule - @get_rule = ::Gapic::Config::Method.new get_rule_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule - @update_rule = ::Gapic::Config::Method.new update_rule_config - delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule - @delete_rule = ::Gapic::Config::Method.new delete_rule_config - list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions - @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config - create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt - @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config - get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt - @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config - list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts - @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config - get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment - @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config - list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments - @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config - update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment - @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb deleted file mode 100644 index a66ae4c0ebf6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - # Credentials for the RuleService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb deleted file mode 100644 index 162ec1fb3163..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb +++ /dev/null @@ -1,841 +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 Chronicle - module V1 - module RuleService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the RuleService 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 RuleService 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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - 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. - # * `: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 = "chronicle.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. - # * `: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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb deleted file mode 100644 index 00b03a7b2d54..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb +++ /dev/null @@ -1,159 +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 Chronicle - module V1 - module RuleService - # Path helper methods for the RuleService API. - module Paths - ## - # Create a fully-qualified DataAccessScope resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_scope [String] - # - # @return [::String] - def data_access_scope_path project:, location:, instance:, data_access_scope: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified ReferenceList resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param reference_list [String] - # - # @return [::String] - def reference_list_path project:, location:, instance:, reference_list: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" - end - - ## - # Create a fully-qualified Retrohunt resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param rule [String] - # @param retrohunt [String] - # - # @return [::String] - def retrohunt_path project:, location:, instance:, rule:, retrohunt: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - raise ::ArgumentError, "rule cannot contain /" if rule.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/retrohunts/#{retrohunt}" - end - - ## - # Create a fully-qualified Rule resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param rule [String] - # - # @return [::String] - def rule_path project:, location:, instance:, rule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}" - end - - ## - # Create a fully-qualified RuleDeployment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param rule [String] - # - # @return [::String] - def rule_deployment_path project:, location:, instance:, rule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/deployment" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb deleted file mode 100644 index d27a86220664..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/rule_service/credentials" -require "google/cloud/chronicle/v1/rule_service/paths" -require "google/cloud/chronicle/v1/rule_service/rest/operations" -require "google/cloud/chronicle/v1/rule_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # RuleService provides interface for user-created rules. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/rule_service/rest" - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - module RuleService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/rule_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb deleted file mode 100644 index e29466693f60..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb +++ /dev/null @@ -1,1564 +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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - module Rest - ## - # REST client for the RuleService service. - # - # RuleService provides interface for user-created rules. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :rule_service_stub - - ## - # Configure the RuleService Client class. - # - # See {::Google::Cloud::Chronicle::V1::RuleService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RuleService clients - # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] - 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_rule.timeout = 60.0 - - default_config.rpcs.get_rule.timeout = 60.0 - default_config.rpcs.get_rule.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rules.timeout = 600.0 - default_config.rpcs.list_rules.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule.timeout = 600.0 - - default_config.rpcs.delete_rule.timeout = 60.0 - - default_config.rpcs.list_rule_revisions.timeout = 600.0 - default_config.rpcs.list_rule_revisions.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_retrohunt.timeout = 600.0 - - default_config.rpcs.get_retrohunt.timeout = 60.0 - default_config.rpcs.get_retrohunt.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_retrohunts.timeout = 60.0 - default_config.rpcs.list_retrohunts.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_rule_deployment.timeout = 600.0 - default_config.rpcs.get_rule_deployment.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rule_deployments.timeout = 600.0 - default_config.rpcs.list_rule_deployments.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule_deployment.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RuleService 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::Chronicle::V1::RuleService::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 - @rule_service_stub.universe_domain - end - - ## - # Create a new RuleService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RuleService 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::Chronicle::V1::RuleService::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 - - @rule_service_stub = ::Google::Cloud::Chronicle::V1::RuleService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @rule_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::Chronicle::V1::RuleService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @rule_service_stub.logger - end - - # Service calls - - ## - # Creates a new Rule. - # - # @overload create_rule(request, options = nil) - # Pass arguments to `create_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::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_rule(parent: nil, rule: nil) - # Pass arguments to `create_rule` 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 parent resource where this rule will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new - # - # # Call the create_rule method. - # result = client.create_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def create_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.create_rule 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 Rule. - # - # @overload get_rule(request, options = nil) - # Pass arguments to `get_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::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_rule(name: nil, view: nil) - # Pass arguments to `get_rule` 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 name of the rule to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the Rule being - # returned. If unspecified, defaults to FULL. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new - # - # # Call the get_rule method. - # result = client.get_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def get_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.get_rule 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 Rules. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) - # Pass arguments to `list_rules` 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 parent, which owns this collection of rules. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of rules to return. The service may return fewer than - # this value. If unspecified, at most 100 rules will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRules` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRules` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # view indicates the scope of fields to populate for the Rule being returned. - # If unspecified, defaults to BASIC. - # @param filter [::String] - # Only the following filters are allowed: - # "reference_lists:\\{reference_list_name}" - # "data_tables:\\{data_table_name}" - # "display_name:\\{display_name}" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest - - # 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_rules.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::Chronicle::V1::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_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_rules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rules, "rules", 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 Rule. - # - # @overload update_rule(request, options = nil) - # Pass arguments to `update_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::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_rule(rule: nil, update_mask: nil) - # Pass arguments to `update_rule` 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 rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to update. - # - # The rule's `name` field is used to identify the rule to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new - # - # # Call the update_rule method. - # result = client.update_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def update_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.update_rule 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 Rule. - # - # @overload delete_rule(request, options = nil) - # Pass arguments to `delete_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::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_rule(name: nil, force: nil) - # Pass arguments to `delete_rule` 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 name of the rule to delete. A rule revision timestamp cannot - # be specified as part of the name, as deleting specific revisions is not - # supported. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param force [::Boolean] - # Optional. If set to true, any retrohunts and any detections associated with - # the rule will also be deleted. If set to false, the call will only succeed - # if the rule has no associated retrohunts, including completed retrohunts, - # and no associated detections. Regardless of this field's value, the rule - # deployment associated with this rule will also 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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new - # - # # Call the delete_rule method. - # result = client.delete_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.delete_rule 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 all revisions of the rule. - # - # @overload list_rule_revisions(request, options = nil) - # Pass arguments to `list_rule_revisions` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_rule_revisions` 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 name of the rule to list revisions for. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of revisions to return per page. The service may return - # fewer than this value. If unspecified, at most 100 revisions will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # The page token, received from a previous `ListRuleRevisions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleRevisions` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the revision - # being returned. If unspecified, defaults to BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new - # - # # Call the list_rule_revisions method. - # result = client.list_rule_revisions 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rule_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest - - # 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_rule_revisions.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::Chronicle::V1::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_rule_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rule_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_rule_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, "rules", 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 - - ## - # Create a Retrohunt. - # - # @overload create_retrohunt(request, options = nil) - # Pass arguments to `create_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::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_retrohunt(parent: nil, retrohunt: nil) - # Pass arguments to `create_retrohunt` 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 parent of retrohunt, which is a rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] - # Required. The retrohunt 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/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new - # - # # Call the create_retrohunt method. - # result = client.create_retrohunt 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_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest - - # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.create_retrohunt 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 - - ## - # Get a Retrohunt. - # - # @overload get_retrohunt(request, options = nil) - # Pass arguments to `get_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::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_retrohunt(name: nil) - # Pass arguments to `get_retrohunt` 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 name of the retrohunt to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Retrohunt] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new - # - # # Call the get_retrohunt method. - # result = client.get_retrohunt request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. - # p result - # - def get_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest - - # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.get_retrohunt 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 - - ## - # List Retrohunts. - # - # @overload list_retrohunts(request, options = nil) - # Pass arguments to `list_retrohunts` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_retrohunts` 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 rule that the retrohunts belong to. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of retrohunt to return. The service may return fewer - # than this value. If unspecified, at most 100 retrohunts will be returned. - # The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRetrohunts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRetrohunts` must - # match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # state - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new - # - # # Call the list_retrohunts method. - # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. - # p item - # end - # - def list_retrohunts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest - - # 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_retrohunts.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::Chronicle::V1::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_retrohunts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_retrohunts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_retrohunts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_retrohunts, "retrohunts", 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 a RuleDeployment. - # - # @overload get_rule_deployment(request, options = nil) - # Pass arguments to `get_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::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_rule_deployment(name: nil) - # Pass arguments to `get_rule_deployment` 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 name of the rule deployment to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new - # - # # Call the get_rule_deployment method. - # result = client.get_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def get_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest - - # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.get_rule_deployment 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 RuleDeployments across all Rules. - # - # @overload list_rule_deployments(request, options = nil) - # Pass arguments to `list_rule_deployments` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_rule_deployments` 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 collection of all parents which own all rule deployments. The - # "-" wildcard token must be used as the rule identifier in the resource - # path. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/-` - # @param page_size [::Integer] - # The maximum number of rule deployments to return. The service may return - # fewer than this value. If unspecified, at most 100 rule deployments will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRuleDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleDeployments` - # must match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # archived, name - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new - # - # # Call the list_rule_deployments method. - # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. - # p item - # end - # - def list_rule_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest - - # 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_rule_deployments.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::Chronicle::V1::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_rule_deployments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rule_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_rule_deployments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, "rule_deployments", 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 RuleDeployment. - # Failures are not necessarily atomic. If there is a request to update - # multiple fields, and any update to a single field fails, an error will be - # returned, but other fields may remain successfully updated. - # - # @overload update_rule_deployment(request, options = nil) - # Pass arguments to `update_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::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_rule_deployment(rule_deployment: nil, update_mask: nil) - # Pass arguments to `update_rule_deployment` 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 rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] - # Required. The rule deployment to update. - # - # The rule deployment's `name` field is used to identify the rule deployment - # to update. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new - # - # # Call the update_rule_deployment method. - # result = client.update_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def update_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest - - # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.update_rule_deployment 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 - - ## - # Configuration class for the RuleService REST API. - # - # This class represents the configuration for RuleService 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::Chronicle::V1::RuleService::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_rule to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.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. - # * `: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 = "chronicle.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 RuleService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_rule - ## - # RPC-specific configuration for `get_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `update_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule - ## - # RPC-specific configuration for `delete_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_rule - ## - # RPC-specific configuration for `list_rule_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_revisions - ## - # RPC-specific configuration for `create_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :create_retrohunt - ## - # RPC-specific configuration for `get_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :get_retrohunt - ## - # RPC-specific configuration for `list_retrohunts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_retrohunts - ## - # RPC-specific configuration for `get_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule_deployment - ## - # RPC-specific configuration for `list_rule_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_deployments - ## - # RPC-specific configuration for `update_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule_deployment - - # @private - def initialize parent_rpcs = nil - create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule - @create_rule = ::Gapic::Config::Method.new create_rule_config - get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule - @get_rule = ::Gapic::Config::Method.new get_rule_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule - @update_rule = ::Gapic::Config::Method.new update_rule_config - delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule - @delete_rule = ::Gapic::Config::Method.new delete_rule_config - list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions - @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config - create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt - @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config - get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt - @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config - list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts - @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config - get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment - @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config - list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments - @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config - update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment - @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb deleted file mode 100644 index f989eba5c49e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb +++ /dev/null @@ -1,925 +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 Chronicle - module V1 - module RuleService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the RuleService 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 RuleService 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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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 - - ## - # 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. - # * `: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 = "chronicle.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. - # * `: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 - - # @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 - - 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 - - ## - # @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: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, 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: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/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: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/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: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb deleted file mode 100644 index 021e04869cad..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb +++ /dev/null @@ -1,817 +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/chronicle/v1/rule_pb" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - module Rest - ## - # REST service stub for the RuleService 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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] - # 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::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # A result object deserialized from the server's reply - def create_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_rule_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_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] - # 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::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # A result object deserialized from the server's reply - def get_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_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_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Rule.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_rules REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] - # 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::Chronicle::V1::ListRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRulesResponse] - # A result object deserialized from the server's reply - def list_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_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_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] - # 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::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # A result object deserialized from the server's reply - def update_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_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_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] - # 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_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_rule_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_rule", - 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 list_rule_revisions REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] - # 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::Chronicle::V1::ListRuleRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse] - # A result object deserialized from the server's reply - def list_rule_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_revisions_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_rule_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] - # 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_retrohunt request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_retrohunt_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_retrohunt", - 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_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] - # 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::Chronicle::V1::Retrohunt] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # A result object deserialized from the server's reply - def get_retrohunt request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_retrohunt_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_retrohunt", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunts REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] - # 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::Chronicle::V1::ListRetrohuntsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse] - # A result object deserialized from the server's reply - def list_retrohunts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_retrohunts_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_retrohunts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] - # 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::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # A result object deserialized from the server's reply - def get_rule_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_deployment_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_rule_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployments REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] - # 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::Chronicle::V1::ListRuleDeploymentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse] - # A result object deserialized from the server's reply - def list_rule_deployments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_deployments_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_rule_deployments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] - # 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::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # A result object deserialized from the server's reply - def update_rule_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_deployment_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_rule_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/rules", - body: "rule", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rules REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] - # 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_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/rules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{rule.name}", - body: "rule", - matches: [ - ["rule.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rule_revisions REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] - # 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_rule_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listRevisions", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] - # 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_retrohunt_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/retrohunts", - body: "retrohunt", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] - # 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_retrohunt_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/retrohunts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_retrohunts REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] - # 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_retrohunts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/retrohunts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] - # 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_rule_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rule_deployments REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] - # 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_rule_deployments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deployments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] - # 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_rule_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{rule_deployment.name}", - body: "rule_deployment", - matches: [ - ["rule_deployment.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb deleted file mode 100644 index a893fb504269..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb +++ /dev/null @@ -1,70 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/rule.proto for package 'Google.Cloud.Chronicle.V1' -# 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/chronicle/v1/rule_pb' - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - # RuleService provides interface for user-created rules. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.RuleService' - - # Creates a new Rule. - rpc :CreateRule, ::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule - # Gets a Rule. - rpc :GetRule, ::Google::Cloud::Chronicle::V1::GetRuleRequest, ::Google::Cloud::Chronicle::V1::Rule - # Lists Rules. - rpc :ListRules, ::Google::Cloud::Chronicle::V1::ListRulesRequest, ::Google::Cloud::Chronicle::V1::ListRulesResponse - # Updates a Rule. - rpc :UpdateRule, ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule - # Deletes a Rule. - rpc :DeleteRule, ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::Google::Protobuf::Empty - # Lists all revisions of the rule. - rpc :ListRuleRevisions, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse - # Create a Retrohunt. - rpc :CreateRetrohunt, ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::Google::Longrunning::Operation - # Get a Retrohunt. - rpc :GetRetrohunt, ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::Google::Cloud::Chronicle::V1::Retrohunt - # List Retrohunts. - rpc :ListRetrohunts, ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse - # Gets a RuleDeployment. - rpc :GetRuleDeployment, ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment - # Lists RuleDeployments across all Rules. - rpc :ListRuleDeployments, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse - # Updates a RuleDeployment. - # Failures are not necessarily atomic. If there is a request to update - # multiple fields, and any update to a single field fails, an error will be - # returned, but other fields may remain successfully updated. - rpc :UpdateRuleDeployment, ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb deleted file mode 100644 index 6224648b9b26..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.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! - - -module Google - module Cloud - module Chronicle - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md deleted file mode 100644 index 70a487ac4c0f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Chronicle V1 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb deleted file mode 100644 index 1342c3da69d2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb +++ /dev/null @@ -1,364 +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 Chronicle - module V1 - # Request message for CreateDataAccessLabel. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this Data Access Label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] data_access_label - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # Required. Data access label to create. - # @!attribute [rw] data_access_label_id - # @return [::String] - # Required. The ID to use for the data access label, which will become the - # label's display name and the final component of the label's resource name. - # The maximum number of characters should be 63. Regex pattern is as per AIP: - # https://google.aip.dev/122#resource-id-segments - class CreateDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to retrieve a data access label. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access label to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - class GetDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListDataAccessLabels. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this data access label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of data access labels to return. The service may return - # fewer than this value. If unspecified, at most 100 data access labels will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListDataAccessLabelsRequest` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessLabel and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - class ListDataAccessLabelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListDataAccessLabels. - # @!attribute [rw] data_access_labels - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # List of data access labels. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDataAccessLabelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateDataAccessLabel method. - # @!attribute [rw] data_access_label - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # Required. The data access label to update. - # - # The label's `name` field is used to identify the label to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description and definition - # fields are supported for update; an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - class UpdateDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to delete a data access label. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access label to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - class DeleteDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateDataAccessScope. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this Data Access Scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] data_access_scope - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # Required. Data access scope to create. - # @!attribute [rw] data_access_scope_id - # @return [::String] - # Required. The user provided scope id which will become the last part of the - # name of the scope resource. Needs to be compliant with - # https://google.aip.dev/122 - class CreateDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to retrieve a data access scope. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access scope to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - class GetDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListDataAccessScopes. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this data access scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of data access scopes to return. The service may return - # fewer than this value. If unspecified, at most 100 data access scopes will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListDataAccessScopesRequest` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessScope and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - class ListDataAccessScopesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListDataAccessScopes. - # @!attribute [rw] data_access_scopes - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # List of data access scopes. - # @!attribute [rw] global_data_access_scope_granted - # @return [::Boolean] - # Whether or not global scope is granted to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDataAccessScopesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateDataAccessScope method. - # @!attribute [rw] data_access_scope - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # Required. The data access scope to update. - # - # The scope's `name` field is used to identify the scope to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description, the allowed - # and denied labels list fields are supported for update; - # an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - class UpdateDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to delete a data access scope. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access scope to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - class DeleteDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A DataAccessLabel is a label on events to define user access to data. - # @!attribute [rw] udm_query - # @return [::String] - # A UDM query over event data. - # @!attribute [rw] name - # @return [::String] - # The unique resource name of the data access label. - # @!attribute [r] display_name - # @return [::String] - # Output only. The short name displayed for the label as it appears on event - # data. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access label was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access label was last updated. - # @!attribute [r] author - # @return [::String] - # Output only. The user who created the data access label. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The user who last updated the data access label. - # @!attribute [rw] description - # @return [::String] - # Optional. A description of the data access label for a human reader. - class DataAccessLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A DataAccessScope is a boolean expression of data access labels used - # to restrict access to data for users. - # @!attribute [rw] name - # @return [::String] - # Required. The unique full name of the data access scope. - # The name should comply with https://google.aip.dev/122 standards. - # @!attribute [rw] allowed_data_access_labels - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] - # Optional. The allowed labels for the scope. - # Either allow_all or allowed_data_access_labels needs to be provided. - # When provided, there has to be at least one label allowed for the scope to - # be valid. - # The logical operator for evaluation of the allowed labels is OR. - # E.g.: A customer with scope with allowed labels A and B will be able - # to see data with labeled with A or B or (A and B). - # @!attribute [rw] denied_data_access_labels - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] - # Optional. The denied labels for the scope. - # The logical operator for evaluation of the denied labels is AND. - # E.g.: A customer with scope with denied labels A and B won't be able - # to see data labeled with A and data labeled with B - # and data with labels A and B. - # @!attribute [r] display_name - # @return [::String] - # Output only. The name to be used for display to customers of the data - # access scope. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access scope was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access scope was last updated. - # @!attribute [r] author - # @return [::String] - # Output only. The user who created the data access scope. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The user who last updated the data access scope. - # @!attribute [rw] description - # @return [::String] - # Optional. A description of the data access scope for a human reader. - # @!attribute [rw] allow_all - # @return [::Boolean] - # Optional. Whether or not the scope allows all labels, allow_all and - # allowed_data_access_labels are mutually exclusive and one of them must be - # present. denied_data_access_labels can still be used along with allow_all. - # When combined with denied_data_access_labels, access will be granted to all - # data that doesn't have labels mentioned in denied_data_access_labels. E.g.: - # A customer with scope with denied labels A and B and allow_all will be able - # to see all data except data labeled with A and data labeled with B and data - # with labels A and B. - class DataAccessScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Reference object to a data access label. - # @!attribute [rw] data_access_label - # @return [::String] - # The name of the data access label. - # - # Note: The following fields are mutually exclusive: `data_access_label`, `log_type`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] log_type - # @return [::String] - # The name of the log type. - # - # Note: The following fields are mutually exclusive: `log_type`, `data_access_label`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] asset_namespace - # @return [::String] - # The asset namespace configured in the forwarder - # of the customer's events. - # - # Note: The following fields are mutually exclusive: `asset_namespace`, `data_access_label`, `log_type`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ingestion_label - # @return [::Google::Cloud::Chronicle::V1::IngestionLabel] - # The ingestion label configured in the forwarder of the customer's events. - # - # Note: The following fields are mutually exclusive: `ingestion_label`, `data_access_label`, `log_type`, `asset_namespace`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name of the label. - # Data access label and log types's name - # will match the display name of the resource. - # The asset namespace will match the namespace itself. - # The ingestion key value pair will match the key of the tuple. - class DataAccessLabelReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Representation of an ingestion label type. - # @!attribute [rw] ingestion_label_key - # @return [::String] - # Required. The key of the ingestion label. Always required. - # @!attribute [rw] ingestion_label_value - # @return [::String] - # Optional. The value of the ingestion label. Optional. An object - # with no provided value and some key provided would match - # against the given key and ANY value. - class IngestionLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb deleted file mode 100644 index dbbe11a22639..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb +++ /dev/null @@ -1,512 +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 Chronicle - module V1 - # A request to create DataTable. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] data_table - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # Required. The data table being created. - # @!attribute [rw] data_table_id - # @return [::String] - # Required. The ID to use for the data table. This is also the display name - # for the data table. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Must be unique and has length < 256. - class CreateDataTableRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get details about a data table. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data table to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - class GetDataTableRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update details of data table. - # @!attribute [rw] data_table - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # Required. This field is used to identify the datatable to update. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of metadata fields to update. Currently data tables only - # support updating the `description`, `row_time_to_live` and `scope_info` - # fields. When no field mask is supplied, all non-empty fields will be - # updated. A field mask of "*" will update all fields, whether empty or not. - class UpdateDataTableRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request for a list of data tables. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of data tables to return. The service may - # return fewer than this value. If unspecified, at most 100 data tables will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDataTables` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to - # `ListDataTables` must match the call that provided the page - # token. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - class ListDataTablesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting data tables. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data table to delete. - # Format - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any rows under this data table will also be - # deleted. (Otherwise, the request will only work if the data table has no - # rows.) - class DeleteDataTableRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing data tables. - # @!attribute [rw] data_tables - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTable>] - # The list of the data tables returned. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDataTablesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create data table row. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] data_table_row - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # Required. The data table row to create. - class CreateDataTableRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update data table row. - # @!attribute [rw] data_table_row - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # Required. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update. Currently data table rows only - # support updating the `values` field. When no field mask is supplied, all - # non-empty fields will be updated. A field mask of "*" will update all - # fields, whether empty or not. - class UpdateDataTableRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list data table rows. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of data table rows to return. The service may - # return fewer than this value. If unspecified, at most 100 data table rows - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDataTableRows` call. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter facilitating search over data table rows. This filter - # performs a case-insensitive substring match on the row values. - class ListDataTableRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing data table rows. - # @!attribute [rw] data_table_rows - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] - # The list of the data table rows returned. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListDataTableRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get data table row. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - class GetDataTableRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete data table row. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - class DeleteDataTableRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create data table rows in bulk. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest>] - # Required. Data table rows to create. A maximum of 1000 rows (for sync - # requests) or 2000 rows (for async requests) can be created in a single - # request. Total size of the rows should be less than 4MB. - class BulkCreateDataTableRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with created data table rows. - # @!attribute [rw] data_table_rows - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] - # DataTableRows created - class BulkCreateDataTableRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get data table rows in bulk. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest>] - # Required. Data table rows to get. At max 1,000 rows can be there in a - # request. - class BulkGetDataTableRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with data table rows. - # @!attribute [rw] data_table_rows - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] - # The requested data table rows. - class BulkGetDataTableRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to replace data table rows in bulk. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest>] - # Required. Data table rows to replace the existing data table rows. A - # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) - # can be replaced in a single request. Total size of the rows should be less - # than 4MB. - class BulkReplaceDataTableRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with data table rows that replaced existing data table rows. - # @!attribute [rw] data_table_rows - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] - # DataTableRows that replaced existing data table rows - class BulkReplaceDataTableRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update data table rows in bulk. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest>] - # Required. Data table rows to update. At max 1,000 rows (or rows with size - # less than 2MB) can be there in a request. - class BulkUpdateDataTableRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with updated data table rows. - # @!attribute [rw] data_table_rows - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] - # DataTableRows updated - class BulkUpdateDataTableRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataTableScopeInfo specifies the scope info of the data table. - # @!attribute [rw] data_access_scopes - # @return [::Array<::String>] - # Required. Contains the list of scope names of the data table. If the list - # is empty, the data table is treated as unscoped. The scope names should be - # full resource names and should be of the format: - # "projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataAccessScopes/\\{scope_name}" - class DataTableScopeInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataTable represents the data table resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the data table - # Format: - # "\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}" - # @!attribute [r] display_name - # @return [::String] - # Output only. The unique display name of the data table. - # @!attribute [rw] description - # @return [::String] - # Required. A user-provided description of the data table. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Table create time - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Table update time - # @!attribute [rw] column_info - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableColumnInfo>] - # Immutable. Details of all the columns in the table - # @!attribute [r] data_table_uuid - # @return [::String] - # Output only. Data table unique id - # @!attribute [r] rules - # @return [::Array<::String>] - # Output only. The resource names for the associated Rules that use this - # data table. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/rules/\\{rule}. - # \\{rule} here refers to the rule id. - # @!attribute [r] rule_associations_count - # @return [::Integer] - # Output only. The count of rules using the data table. - # @!attribute [rw] row_time_to_live - # @return [::String] - # Optional. User-provided TTL of the data table. - # @!attribute [r] approximate_row_count - # @return [::Integer] - # Output only. The count of rows in the data table. - # @!attribute [rw] scope_info - # @return [::Google::Cloud::Chronicle::V1::DataTableScopeInfo] - # Optional. The scope info of the data table. - # During data table creation, if this field is not set, the data - # table without scopes (an unscoped table) will be created for a global - # user. For a scoped user, this field must be set. During data table - # update, if scope_info is requested to be updated, this field must be set. - # @!attribute [r] update_source - # @return [::Google::Cloud::Chronicle::V1::DataTableUpdateSource] - # Output only. Source of the data table update. - # @!attribute [r] row_time_to_live_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update time of the TTL of the data table. - class DataTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataTableRow represents a single row in a data table. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the data table - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @!attribute [rw] values - # @return [::Array<::String>] - # Required. All column values for a single row. The values should be in the - # same order as the columns of the data tables. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. DataTableRow create time - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. DataTableRow update time - # @!attribute [rw] row_time_to_live - # @return [::String] - # Optional. User-provided TTL of the data table row. - class DataTableRow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataTableColumnInfo represents the column metadata of the - # datatable. The column_index represents the ordering of the - # values in DataTableRow. - # @!attribute [rw] mapped_column_path - # @return [::String] - # Entity proto field path that the column is mapped to - # - # Note: The following fields are mutually exclusive: `mapped_column_path`, `column_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] column_type - # @return [::Google::Cloud::Chronicle::V1::DataTableColumnInfo::DataTableColumnType] - # Column type can be STRING, CIDR (Ex- 10.1.1.0/24), REGEX - # - # Note: The following fields are mutually exclusive: `column_type`, `mapped_column_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] column_index - # @return [::Integer] - # Required. Column Index. 0,1,2... - # @!attribute [rw] original_column - # @return [::String] - # Required. Original column name of the Data Table (present in the CSV header - # in case of creation of data tables using file uploads). It must satisfy the - # following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Must be unique and has length < 256. - # @!attribute [rw] key_column - # @return [::Boolean] - # Optional. Whether to include this column in the calculation of the row ID. - # If no columns have key_column = true, all columns will be included in the - # calculation of the row ID. - # @!attribute [rw] repeated_values - # @return [::Boolean] - # Optional. Whether the column is a repeated values column. - class DataTableColumnInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataTableColumnType denotes the type of the column to be referenced in the - # rule. - module DataTableColumnType - # The default Data Table Column Type. - DATA_TABLE_COLUMN_TYPE_UNSPECIFIED = 0 - - # Denotes the type of the column as STRING. - STRING = 1 - - # Denotes the type of the column as REGEX. - REGEX = 2 - - # Denotes the type of the column as CIDR. - CIDR = 3 - - # Denotes the type of the column as NUMBER (includes int and float). - NUMBER = 4 - end - end - - # The request message for GetDataTableOperationErrors. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the data table operation errors. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} - class GetDataTableOperationErrorsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message containing the errors for a data table operation. - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name for the data table operation errors. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} - # @!attribute [rw] rpc_errors - # @return [::Array<::Google::Rpc::Status>] - # The list of errors. - # Replaces the deprecated `errors` field. - class DataTableOperationErrors - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataTableUpdateSource denotes the source that updated the data table. - module DataTableUpdateSource - # The data table is updated by the user. - DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED = 0 - - # The data table is updated by the user. - USER = 1 - - # The data table is updated by the rule. - RULE = 2 - - # The data table is updated by the search. - SEARCH = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb deleted file mode 100644 index 89cef26897a2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb +++ /dev/null @@ -1,210 +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 Chronicle - module V1 - # A watchlist is a list of entities that allows for bulk operations over the - # included entities. - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name of the watchlist. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the watchlist. - # Note that it must be at least one character and less than 63 characters - # (https://google.aip.dev/148). - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the watchlist. - # @!attribute [rw] multiplying_factor - # @return [::Float] - # Optional. Weight applied to the risk score for entities - # in this watchlist. - # The default is 1.0 if it is not specified. - # @!attribute [rw] entity_population_mechanism - # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism] - # Required. Mechanism to populate entities in the watchlist. - # @!attribute [r] entity_count - # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityCount] - # Output only. Entity count in the watchlist. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the watchlist was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the watchlist was last updated. - # @!attribute [rw] watchlist_user_preferences - # @return [::Google::Cloud::Chronicle::V1::WatchlistUserPreferences] - # Optional. User preferences for watchlist configuration. - class Watchlist - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Mechanism to populate entities in the watchlist. - # @!attribute [rw] manual - # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism::Manual] - # Optional. Entities are added manually. - class EntityPopulationMechanism - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entities are added manually. - class Manual - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Count of different types of entities in the watchlist. - # @!attribute [r] user - # @return [::Integer] - # Output only. Count of user type entities in the watchlist. - # @!attribute [r] asset - # @return [::Integer] - # Output only. Count of asset type entities in the watchlist. - class EntityCount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A collection of user preferences for watchlist UI configuration. - # @!attribute [rw] pinned - # @return [::Boolean] - # Optional. Whether the watchlist is pinned on the dashboard. - class WatchlistUserPreferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a watchlist. - # @!attribute [rw] name - # @return [::String] - # Required. The parent, which owns this collection of watchlists. - # The name of the watchlist to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - class GetWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing watchlists. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of watchlists. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of watchlists to return. - # The service may return fewer than this value. - # If unspecified, at most 200 watchlists will be returned. - # The maximum value is 200; values above 200 will be coerced to 200. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListWatchlists` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListWatchlists` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Which watchlist to return in aip.dev/160 form. - # Currently, only the following filters are supported: - # - `watchlist_user_preferences.pinned=true` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - class ListWatchlistsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing watchlists. - # @!attribute [rw] watchlists - # @return [::Array<::Google::Cloud::Chronicle::V1::Watchlist>] - # Optional. The watchlists from the specified instance. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListWatchlistsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating watchlist. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this watchlist will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] watchlist_id - # @return [::String] - # Optional. The ID to use for the watchlist, - # which will become the final component of the watchlist's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @!attribute [rw] watchlist - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # Required. The watchlist to create. - class CreateWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating watchlist. - # @!attribute [rw] watchlist - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # Required. The watchlist to update. - # - # The watchlist's `name` field is used to identify the watchlist to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update. - class UpdateWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting watchlist. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the watchlist to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any entities under this watchlist will also be - # deleted. (Otherwise, the request will only work if the watchlist has no - # entities.) - class DeleteWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb deleted file mode 100644 index dde3c3cbf88d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.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! - - -module Google - module Cloud - module Chronicle - module V1 - # A Instance represents an instantiation of the Instance product. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of this instance. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a Instance. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the instance to retrieve. - # Format: - # `projects/{project_id}/locations/{location}/instances/{instance}` - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb deleted file mode 100644 index 2ab663d35a0d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.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 Chronicle - module V1 - # ScopeInfo specifies the scope info of the reference list. - # @!attribute [rw] reference_list_scope - # @return [::Google::Cloud::Chronicle::V1::ReferenceListScope] - # Required. The list of scope names of the reference list, if the list is - # empty the reference list is treated as unscoped. - class ScopeInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ReferenceListScope specifies the list of scope names of the reference list. - # @!attribute [rw] scope_names - # @return [::Array<::String>] - # Optional. The list of scope names of the reference list. The scope names - # should be full resource names and should be of the format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. - class ReferenceListScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get details about a reference list. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the reference list to retrieve. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of the ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_FULL. - class GetReferenceListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request for a list of reference lists. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of reference lists. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of reference lists to return. - # The service may return fewer than this value. - # If unspecified, at most 100 reference lists will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListReferenceLists` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListReferenceLists` must - # match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of each ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_BASIC. - class ListReferenceListsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to a request for a list of reference lists. - # @!attribute [rw] reference_lists - # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceList>] - # The reference lists. - # Ordered in ascending alphabetical order by name. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListReferenceListsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a reference list. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this reference list will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] reference_list - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # Required. The reference list to create. - # @!attribute [rw] reference_list_id - # @return [::String] - # Required. The ID to use for the reference list. This is also the display - # name for the reference list. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Has length less than 256. - # - Must be unique. - class CreateReferenceListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a reference list. - # @!attribute [rw] reference_list - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # Required. The reference list to update. - # - # The reference list's `name` field is used to identify the reference list to - # update. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # When no field mask is supplied, all non-empty fields will be updated. - # A field mask of "*" will update all fields, whether empty or not. - class UpdateReferenceListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A reference list. - # Reference lists are user-defined lists of values which users can - # use in multiple Rules. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the reference list. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - # @!attribute [r] display_name - # @return [::String] - # Output only. The unique display name of the reference list. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the reference list was last updated. - # @!attribute [rw] description - # @return [::String] - # Required. A user-provided description of the reference list. - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceListEntry>] - # Required. The entries of the reference list. - # When listed, they are returned in the order that was specified at creation - # or update. The combined size of the values of the reference list may not - # exceed 6MB. - # This is returned only when the view is REFERENCE_LIST_VIEW_FULL. - # @!attribute [r] rules - # @return [::Array<::String>] - # Output only. The resource names for the associated self-authored Rules that - # use this reference list. This is returned only when the view is - # REFERENCE_LIST_VIEW_FULL. - # @!attribute [rw] syntax_type - # @return [::Google::Cloud::Chronicle::V1::ReferenceListSyntaxType] - # Required. The syntax type indicating how list entries should be validated. - # @!attribute [r] rule_associations_count - # @return [::Integer] - # Output only. The count of self-authored rules using the reference list. - # @!attribute [rw] scope_info - # @return [::Google::Cloud::Chronicle::V1::ScopeInfo] - # The scope info of the reference list. - # During reference list creation, if this field is not set, the reference - # list without scopes (an unscoped list) will be created for an unscoped - # user. For a scoped user, this field must be set. During reference list - # update, if scope_info is requested to be updated, this field must be set. - class ReferenceList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An entry in a reference list. - # @!attribute [rw] value - # @return [::String] - # Required. The value of the entry. Maximum length is 512 characters. - class ReferenceListEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The syntax type indicating how list entries should be validated. - module ReferenceListSyntaxType - # Defaults to REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING. - REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED = 0 - - # List contains plain text patterns. - REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING = 1 - - # List contains only Regular Expression patterns. - REFERENCE_LIST_SYNTAX_TYPE_REGEX = 2 - - # List contains only CIDR patterns. - REFERENCE_LIST_SYNTAX_TYPE_CIDR = 3 - end - - # ReferenceListView is a mechanism for viewing partial responses of the - # ReferenceList resource. - module ReferenceListView - # The default / unset value. - # The API will default to the BASIC view for ListReferenceLists. - # The API will default to the FULL view for methods that return a single - # ReferenceList resource. - REFERENCE_LIST_VIEW_UNSPECIFIED = 0 - - # Include metadata about the ReferenceList. - # This is the default view for ListReferenceLists. - REFERENCE_LIST_VIEW_BASIC = 1 - - # Include all details about the ReferenceList: metadata, content lines, - # associated rule counts. This is the default view for GetReferenceList. - REFERENCE_LIST_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb deleted file mode 100644 index 0b2584f226f8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb +++ /dev/null @@ -1,701 +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 Chronicle - module V1 - # The Rule resource represents a user-created rule. - # NEXT TAG: 21 - # @!attribute [rw] name - # @return [::String] - # Identifier. Full resource name for the rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [r] revision_id - # @return [::String] - # Output only. The revision ID of the rule. - # A new revision is created whenever the rule text is changed in any way. - # Format: `v_{10 digits}_{9 digits}` - # Populated in REVISION_METADATA_ONLY view and FULL view. - # @!attribute [r] display_name - # @return [::String] - # Output only. Display name of the rule. - # Populated in BASIC view and FULL view. - # @!attribute [rw] text - # @return [::String] - # The YARA-L content of the rule. - # Populated in FULL view. - # @!attribute [r] author - # @return [::String] - # Output only. The author of the rule. Extracted from the meta section of - # text. Populated in BASIC view and FULL view. - # @!attribute [r] severity - # @return [::Google::Cloud::Chronicle::V1::Severity] - # Output only. The severity of the rule as specified in the meta section of - # text. Populated in BASIC view and FULL view. - # @!attribute [r] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. Additional metadata specified in the meta section of text. - # Populated in FULL view. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of when the rule was created. - # Populated in FULL view. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of when the rule revision was created. - # Populated in FULL, REVISION_METADATA_ONLY views. - # @!attribute [r] compilation_state - # @return [::Google::Cloud::Chronicle::V1::Rule::CompilationState] - # Output only. The current compilation state of the rule. - # Populated in FULL view. - # @!attribute [r] type - # @return [::Google::Cloud::Chronicle::V1::RuleType] - # Output only. User-facing type of the rule. Extracted from the events - # section of rule text. Populated in BASIC view and FULL view. - # @!attribute [r] reference_lists - # @return [::Array<::String>] - # Output only. Resource names of the reference lists used in this rule. - # Populated in FULL view. - # @!attribute [r] allowed_run_frequencies - # @return [::Array<::Google::Cloud::Chronicle::V1::RunFrequency>] - # Output only. The run frequencies that are allowed for the rule. - # Populated in BASIC view and FULL view. - # @!attribute [rw] etag - # @return [::String] - # The etag for this rule. - # If this is provided on update, the request will succeed if and only if it - # matches the server-computed value, and will fail with an ABORTED error - # otherwise. - # Populated in BASIC view and FULL view. - # @!attribute [rw] scope - # @return [::String] - # Resource name of the DataAccessScope bound to this rule. - # Populated in BASIC view and FULL view. - # If reference lists are used in the rule, validations will be performed - # against this scope to ensure that the reference lists are compatible with - # both the user's and the rule's scopes. - # The scope should be in the format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. - # @!attribute [r] compilation_diagnostics - # @return [::Array<::Google::Cloud::Chronicle::V1::CompilationDiagnostic>] - # Output only. A list of a rule's corresponding compilation diagnostic - # messages such as compilation errors and compilation warnings. Populated in - # FULL view. - # @!attribute [r] near_real_time_live_rule_eligible - # @return [::Boolean] - # Output only. Indicate the rule can run in near real time live rule. - # If this is true, the rule uses the near real time live rule when the run - # frequency is set to LIVE. - # @!attribute [r] inputs_used - # @return [::Google::Cloud::Chronicle::V1::InputsUsed] - # Output only. The set of inputs used in the rule. For example, if the rule - # uses $e.principal.hostname, then the uses_udm field will be true. - class Rule - 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 - - # The current compilation state of the rule. - module CompilationState - # The compilation state is unspecified/unknown. - COMPILATION_STATE_UNSPECIFIED = 0 - - # The Rule can successfully compile. - SUCCEEDED = 1 - - # The Rule cannot successfully compile. - # This is possible if a backwards-incompatible change was made to the - # compiler. - FAILED = 2 - end - end - - # The RuleDeployment resource represents the deployment state of a Rule. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the rule deployment. - # Note that RuleDeployment is a child of the overall Rule, not any individual - # revision, so the resource ID segment for the Rule resource must not - # reference a specific revision. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @!attribute [rw] enabled - # @return [::Boolean] - # Whether the rule is currently deployed continuously against incoming data. - # @!attribute [rw] alerting - # @return [::Boolean] - # Whether detections resulting from this deployment should be considered - # alerts. - # @!attribute [rw] archived - # @return [::Boolean] - # The archive state of the rule deployment. - # Cannot be set to true unless enabled is set to false. - # If set to true, alerting will automatically be set to false. - # If currently set to true, enabled, alerting, and run_frequency cannot be - # updated. - # @!attribute [r] archive_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the rule deployment archive state was last - # set to true. If the rule deployment's current archive state is not set to - # true, the field will be empty. - # @!attribute [rw] run_frequency - # @return [::Google::Cloud::Chronicle::V1::RunFrequency] - # The run frequency of the rule deployment. - # @!attribute [r] execution_state - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment::ExecutionState] - # Output only. The execution state of the rule deployment. - # @!attribute [r] producer_rules - # @return [::Array<::String>] - # Output only. The names of the associated/chained producer rules. Rules are - # considered producers for this rule if this rule explicitly filters on their - # ruleid. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [r] consumer_rules - # @return [::Array<::String>] - # Output only. The names of the associated/chained consumer rules. Rules are - # considered consumers of this rule if their rule text explicitly filters on - # this rule's ruleid. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [r] last_alert_status_change_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the rule deployment alert state was lastly - # changed. This is filled regardless of the current alert state. E.g. if the - # current alert status is false, this timestamp will be the timestamp when - # the alert status was changed to false. - class RuleDeployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible execution states the rule deployment can be in. - module ExecutionState - # Unspecified or unknown execution state. - EXECUTION_STATE_UNSPECIFIED = 0 - - # Default execution state. - DEFAULT = 1 - - # Rules in limited state may not have their executions guaranteed. - LIMITED = 2 - - # Paused rules are not executed at all. - PAUSED = 3 - end - end - - # Retrohunt is an execution of a Rule over a time range in the past. - # @!attribute [rw] name - # @return [::String] - # The resource name of the retrohunt. - # Retrohunt is the child of a rule revision. \\{rule} in the format below is - # structured as \\{rule_id@revision_id}. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # @!attribute [rw] process_interval - # @return [::Google::Type::Interval] - # Required. The start and end time of the event time range this retrohunt - # processes. - # @!attribute [r] execution_interval - # @return [::Google::Type::Interval] - # Output only. The start and end time of the retrohunt execution. If the - # retrohunt is not yet finished, the end time of the interval will not be - # populated. - # @!attribute [r] state - # @return [::Google::Cloud::Chronicle::V1::Retrohunt::State] - # Output only. The state of the retrohunt. - # @!attribute [r] progress_percentage - # @return [::Float] - # Output only. Percent progress of the retrohunt towards completion, from - # 0.00 to 100.00. - class Retrohunt - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible states a retrohunt can be in. - module State - # Unspecified or unknown retrohunt state. - STATE_UNSPECIFIED = 0 - - # Running state. - RUNNING = 1 - - # Done state. - DONE = 2 - - # Cancelled state. - CANCELLED = 3 - - # Failed state. - FAILED = 4 - end - end - - # Request message for CreateRule method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this rule will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] rule - # @return [::Google::Cloud::Chronicle::V1::Rule] - # Required. The rule to create. - class CreateRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRule method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the Rule being - # returned. If unspecified, defaults to FULL. - class GetRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRules method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of rules. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of rules to return. The service may return fewer than - # this value. If unspecified, at most 100 rules will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRules` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRules` - # must match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::RuleView] - # view indicates the scope of fields to populate for the Rule being returned. - # If unspecified, defaults to BASIC. - # @!attribute [rw] filter - # @return [::String] - # Only the following filters are allowed: - # "reference_lists:\\{reference_list_name}" - # "data_tables:\\{data_table_name}" - # "display_name:\\{display_name}" - class ListRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRules method. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] - # The rules from the specified instance. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateRule method. - # @!attribute [rw] rule - # @return [::Google::Cloud::Chronicle::V1::Rule] - # Required. The rule to update. - # - # The rule's `name` field is used to identify the rule to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. - class UpdateRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteRule method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to delete. A rule revision timestamp cannot - # be specified as part of the name, as deleting specific revisions is not - # supported. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any retrohunts and any detections associated with - # the rule will also be deleted. If set to false, the call will only succeed - # if the rule has no associated retrohunts, including completed retrohunts, - # and no associated detections. Regardless of this field's value, the rule - # deployment associated with this rule will also be deleted. - class DeleteRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRuleRevisions method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to list revisions for. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of revisions to return per page. The service may return - # fewer than this value. If unspecified, at most 100 revisions will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # The page token, received from a previous `ListRuleRevisions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleRevisions` - # must match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the revision - # being returned. If unspecified, defaults to BASIC. - class ListRuleRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRuleRevisions method. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] - # The revisions of the rule. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRuleRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateRetrohunt method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of retrohunt, which is a rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] retrohunt - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # Required. The retrohunt to create. - class CreateRetrohuntRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRetrohunt method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the retrohunt to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - class GetRetrohuntRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRetrohunts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The rule that the retrohunts belong to. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of retrohunt to return. The service may return fewer - # than this value. If unspecified, at most 100 retrohunts will be returned. - # The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRetrohunts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRetrohunts` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # state - class ListRetrohuntsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRetrohunts method. - # @!attribute [rw] retrohunts - # @return [::Array<::Google::Cloud::Chronicle::V1::Retrohunt>] - # The retrohunts from the specified rule. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRetrohuntsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRuleDeployment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule deployment to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - class GetRuleDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRuleDeployments. - # @!attribute [rw] parent - # @return [::String] - # Required. The collection of all parents which own all rule deployments. The - # "-" wildcard token must be used as the rule identifier in the resource - # path. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/-` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of rule deployments to return. The service may return - # fewer than this value. If unspecified, at most 100 rule deployments will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRuleDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleDeployments` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # archived, name - class ListRuleDeploymentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRuleDeployments. - # @!attribute [rw] rule_deployments - # @return [::Array<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # The rule deployments from all rules. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRuleDeploymentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateRuleDeployment. - # @!attribute [rw] rule_deployment - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # Required. The rule deployment to update. - # - # The rule deployment's `name` field is used to identify the rule deployment - # to update. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - class UpdateRuleDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CompilationPosition represents the location of a compilation diagnostic in - # rule text. - # @!attribute [r] start_line - # @return [::Integer] - # Output only. Start line number, beginning at 1. - # @!attribute [r] start_column - # @return [::Integer] - # Output only. Start column number, beginning at 1. - # @!attribute [r] end_line - # @return [::Integer] - # Output only. End line number, beginning at 1. - # @!attribute [r] end_column - # @return [::Integer] - # Output only. End column number, beginning at 1. - class CompilationPosition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CompilationDiagnostic represents a compilation diagnostic generated - # during a rule's compilation, such as a compilation error or a compilation - # warning. - # @!attribute [r] message - # @return [::String] - # Output only. The diagnostic message. - # @!attribute [r] position - # @return [::Google::Cloud::Chronicle::V1::CompilationPosition] - # Output only. The approximate position in the rule text associated with the - # compilation diagnostic. - # Compilation Position may be empty. - # @!attribute [r] severity - # @return [::Google::Cloud::Chronicle::V1::CompilationDiagnostic::Severity] - # Output only. The severity of a rule's compilation diagnostic. - # @!attribute [r] uri - # @return [::String] - # Output only. Link to documentation that describes a diagnostic in more - # detail. - class CompilationDiagnostic - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity level of the compilation diagnostic. - module Severity - # An unspecified severity level. - SEVERITY_UNSPECIFIED = 0 - - # A compilation warning. - WARNING = 1 - - # A compilation error. - ERROR = 2 - end - end - - # Severity represents the severity level of the rule. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the severity level. Extracted from the meta section of - # the rule text. - class Severity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation Metadata for Retrohunts. - # @!attribute [rw] retrohunt - # @return [::String] - # The name of the retrohunt. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # @!attribute [rw] execution_interval - # @return [::Google::Type::Interval] - # The start and end time of the retrohunt execution. If the retrohunt is not - # yet finished, the end time of the interval will not be filled. - # @!attribute [rw] progress_percentage - # @return [::Float] - # Percent progress of the retrohunt towards completion, from 0.00 to 100.00. - class RetrohuntMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # InputsUsed is a convenience field that tells us which sources - # of events (if any) were used in the rule. - # NEXT TAG: 4 - # @!attribute [rw] uses_udm - # @return [::Boolean] - # Optional. Whether the rule queries UDM events. - # @!attribute [rw] uses_entity - # @return [::Boolean] - # Optional. Whether the rule queries entity events. - # @!attribute [rw] uses_detection - # @return [::Boolean] - # Optional. Whether the rule queries detections. - class InputsUsed - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RunFrequency indicates the run frequency at which a YARA-L 2 rule will run if - # enabled. - module RunFrequency - # The run frequency is unspecified/unknown. - RUN_FREQUENCY_UNSPECIFIED = 0 - - # Executes in real time. - LIVE = 1 - - # Executes once per hour. - HOURLY = 2 - - # Executes once per day. - DAILY = 3 - end - - # RuleType indicates the YARA-L rule type of user-created and Google Cloud - # Threat Intelligence (GCTI) authored rules. - module RuleType - # The rule type is unspecified/unknown. - RULE_TYPE_UNSPECIFIED = 0 - - # Rule checks for the existence of a single event. - SINGLE_EVENT = 1 - - # Rule checks for correlation between multiple events - MULTI_EVENT = 2 - end - - # RuleView indicates the scope of fields to populate when returning the Rule - # resource. - module RuleView - # The default/unset value. - # The API will default to the BASIC view for ListRules/ListRuleRevisions. - # The API will default to the FULL view for GetRule. - RULE_VIEW_UNSPECIFIED = 0 - - # Include basic metadata about the rule, but not the full contents. - # Returned fields include: revision_id, revision_create_time, display_name, - # author, severity, type, allowed_run_frequency, - # near_real_time_live_rule_eligible, etag, and scope. - # This is the default value for ListRules and ListRuleRevisions. - BASIC = 1 - - # Include all fields. - # This is the default value for GetRule. - FULL = 2 - - # Include basic metadata about the rule's revision only. - # Returned fields include: revision_id and revision_create_time. - REVISION_METADATA_ONLY = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.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! - - -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 from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb +++ /dev/null @@ -1,45 +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 Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile deleted file mode 100644 index 8856abb69960..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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-chronicle-v1", path: "../" -else - gem "google-cloud-chronicle-v1" -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/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb deleted file mode 100644 index 3bfe7e104b89..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_label. -# -def create_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new - - # Call the create_data_access_label method. - result = client.create_data_access_label request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb deleted file mode 100644 index 870849c6db47..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope. -# -def create_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new - - # Call the create_data_access_scope method. - result = client.create_data_access_scope request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb deleted file mode 100644 index e12c3440d608..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label. -# -def delete_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new - - # Call the delete_data_access_label method. - result = client.delete_data_access_label request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb deleted file mode 100644 index 0341030faa5c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope. -# -def delete_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new - - # Call the delete_data_access_scope method. - result = client.delete_data_access_scope request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb deleted file mode 100644 index 988f66268da5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.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 chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_label. -# -def get_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new - - # Call the get_data_access_label method. - result = client.get_data_access_label request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb deleted file mode 100644 index d9de6dbf8b84..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope. -# -def get_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new - - # Call the get_data_access_scope method. - result = client.get_data_access_scope request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb deleted file mode 100644 index e62e53adb905..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.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 chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_data_access_labels call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels. -# -def list_data_access_labels - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new - - # Call the list_data_access_labels method. - result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. - p item - end -end -# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb deleted file mode 100644 index 4b11c99375f7..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.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 chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_data_access_scopes call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes. -# -def list_data_access_scopes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new - - # Call the list_data_access_scopes method. - result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. - p item - end -end -# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb deleted file mode 100644 index 2974c40a7a70..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_label. -# -def update_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new - - # Call the update_data_access_label method. - result = client.update_data_access_label request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb deleted file mode 100644 index 81a0e349a4fa..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope. -# -def update_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new - - # Call the update_data_access_scope method. - result = client.update_data_access_scope request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb deleted file mode 100644 index 0f928a0c692e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.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 chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the bulk_create_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows. -# -def bulk_create_data_table_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new - - # Call the bulk_create_data_table_rows method. - result = client.bulk_create_data_table_rows request - - # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. - p result -end -# [END chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb deleted file mode 100644 index b830992e26f0..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.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 chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the bulk_get_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows. -# -def bulk_get_data_table_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new - - # Call the bulk_get_data_table_rows method. - result = client.bulk_get_data_table_rows request - - # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. - p result -end -# [END chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb deleted file mode 100644 index bf1a60ed662a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.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 chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the bulk_replace_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows. -# -def bulk_replace_data_table_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new - - # Call the bulk_replace_data_table_rows method. - result = client.bulk_replace_data_table_rows request - - # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. - p result -end -# [END chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb deleted file mode 100644 index 8e3e06124128..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.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 chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the bulk_update_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows. -# -def bulk_update_data_table_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new - - # Call the bulk_update_data_table_rows method. - result = client.bulk_update_data_table_rows request - - # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. - p result -end -# [END chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb deleted file mode 100644 index 20855dc93460..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.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 chronicle_v1_generated_DataTableService_CreateDataTable_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#create_data_table. -# -def create_data_table - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new - - # Call the create_data_table method. - result = client.create_data_table request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - p result -end -# [END chronicle_v1_generated_DataTableService_CreateDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb deleted file mode 100644 index e73cfbdf0f57..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.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 chronicle_v1_generated_DataTableService_CreateDataTableRow_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#create_data_table_row. -# -def create_data_table_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new - - # Call the create_data_table_row method. - result = client.create_data_table_row request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - p result -end -# [END chronicle_v1_generated_DataTableService_CreateDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb deleted file mode 100644 index b53e925c209a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.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 chronicle_v1_generated_DataTableService_DeleteDataTable_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#delete_data_table. -# -def delete_data_table - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new - - # Call the delete_data_table method. - result = client.delete_data_table request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_DataTableService_DeleteDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb deleted file mode 100644 index 3a0d3d7177b5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.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 chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#delete_data_table_row. -# -def delete_data_table_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new - - # Call the delete_data_table_row method. - result = client.delete_data_table_row request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb deleted file mode 100644 index cdfb160a5412..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.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 chronicle_v1_generated_DataTableService_GetDataTable_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table. -# -def get_data_table - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new - - # Call the get_data_table method. - result = client.get_data_table request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - p result -end -# [END chronicle_v1_generated_DataTableService_GetDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb deleted file mode 100644 index f94f46436ce6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.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 chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_table_operation_errors call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors. -# -def get_data_table_operation_errors - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new - - # Call the get_data_table_operation_errors method. - result = client.get_data_table_operation_errors request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. - p result -end -# [END chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb deleted file mode 100644 index 3b0cd44aedd2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.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 chronicle_v1_generated_DataTableService_GetDataTableRow_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table_row. -# -def get_data_table_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new - - # Call the get_data_table_row method. - result = client.get_data_table_row request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - p result -end -# [END chronicle_v1_generated_DataTableService_GetDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb deleted file mode 100644 index 9da3fb51c80a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.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 chronicle_v1_generated_DataTableService_ListDataTableRows_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#list_data_table_rows. -# -def list_data_table_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new - - # Call the list_data_table_rows method. - result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. - p item - end -end -# [END chronicle_v1_generated_DataTableService_ListDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb deleted file mode 100644 index b3aab95d25d0..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.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 chronicle_v1_generated_DataTableService_ListDataTables_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_data_tables call in the DataTableService 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::Chronicle::V1::DataTableService::Client#list_data_tables. -# -def list_data_tables - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new - - # Call the list_data_tables method. - result = client.list_data_tables 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::Chronicle::V1::DataTable. - p item - end -end -# [END chronicle_v1_generated_DataTableService_ListDataTables_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb deleted file mode 100644 index aa62027b9721..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.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 chronicle_v1_generated_DataTableService_UpdateDataTable_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#update_data_table. -# -def update_data_table - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new - - # Call the update_data_table method. - result = client.update_data_table request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - p result -end -# [END chronicle_v1_generated_DataTableService_UpdateDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb deleted file mode 100644 index d04975357772..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.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 chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#update_data_table_row. -# -def update_data_table_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new - - # Call the update_data_table_row method. - result = client.update_data_table_row request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - p result -end -# [END chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb deleted file mode 100644 index 76ac024b263d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.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 chronicle_v1_generated_EntityService_CreateWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#create_watchlist. -# -def create_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new - - # Call the create_watchlist method. - result = client.create_watchlist request - - # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - p result -end -# [END chronicle_v1_generated_EntityService_CreateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb deleted file mode 100644 index dce65e1ea1f1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.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 chronicle_v1_generated_EntityService_DeleteWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#delete_watchlist. -# -def delete_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new - - # Call the delete_watchlist method. - result = client.delete_watchlist request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_EntityService_DeleteWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb deleted file mode 100644 index 429a7abe7363..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.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 chronicle_v1_generated_EntityService_GetWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#get_watchlist. -# -def get_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new - - # Call the get_watchlist method. - result = client.get_watchlist request - - # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - p result -end -# [END chronicle_v1_generated_EntityService_GetWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb deleted file mode 100644 index 07fb0f279542..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.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 chronicle_v1_generated_EntityService_ListWatchlists_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_watchlists call in the EntityService 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::Chronicle::V1::EntityService::Client#list_watchlists. -# -def list_watchlists - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new - - # Call the list_watchlists method. - result = client.list_watchlists 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::Chronicle::V1::Watchlist. - p item - end -end -# [END chronicle_v1_generated_EntityService_ListWatchlists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb deleted file mode 100644 index fe92dd9d1924..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.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 chronicle_v1_generated_EntityService_UpdateWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#update_watchlist. -# -def update_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new - - # Call the update_watchlist method. - result = client.update_watchlist request - - # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - p result -end -# [END chronicle_v1_generated_EntityService_UpdateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb deleted file mode 100644 index 8fdeb2d7ad47..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.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 chronicle_v1_generated_InstanceService_GetInstance_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_instance call in the InstanceService 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::Chronicle::V1::InstanceService::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::InstanceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::Chronicle::V1::Instance. - p result -end -# [END chronicle_v1_generated_InstanceService_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb deleted file mode 100644 index 56680299d2ab..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.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 chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#create_reference_list. -# -def create_reference_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new - - # Call the create_reference_list method. - result = client.create_reference_list request - - # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - p result -end -# [END chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb deleted file mode 100644 index 9fee3cf12ff5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.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 chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#get_reference_list. -# -def get_reference_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new - - # Call the get_reference_list method. - result = client.get_reference_list request - - # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - p result -end -# [END chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb deleted file mode 100644 index 11926590f8d3..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.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 chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_reference_lists call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#list_reference_lists. -# -def list_reference_lists - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new - - # Call the list_reference_lists method. - result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. - p item - end -end -# [END chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb deleted file mode 100644 index a914529bd2b1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.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 chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#update_reference_list. -# -def update_reference_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new - - # Call the update_reference_list method. - result = client.update_reference_list request - - # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - p result -end -# [END chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb deleted file mode 100644 index 0cac677634bb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#create_retrohunt. -# -def create_retrohunt - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new - - # Call the create_retrohunt method. - result = client.create_retrohunt 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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb deleted file mode 100644 index 57e6c2e2a973..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.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 chronicle_v1_generated_RuleService_CreateRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#create_rule. -# -def create_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new - - # Call the create_rule method. - result = client.create_rule request - - # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - p result -end -# [END chronicle_v1_generated_RuleService_CreateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb deleted file mode 100644 index db56a864183a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.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 chronicle_v1_generated_RuleService_DeleteRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#delete_rule. -# -def delete_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new - - # Call the delete_rule method. - result = client.delete_rule request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_RuleService_DeleteRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb deleted file mode 100644 index 481026822412..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.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 chronicle_v1_generated_RuleService_GetRetrohunt_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#get_retrohunt. -# -def get_retrohunt - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new - - # Call the get_retrohunt method. - result = client.get_retrohunt request - - # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. - p result -end -# [END chronicle_v1_generated_RuleService_GetRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb deleted file mode 100644 index eb550559d7a9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.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 chronicle_v1_generated_RuleService_GetRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule. -# -def get_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetRuleRequest.new - - # Call the get_rule method. - result = client.get_rule request - - # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - p result -end -# [END chronicle_v1_generated_RuleService_GetRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb deleted file mode 100644 index c4d8a125f230..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.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 chronicle_v1_generated_RuleService_GetRuleDeployment_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule_deployment. -# -def get_rule_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new - - # Call the get_rule_deployment method. - result = client.get_rule_deployment request - - # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - p result -end -# [END chronicle_v1_generated_RuleService_GetRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb deleted file mode 100644 index fd21d3d155c8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.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 chronicle_v1_generated_RuleService_ListRetrohunts_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_retrohunts call in the RuleService 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::Chronicle::V1::RuleService::Client#list_retrohunts. -# -def list_retrohunts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new - - # Call the list_retrohunts method. - result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRetrohunts_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb deleted file mode 100644 index 061793135cde..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.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 chronicle_v1_generated_RuleService_ListRuleDeployments_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_rule_deployments call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_deployments. -# -def list_rule_deployments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new - - # Call the list_rule_deployments method. - result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRuleDeployments_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb deleted file mode 100644 index ee56939b8586..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.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 chronicle_v1_generated_RuleService_ListRuleRevisions_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_rule_revisions call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_revisions. -# -def list_rule_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new - - # Call the list_rule_revisions method. - result = client.list_rule_revisions 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::Chronicle::V1::Rule. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRuleRevisions_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb deleted file mode 100644 index 607a52db7bbb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.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 chronicle_v1_generated_RuleService_ListRules_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_rules call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rules. -# -def list_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRulesRequest.new - - # Call the list_rules method. - result = client.list_rules 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::Chronicle::V1::Rule. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb deleted file mode 100644 index 612a59e32e81..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.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 chronicle_v1_generated_RuleService_UpdateRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule. -# -def update_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new - - # Call the update_rule method. - result = client.update_rule request - - # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - p result -end -# [END chronicle_v1_generated_RuleService_UpdateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb deleted file mode 100644 index c8c3638a445e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.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 chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule_deployment. -# -def update_rule_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new - - # Call the update_rule_deployment method. - result = client.update_rule_deployment request - - # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - p result -end -# [END chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json b/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json deleted file mode 100644 index 07d9b2ddb5a1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json +++ /dev/null @@ -1,2655 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-chronicle-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.chronicle.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync", - "title": "Snippet for the get_dashboard_query call in the DashboardQueryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query.", - "file": "dashboard_query_service/get_dashboard_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dashboard_query", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DashboardQuery", - "client": { - "short_name": "DashboardQueryService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client" - }, - "method": { - "short_name": "GetDashboardQuery", - "full_name": "google.cloud.chronicle.v1.DashboardQueryService.GetDashboardQuery", - "service": { - "short_name": "DashboardQueryService", - "full_name": "google.cloud.chronicle.v1.DashboardQueryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync", - "title": "Snippet for the execute_dashboard_query call in the DashboardQueryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query.", - "file": "dashboard_query_service/execute_dashboard_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "execute_dashboard_query", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse", - "client": { - "short_name": "DashboardQueryService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client" - }, - "method": { - "short_name": "ExecuteDashboardQuery", - "full_name": "google.cloud.chronicle.v1.DashboardQueryService.ExecuteDashboardQuery", - "service": { - "short_name": "DashboardQueryService", - "full_name": "google.cloud.chronicle.v1.DashboardQueryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync", - "title": "Snippet for the get_dashboard_chart call in the DashboardChartService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart.", - "file": "dashboard_chart_service/get_dashboard_chart.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dashboard_chart", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDashboardChartRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DashboardChart", - "client": { - "short_name": "DashboardChartService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client" - }, - "method": { - "short_name": "GetDashboardChart", - "full_name": "google.cloud.chronicle.v1.DashboardChartService.GetDashboardChart", - "service": { - "short_name": "DashboardChartService", - "full_name": "google.cloud.chronicle.v1.DashboardChartService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync", - "title": "Snippet for the batch_get_dashboard_charts call in the DashboardChartService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts.", - "file": "dashboard_chart_service/batch_get_dashboard_charts.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_get_dashboard_charts", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse", - "client": { - "short_name": "DashboardChartService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client" - }, - "method": { - "short_name": "BatchGetDashboardCharts", - "full_name": "google.cloud.chronicle.v1.DashboardChartService.BatchGetDashboardCharts", - "service": { - "short_name": "DashboardChartService", - "full_name": "google.cloud.chronicle.v1.DashboardChartService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync", - "title": "Snippet for the create_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label.", - "file": "data_access_control_service/create_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "CreateDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync", - "title": "Snippet for the get_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label.", - "file": "data_access_control_service/get_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "GetDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync", - "title": "Snippet for the list_data_access_labels call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels.", - "file": "data_access_control_service/list_data_access_labels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_access_labels", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "ListDataAccessLabels", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessLabels", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync", - "title": "Snippet for the update_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label.", - "file": "data_access_control_service/update_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "UpdateDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync", - "title": "Snippet for the delete_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label.", - "file": "data_access_control_service/delete_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "DeleteDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync", - "title": "Snippet for the create_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope.", - "file": "data_access_control_service/create_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "CreateDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync", - "title": "Snippet for the get_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope.", - "file": "data_access_control_service/get_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "GetDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync", - "title": "Snippet for the list_data_access_scopes call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes.", - "file": "data_access_control_service/list_data_access_scopes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_access_scopes", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "ListDataAccessScopes", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessScopes", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync", - "title": "Snippet for the update_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope.", - "file": "data_access_control_service/update_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "UpdateDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync", - "title": "Snippet for the delete_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope.", - "file": "data_access_control_service/delete_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "DeleteDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_CreateDataTable_sync", - "title": "Snippet for the create_data_table call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table.", - "file": "data_table_service/create_data_table.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_table", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateDataTableRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTable", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "CreateDataTable", - "full_name": "google.cloud.chronicle.v1.DataTableService.CreateDataTable", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_ListDataTables_sync", - "title": "Snippet for the list_data_tables call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_tables.", - "file": "data_table_service/list_data_tables.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_tables", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_tables", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListDataTablesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListDataTablesResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "ListDataTables", - "full_name": "google.cloud.chronicle.v1.DataTableService.ListDataTables", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_GetDataTable_sync", - "title": "Snippet for the get_data_table call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table.", - "file": "data_table_service/get_data_table.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_table", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataTableRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTable", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "GetDataTable", - "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTable", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_UpdateDataTable_sync", - "title": "Snippet for the update_data_table call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table.", - "file": "data_table_service/update_data_table.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_table", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateDataTableRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTable", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "UpdateDataTable", - "full_name": "google.cloud.chronicle.v1.DataTableService.UpdateDataTable", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_DeleteDataTable_sync", - "title": "Snippet for the delete_data_table call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table.", - "file": "data_table_service/delete_data_table.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_table", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteDataTableRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "DeleteDataTable", - "full_name": "google.cloud.chronicle.v1.DataTableService.DeleteDataTable", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_CreateDataTableRow_sync", - "title": "Snippet for the create_data_table_row call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table_row.", - "file": "data_table_service/create_data_table_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_table_row", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "CreateDataTableRow", - "full_name": "google.cloud.chronicle.v1.DataTableService.CreateDataTableRow", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync", - "title": "Snippet for the update_data_table_row call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table_row.", - "file": "data_table_service/update_data_table_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_table_row", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "UpdateDataTableRow", - "full_name": "google.cloud.chronicle.v1.DataTableService.UpdateDataTableRow", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_ListDataTableRows_sync", - "title": "Snippet for the list_data_table_rows call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_table_rows.", - "file": "data_table_service/list_data_table_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_table_rows", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_table_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "ListDataTableRows", - "full_name": "google.cloud.chronicle.v1.DataTableService.ListDataTableRows", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_GetDataTableRow_sync", - "title": "Snippet for the get_data_table_row call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_row.", - "file": "data_table_service/get_data_table_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_table_row", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataTableRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "GetDataTableRow", - "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTableRow", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync", - "title": "Snippet for the delete_data_table_row call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table_row.", - "file": "data_table_service/delete_data_table_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_table_row", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "DeleteDataTableRow", - "full_name": "google.cloud.chronicle.v1.DataTableService.DeleteDataTableRow", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync", - "title": "Snippet for the bulk_create_data_table_rows call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows.", - "file": "data_table_service/bulk_create_data_table_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_create_data_table_rows", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "BulkCreateDataTableRows", - "full_name": "google.cloud.chronicle.v1.DataTableService.BulkCreateDataTableRows", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync", - "title": "Snippet for the bulk_get_data_table_rows call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows.", - "file": "data_table_service/bulk_get_data_table_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_get_data_table_rows", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "BulkGetDataTableRows", - "full_name": "google.cloud.chronicle.v1.DataTableService.BulkGetDataTableRows", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync", - "title": "Snippet for the bulk_replace_data_table_rows call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows.", - "file": "data_table_service/bulk_replace_data_table_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_replace_data_table_rows", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "BulkReplaceDataTableRows", - "full_name": "google.cloud.chronicle.v1.DataTableService.BulkReplaceDataTableRows", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync", - "title": "Snippet for the bulk_update_data_table_rows call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows.", - "file": "data_table_service/bulk_update_data_table_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_update_data_table_rows", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "BulkUpdateDataTableRows", - "full_name": "google.cloud.chronicle.v1.DataTableService.BulkUpdateDataTableRows", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync", - "title": "Snippet for the get_data_table_operation_errors call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors.", - "file": "data_table_service/get_data_table_operation_errors.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_table_operation_errors", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTableOperationErrors", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "GetDataTableOperationErrors", - "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTableOperationErrors", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_GetWatchlist_sync", - "title": "Snippet for the get_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist.", - "file": "entity_service/get_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "GetWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.GetWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_ListWatchlists_sync", - "title": "Snippet for the list_watchlists call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists.", - "file": "entity_service/list_watchlists.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_watchlists", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListWatchlistsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListWatchlistsResponse", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "ListWatchlists", - "full_name": "google.cloud.chronicle.v1.EntityService.ListWatchlists", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_CreateWatchlist_sync", - "title": "Snippet for the create_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist.", - "file": "entity_service/create_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "CreateWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.CreateWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_UpdateWatchlist_sync", - "title": "Snippet for the update_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist.", - "file": "entity_service/update_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "UpdateWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.UpdateWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_DeleteWatchlist_sync", - "title": "Snippet for the delete_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist.", - "file": "entity_service/delete_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "DeleteWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.DeleteWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync", - "title": "Snippet for the create_native_dashboard call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard.", - "file": "native_dashboard_service/create_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "CreateNativeDashboard", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.CreateNativeDashboard", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync", - "title": "Snippet for the get_native_dashboard call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard.", - "file": "native_dashboard_service/get_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "GetNativeDashboard", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.GetNativeDashboard", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync", - "title": "Snippet for the list_native_dashboards call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards.", - "file": "native_dashboard_service/list_native_dashboards.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_native_dashboards", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "ListNativeDashboards", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ListNativeDashboards", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync", - "title": "Snippet for the update_native_dashboard call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard.", - "file": "native_dashboard_service/update_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "UpdateNativeDashboard", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.UpdateNativeDashboard", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync", - "title": "Snippet for the duplicate_native_dashboard call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard.", - "file": "native_dashboard_service/duplicate_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "duplicate_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "DuplicateNativeDashboard", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DuplicateNativeDashboard", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync", - "title": "Snippet for the delete_native_dashboard call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard.", - "file": "native_dashboard_service/delete_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "DeleteNativeDashboard", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DeleteNativeDashboard", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_AddChart_sync", - "title": "Snippet for the add_chart call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#add_chart.", - "file": "native_dashboard_service/add_chart.rb", - "language": "RUBY", - "client_method": { - "short_name": "add_chart", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#add_chart", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::AddChartRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::AddChartResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "AddChart", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.AddChart", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_RemoveChart_sync", - "title": "Snippet for the remove_chart call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#remove_chart.", - "file": "native_dashboard_service/remove_chart.rb", - "language": "RUBY", - "client_method": { - "short_name": "remove_chart", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#remove_chart", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::RemoveChartRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "RemoveChart", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.RemoveChart", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_EditChart_sync", - "title": "Snippet for the edit_chart call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#edit_chart.", - "file": "native_dashboard_service/edit_chart.rb", - "language": "RUBY", - "client_method": { - "short_name": "edit_chart", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#edit_chart", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::EditChartRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::EditChartResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "EditChart", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.EditChart", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync", - "title": "Snippet for the duplicate_chart call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_chart.", - "file": "native_dashboard_service/duplicate_chart.rb", - "language": "RUBY", - "client_method": { - "short_name": "duplicate_chart", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_chart", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DuplicateChartRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DuplicateChartResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "DuplicateChart", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DuplicateChart", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync", - "title": "Snippet for the export_native_dashboards call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards.", - "file": "native_dashboard_service/export_native_dashboards.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_native_dashboards", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "ExportNativeDashboards", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ExportNativeDashboards", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync", - "title": "Snippet for the import_native_dashboards call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards.", - "file": "native_dashboard_service/import_native_dashboards.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_native_dashboards", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "ImportNativeDashboards", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ImportNativeDashboards", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync", - "title": "Snippet for the get_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard.", - "file": "featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_featured_content_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard", - "client": { - "short_name": "FeaturedContentNativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" - }, - "method": { - "short_name": "GetFeaturedContentNativeDashboard", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.GetFeaturedContentNativeDashboard", - "service": { - "short_name": "FeaturedContentNativeDashboardService", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync", - "title": "Snippet for the list_featured_content_native_dashboards call in the FeaturedContentNativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards.", - "file": "featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_featured_content_native_dashboards", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse", - "client": { - "short_name": "FeaturedContentNativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" - }, - "method": { - "short_name": "ListFeaturedContentNativeDashboards", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.ListFeaturedContentNativeDashboards", - "service": { - "short_name": "FeaturedContentNativeDashboardService", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync", - "title": "Snippet for the install_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard.", - "file": "featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "install_featured_content_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse", - "client": { - "short_name": "FeaturedContentNativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" - }, - "method": { - "short_name": "InstallFeaturedContentNativeDashboard", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.InstallFeaturedContentNativeDashboard", - "service": { - "short_name": "FeaturedContentNativeDashboardService", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_InstanceService_GetInstance_sync", - "title": "Snippet for the get_instance call in the InstanceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance.", - "file": "instance_service/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Instance", - "client": { - "short_name": "InstanceService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.chronicle.v1.InstanceService.GetInstance", - "service": { - "short_name": "InstanceService", - "full_name": "google.cloud.chronicle.v1.InstanceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_GetReferenceList_sync", - "title": "Snippet for the get_reference_list call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list.", - "file": "reference_list_service/get_reference_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_reference_list", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetReferenceListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "GetReferenceList", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.GetReferenceList", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync", - "title": "Snippet for the list_reference_lists call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists.", - "file": "reference_list_service/list_reference_lists.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reference_lists", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListReferenceListsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListReferenceListsResponse", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "ListReferenceLists", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.ListReferenceLists", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync", - "title": "Snippet for the create_reference_list call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list.", - "file": "reference_list_service/create_reference_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_reference_list", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateReferenceListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "CreateReferenceList", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.CreateReferenceList", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync", - "title": "Snippet for the update_reference_list call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list.", - "file": "reference_list_service/update_reference_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_reference_list", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "UpdateReferenceList", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.UpdateReferenceList", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_CreateRule_sync", - "title": "Snippet for the create_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_rule.", - "file": "rule_service/create_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Rule", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "CreateRule", - "full_name": "google.cloud.chronicle.v1.RuleService.CreateRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_GetRule_sync", - "title": "Snippet for the get_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule.", - "file": "rule_service/get_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Rule", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "GetRule", - "full_name": "google.cloud.chronicle.v1.RuleService.GetRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRules_sync", - "title": "Snippet for the list_rules call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rules.", - "file": "rule_service/list_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rules", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRulesResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRules", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRules", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_UpdateRule_sync", - "title": "Snippet for the update_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule.", - "file": "rule_service/update_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Rule", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "UpdateRule", - "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_DeleteRule_sync", - "title": "Snippet for the delete_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule.", - "file": "rule_service/delete_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "DeleteRule", - "full_name": "google.cloud.chronicle.v1.RuleService.DeleteRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRuleRevisions_sync", - "title": "Snippet for the list_rule_revisions call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions.", - "file": "rule_service/list_rule_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rule_revisions", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRuleRevisions", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleRevisions", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_CreateRetrohunt_sync", - "title": "Snippet for the create_retrohunt call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt.", - "file": "rule_service/create_retrohunt.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_retrohunt", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "CreateRetrohunt", - "full_name": "google.cloud.chronicle.v1.RuleService.CreateRetrohunt", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_GetRetrohunt_sync", - "title": "Snippet for the get_retrohunt call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt.", - "file": "rule_service/get_retrohunt.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_retrohunt", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetRetrohuntRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Retrohunt", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "GetRetrohunt", - "full_name": "google.cloud.chronicle.v1.RuleService.GetRetrohunt", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRetrohunts_sync", - "title": "Snippet for the list_retrohunts call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts.", - "file": "rule_service/list_retrohunts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_retrohunts", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRetrohunts", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRetrohunts", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_GetRuleDeployment_sync", - "title": "Snippet for the get_rule_deployment call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment.", - "file": "rule_service/get_rule_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_rule_deployment", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "GetRuleDeployment", - "full_name": "google.cloud.chronicle.v1.RuleService.GetRuleDeployment", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRuleDeployments_sync", - "title": "Snippet for the list_rule_deployments call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments.", - "file": "rule_service/list_rule_deployments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rule_deployments", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRuleDeployments", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleDeployments", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync", - "title": "Snippet for the update_rule_deployment call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment.", - "file": "rule_service/update_rule_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_rule_deployment", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "UpdateRuleDeployment", - "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRuleDeployment", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb deleted file mode 100644 index 8ef29809b076..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/chronicle/v1/data_access_control_service" - -class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_label_path project: "value0", location: "value1", instance: "value2", data_access_label: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessLabels/value3", path - end - end - - def test_data_access_scope_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb deleted file mode 100644 index a20b2c953e40..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb +++ /dev/null @@ -1,651 +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/chronicle/v1/data_access_control_pb" -require "google/cloud/chronicle/v1/data_access_control_service/rest" - - -class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_access_label = {} - data_access_label_id = "hello world" - - create_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_access_label_client_stub.call_count - end - end - end - - def test_get_data_access_label - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_access_label({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_access_label name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_access_label({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_access_label_client_stub.call_count - end - end - end - - def test_list_data_access_labels - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_access_labels_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_labels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_access_labels_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_access_labels parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_access_labels_client_stub.call_count - end - end - end - - def test_update_data_access_label - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_access_label = {} - update_mask = {} - - update_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_access_label_client_stub.call_count - end - end - end - - def test_delete_data_access_label - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_access_label({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_access_label name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_access_label({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_access_label_client_stub.call_count - end - end - end - - def test_create_data_access_scope - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_access_scope = {} - data_access_scope_id = "hello world" - - create_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_access_scope_client_stub.call_count - end - end - end - - def test_get_data_access_scope - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_access_scope({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_access_scope name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_access_scope({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_access_scope_client_stub.call_count - end - end - end - - def test_list_data_access_scopes - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_access_scopes_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_scopes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_access_scopes_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_access_scopes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_access_scopes_client_stub.call_count - end - end - end - - def test_update_data_access_scope - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_access_scope = {} - update_mask = {} - - update_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_access_scope_client_stub.call_count - end - end - end - - def test_delete_data_access_scope - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_access_scope({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_access_scope name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_access_scope({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb deleted file mode 100644 index 32e8f27fe8cf..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb +++ /dev/null @@ -1,718 +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/chronicle/v1/data_access_control_pb" -require "google/cloud/chronicle/v1/data_access_control_service" - -class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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" - data_access_label = {} - data_access_label_id = "hello world" - - create_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] - assert_equal "hello world", request["data_access_label_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_access_label_client_stub.call_rpc_count - end - end - - def test_get_data_access_label - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_access_label({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_access_label name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_access_label({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count - end - end - - def test_list_data_access_labels - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_access_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_access_labels, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_access_labels_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_access_labels parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_data_access_labels_client_stub.call_rpc_count - end - end - - def test_update_data_access_label - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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. - data_access_label = {} - update_mask = {} - - update_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_access_label({ data_access_label: data_access_label, 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 - client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, 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_data_access_label_client_stub.call_rpc_count - end - end - - def test_delete_data_access_label - # 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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_access_label({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_access_label name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_access_label({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count - end - end - - def test_create_data_access_scope - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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" - data_access_scope = {} - data_access_scope_id = "hello world" - - create_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] - assert_equal "hello world", request["data_access_scope_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_access_scope_client_stub.call_rpc_count - end - end - - def test_get_data_access_scope - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_access_scope({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_access_scope name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_access_scope({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.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_data_access_scope_client_stub.call_rpc_count - end - end - - def test_list_data_access_scopes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_access_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_access_scopes, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_access_scopes_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_access_scopes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_data_access_scopes_client_stub.call_rpc_count - end - end - - def test_update_data_access_scope - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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. - data_access_scope = {} - update_mask = {} - - update_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_access_scope({ data_access_scope: data_access_scope, 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 - client.update_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, 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_data_access_scope_client_stub.call_rpc_count - end - end - - def test_delete_data_access_scope - # 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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_access_scope({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_access_scope name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_access_scope({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.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_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb deleted file mode 100644 index ea65a25ca487..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb +++ /dev/null @@ -1,103 +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/chronicle/v1/data_table_service" - -class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_access_scope_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path - end - end - - def test_data_table_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_table_path project: "value0", location: "value1", instance: "value2", data_table: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataTables/value3", path - end - end - - def test_data_table_operation_errors_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_table_operation_errors_path project: "value0", location: "value1", instance: "value2", data_table_operation_errors: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataTableOperationErrors/value3", path - end - end - - def test_data_table_row_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_table_row_path project: "value0", location: "value1", instance: "value2", data_table: "value3", data_table_row: "value4" - assert_equal "projects/value0/locations/value1/instances/value2/dataTables/value3/dataTableRows/value4", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb deleted file mode 100644 index 7509d98ad2cb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb +++ /dev/null @@ -1,926 +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/chronicle/v1/data_table_pb" -require "google/cloud/chronicle/v1/data_table_service/rest" - - -class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_table - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTable.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_table = {} - data_table_id = "hello world" - - create_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_create_data_table_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_table parent: parent, data_table: data_table, data_table_id: data_table_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_table ::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_table(::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_table_client_stub.call_count - end - end - end - - def test_list_data_tables - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - - list_data_tables_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_list_data_tables_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_tables_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_tables parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_tables ::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_tables(::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_tables_client_stub.call_count - end - end - end - - def test_get_data_table - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTable.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_table({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_table name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_table ::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_table({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_table(::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_table_client_stub.call_count - end - end - end - - def test_update_data_table - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTable.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_table = {} - update_mask = {} - - update_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_update_data_table_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_table({ data_table: data_table, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_table data_table: data_table, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_table ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_table({ data_table: data_table, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_table(::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_table_client_stub.call_count - end - end - end - - def test_delete_data_table - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_delete_data_table_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_table({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_table name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_table ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_table({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_table(::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_table_client_stub.call_count - end - end - end - - def test_create_data_table_row - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_table_row = {} - - create_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_create_data_table_row_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_table_row({ parent: parent, data_table_row: data_table_row }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_table_row parent: parent, data_table_row: data_table_row do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_table_row ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_table_row({ parent: parent, data_table_row: data_table_row }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_table_row(::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_table_row_client_stub.call_count - end - end - end - - def test_update_data_table_row - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_table_row = {} - update_mask = {} - - update_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_update_data_table_row_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_table_row data_table_row: data_table_row, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_table_row ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_table_row(::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_table_row_client_stub.call_count - end - end - end - - def test_list_data_table_rows - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - filter = "hello world" - - list_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_list_data_table_rows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_table_rows parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_table_rows ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_table_rows(::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_table_rows_client_stub.call_count - end - end - end - - def test_get_data_table_row - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_row_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_table_row({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_table_row name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_table_row ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_table_row({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_table_row(::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_table_row_client_stub.call_count - end - end - end - - def test_delete_data_table_row - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_delete_data_table_row_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_table_row({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_table_row name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_table_row ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_table_row({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_table_row(::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_table_row_client_stub.call_count - end - end - end - - def test_bulk_create_data_table_rows - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - bulk_create_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_create_data_table_rows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_create_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.bulk_create_data_table_rows({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.bulk_create_data_table_rows parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.bulk_create_data_table_rows ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.bulk_create_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.bulk_create_data_table_rows(::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_create_data_table_rows_client_stub.call_count - end - end - end - - def test_bulk_get_data_table_rows - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - bulk_get_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_get_data_table_rows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_get_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.bulk_get_data_table_rows({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.bulk_get_data_table_rows parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.bulk_get_data_table_rows ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.bulk_get_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.bulk_get_data_table_rows(::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_get_data_table_rows_client_stub.call_count - end - end - end - - def test_bulk_replace_data_table_rows - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - bulk_replace_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_replace_data_table_rows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_replace_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.bulk_replace_data_table_rows({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.bulk_replace_data_table_rows parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.bulk_replace_data_table_rows ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.bulk_replace_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.bulk_replace_data_table_rows(::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_replace_data_table_rows_client_stub.call_count - end - end - end - - def test_bulk_update_data_table_rows - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - bulk_update_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_update_data_table_rows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_update_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.bulk_update_data_table_rows({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.bulk_update_data_table_rows parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.bulk_update_data_table_rows ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.bulk_update_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.bulk_update_data_table_rows(::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_update_data_table_rows_client_stub.call_count - end - end - end - - def test_get_data_table_operation_errors - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_table_operation_errors_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_operation_errors_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_table_operation_errors_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_table_operation_errors({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_table_operation_errors name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_table_operation_errors ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_table_operation_errors({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_table_operation_errors(::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_table_operation_errors_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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb deleted file mode 100644 index 0abf7ea87f8f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb +++ /dev/null @@ -1,1018 +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/chronicle/v1/data_table_pb" -require "google/cloud/chronicle/v1/data_table_service" - -class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_table - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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" - data_table = {} - data_table_id = "hello world" - - create_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_table, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTable), request["data_table"] - assert_equal "hello world", request["data_table_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_table parent: parent, data_table: data_table, data_table_id: data_table_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_table ::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_table(::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_table_client_stub.call_rpc_count - end - end - - def test_list_data_tables - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.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" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - - list_data_tables_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_tables, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataTablesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_tables_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_tables parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_tables ::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) 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 - client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, 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 - client.list_data_tables(::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), 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_data_tables_client_stub.call_rpc_count - end - end - - def test_get_data_table - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_table, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_table({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_table name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_table ::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_table({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_table(::Google::Cloud::Chronicle::V1::GetDataTableRequest.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_data_table_client_stub.call_rpc_count - end - end - - def test_update_data_table - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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. - data_table = {} - update_mask = {} - - update_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_table, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTable), request["data_table"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_table({ data_table: data_table, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_table data_table: data_table, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_table ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_table({ data_table: data_table, 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 - client.update_data_table(::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, 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_data_table_client_stub.call_rpc_count - end - end - - def test_delete_data_table - # 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" - force = true - - delete_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_table, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_table({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_table name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_table ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_table({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_table(::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_table_client_stub.call_rpc_count - end - end - - def test_create_data_table_row - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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" - data_table_row = {} - - create_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_table_row, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTableRow), request["data_table_row"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_table_row({ parent: parent, data_table_row: data_table_row }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_table_row parent: parent, data_table_row: data_table_row do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_table_row ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_table_row({ parent: parent, data_table_row: data_table_row }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_table_row(::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_table_row_client_stub.call_rpc_count - end - end - - def test_update_data_table_row - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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. - data_table_row = {} - update_mask = {} - - update_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_table_row, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTableRow), request["data_table_row"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_table_row data_table_row: data_table_row, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_table_row ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_table_row({ data_table_row: data_table_row, 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 - client.update_data_table_row(::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, 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_data_table_row_client_stub.call_rpc_count - end - end - - def test_list_data_table_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.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" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - filter = "hello world" - - list_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_table_rows, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_table_rows parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_table_rows ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) 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 - client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, 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 - client.list_data_table_rows(::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), 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_data_table_rows_client_stub.call_rpc_count - end - end - - def test_get_data_table_row - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_table_row, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_table_row({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_table_row name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_table_row ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_table_row({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_table_row(::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.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_data_table_row_client_stub.call_rpc_count - end - end - - def test_delete_data_table_row - # 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_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_table_row, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_table_row({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_table_row name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_table_row ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_table_row({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_table_row(::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.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_data_table_row_client_stub.call_rpc_count - end - end - - def test_bulk_create_data_table_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.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" - requests = [{}] - - bulk_create_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_create_data_table_rows, name - assert_kind_of ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_create_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.bulk_create_data_table_rows({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.bulk_create_data_table_rows parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.bulk_create_data_table_rows ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.bulk_create_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.bulk_create_data_table_rows(::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_create_data_table_rows_client_stub.call_rpc_count - end - end - - def test_bulk_get_data_table_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.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" - requests = [{}] - - bulk_get_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_get_data_table_rows, name - assert_kind_of ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_get_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.bulk_get_data_table_rows({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.bulk_get_data_table_rows parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.bulk_get_data_table_rows ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.bulk_get_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.bulk_get_data_table_rows(::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_get_data_table_rows_client_stub.call_rpc_count - end - end - - def test_bulk_replace_data_table_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.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" - requests = [{}] - - bulk_replace_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_replace_data_table_rows, name - assert_kind_of ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_replace_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.bulk_replace_data_table_rows({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.bulk_replace_data_table_rows parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.bulk_replace_data_table_rows ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.bulk_replace_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.bulk_replace_data_table_rows(::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_replace_data_table_rows_client_stub.call_rpc_count - end - end - - def test_bulk_update_data_table_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.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" - requests = [{}] - - bulk_update_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_update_data_table_rows, name - assert_kind_of ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_update_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.bulk_update_data_table_rows({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.bulk_update_data_table_rows parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.bulk_update_data_table_rows ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.bulk_update_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.bulk_update_data_table_rows(::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_update_data_table_rows_client_stub.call_rpc_count - end - end - - def test_get_data_table_operation_errors - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.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_data_table_operation_errors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_table_operation_errors, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_table_operation_errors_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_table_operation_errors({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_table_operation_errors name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_table_operation_errors ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_table_operation_errors({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_table_operation_errors(::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.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_data_table_operation_errors_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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::DataTableService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb deleted file mode 100644 index 5d9dc9f08219..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb +++ /dev/null @@ -1,67 +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/chronicle/v1/entity_service" - -class ::Google::Cloud::Chronicle::V1::EntityService::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_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_watchlist_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.watchlist_path project: "value0", location: "value1", instance: "value2", watchlist: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/watchlists/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb deleted file mode 100644 index eaea39586386..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb +++ /dev/null @@ -1,376 +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/chronicle/v1/entity_pb" -require "google/cloud/chronicle/v1/entity_service/rest" - - -class ::Google::Cloud::Chronicle::V1::EntityService::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_get_watchlist - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_get_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_watchlist({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_watchlist name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_watchlist({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_watchlist_client_stub.call_count - end - end - end - - def test_list_watchlists - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_watchlists_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_list_watchlists_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_watchlists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_watchlists parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_watchlists_client_stub.call_count - end - end - end - - def test_create_watchlist - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - watchlist_id = "hello world" - watchlist = {} - - create_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_create_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_watchlist_client_stub.call_count - end - end - end - - def test_update_watchlist - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - watchlist = {} - update_mask = {} - - update_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_update_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_watchlist watchlist: watchlist, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_watchlist_client_stub.call_count - end - end - end - - def test_delete_watchlist - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_delete_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_watchlist({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_watchlist name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_watchlist({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb deleted file mode 100644 index 33700fc8c675..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb +++ /dev/null @@ -1,413 +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/chronicle/v1/entity_pb" -require "google/cloud/chronicle/v1/entity_service" - -class ::Google::Cloud::Chronicle::V1::EntityService::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_get_watchlist - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_watchlist({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_watchlist name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_watchlist({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.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_watchlist_client_stub.call_rpc_count - end - end - - def test_list_watchlists - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_watchlists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_watchlists, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_watchlists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_watchlists parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_watchlists_client_stub.call_rpc_count - end - end - - def test_create_watchlist - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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" - watchlist_id = "hello world" - watchlist = {} - - create_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["watchlist_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_watchlist_client_stub.call_rpc_count - end - end - - def test_update_watchlist - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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. - watchlist = {} - update_mask = {} - - update_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_watchlist watchlist: watchlist, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_watchlist({ watchlist: watchlist, 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 - client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, 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_watchlist_client_stub.call_rpc_count - end - end - - def test_delete_watchlist - # 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" - force = true - - delete_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_watchlist({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_watchlist name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_watchlist({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::EntityService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb deleted file mode 100644 index 07fe0e7efd30..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_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/chronicle/v1/instance_service" - -class ::Google::Cloud::Chronicle::V1::InstanceService::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_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb deleted file mode 100644 index 68e2d76e63cf..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb +++ /dev/null @@ -1,153 +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/chronicle/v1/instance_pb" -require "google/cloud/chronicle/v1/instance_service/rest" - - -class ::Google::Cloud::Chronicle::V1::InstanceService::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_get_instance - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_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::Chronicle::V1::InstanceService::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb deleted file mode 100644 index 267cd03ea876..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb +++ /dev/null @@ -1,162 +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/chronicle/v1/instance_pb" -require "google/cloud/chronicle/v1/instance_service" - -class ::Google::Cloud::Chronicle::V1::InstanceService::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_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Instance.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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_instance({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.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_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::InstanceService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb deleted file mode 100644 index 0a3e0e6f9025..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb +++ /dev/null @@ -1,67 +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/chronicle/v1/reference_list_service" - -class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_reference_list_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb deleted file mode 100644 index e077a4322795..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb +++ /dev/null @@ -1,322 +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/chronicle/v1/reference_list_pb" -require "google/cloud/chronicle/v1/reference_list_service/rest" - - -class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_get_reference_list - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - get_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_get_reference_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_reference_list({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_reference_list name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_reference_list({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_reference_list_client_stub.call_count - end - end - end - - def test_list_reference_lists - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - list_reference_lists_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_list_reference_lists_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reference_lists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_reference_lists_client_stub.call_count - end - end - end - - def test_create_reference_list - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reference_list = {} - reference_list_id = "hello world" - - create_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_create_reference_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_reference_list_client_stub.call_count - end - end - end - - def test_update_reference_list - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - reference_list = {} - update_mask = {} - - update_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_update_reference_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_reference_list reference_list: reference_list, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb deleted file mode 100644 index 02598fddb1c6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb +++ /dev/null @@ -1,355 +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/chronicle/v1/reference_list_pb" -require "google/cloud/chronicle/v1/reference_list_service" - -class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_get_reference_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - get_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_reference_list, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, request - assert_equal "hello world", request["name"] - assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_reference_list({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_reference_list name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_reference_list({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_reference_list_client_stub.call_rpc_count - end - end - - def test_list_reference_lists - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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" - page_size = 42 - page_token = "hello world" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - list_reference_lists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reference_lists, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_reference_lists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) 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 - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, 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 - client.list_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), 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_reference_lists_client_stub.call_rpc_count - end - end - - def test_create_reference_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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" - reference_list = {} - reference_list_id = "hello world" - - create_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_reference_list, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] - assert_equal "hello world", request["reference_list_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_reference_list_client_stub.call_rpc_count - end - end - - def test_update_reference_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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. - reference_list = {} - update_mask = {} - - update_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_reference_list, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_reference_list reference_list: reference_list, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_reference_list({ reference_list: reference_list, 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 - client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, 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_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::ReferenceListService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb deleted file mode 100644 index 91602a5d5414..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_services_pb" -require "google/cloud/chronicle/v1/rule_service" - -class ::Google::Cloud::Chronicle::V1::RuleService::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 - client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb deleted file mode 100644 index cc40252d4fea..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb +++ /dev/null @@ -1,115 +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/chronicle/v1/rule_service" - -class ::Google::Cloud::Chronicle::V1::RuleService::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_data_access_scope_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_reference_list_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path - end - end - - def test_retrohunt_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.retrohunt_path project: "value0", location: "value1", instance: "value2", rule: "value3", retrohunt: "value4" - assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/retrohunts/value4", path - end - end - - def test_rule_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.rule_path project: "value0", location: "value1", instance: "value2", rule: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/rules/value3", path - end - end - - def test_rule_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.rule_deployment_path project: "value0", location: "value1", instance: "value2", rule: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/deployment", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb deleted file mode 100644 index 22d16284fac2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb +++ /dev/null @@ -1,766 +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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_service/rest" - - -class ::Google::Cloud::Chronicle::V1::RuleService::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_rule - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule = {} - - create_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_rule({ parent: parent, rule: rule }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_rule parent: parent, rule: rule do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_rule({ parent: parent, rule: rule }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_rule_client_stub.call_count - end - end - end - - def test_get_rule - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :RULE_VIEW_UNSPECIFIED - - get_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_rule({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_rule name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_rule({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_rule_client_stub.call_count - end - end - end - - def test_list_rules - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :RULE_VIEW_UNSPECIFIED - filter = "hello world" - - list_rules_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_rules parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rules_client_stub.call_count - end - end - end - - def test_update_rule - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - rule = {} - update_mask = {} - - update_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_rule({ rule: rule, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_rule rule: rule, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_rule({ rule: rule, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_rule_client_stub.call_count - end - end - end - - def test_delete_rule - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_delete_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_rule({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_rule name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_rule({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_rule_client_stub.call_count - end - end - end - - def test_list_rule_revisions - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - view = :RULE_VIEW_UNSPECIFIED - - list_rule_revisions_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rule_revisions_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rule_revisions_client_stub.call_count - end - end - end - - def test_create_retrohunt - # 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" - retrohunt = {} - - create_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_retrohunt_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_retrohunt parent: parent, retrohunt: retrohunt do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_retrohunt_client_stub.call_count - end - end - end - - def test_get_retrohunt - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Retrohunt.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_retrohunt_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_retrohunt({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_retrohunt name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_retrohunt({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_retrohunt_client_stub.call_count - end - end - end - - def test_list_retrohunts - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_retrohunts_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_retrohunts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_retrohunts_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_retrohunts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_retrohunts_client_stub.call_count - end - end - end - - def test_get_rule_deployment - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_rule_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_rule_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_rule_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_rule_deployment_client_stub.call_count - end - end - end - - def test_list_rule_deployments - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_rule_deployments_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_deployments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rule_deployments_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_rule_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rule_deployments_client_stub.call_count - end - end - end - - def test_update_rule_deployment - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - rule_deployment = {} - update_mask = {} - - update_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb deleted file mode 100644 index 75d72ff1a561..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb +++ /dev/null @@ -1,877 +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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_service" - -class ::Google::Cloud::Chronicle::V1::RuleService::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_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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" - rule = {} - - create_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_rule({ parent: parent, rule: rule }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_rule parent: parent, rule: rule do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_rule({ parent: parent, rule: rule }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_rule_client_stub.call_rpc_count - end - end - - def test_get_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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" - view = :RULE_VIEW_UNSPECIFIED - - get_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleRequest, request - assert_equal "hello world", request["name"] - assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_rule({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_rule name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_rule({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_rule_client_stub.call_rpc_count - end - end - - def test_list_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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" - page_size = 42 - page_token = "hello world" - view = :RULE_VIEW_UNSPECIFIED - filter = "hello world" - - list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rules, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rules_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_rules parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter) 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 - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }, 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 - client.list_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter), 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_rules_client_stub.call_rpc_count - end - end - - def test_update_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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. - rule = {} - update_mask = {} - - update_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_rule({ rule: rule, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_rule rule: rule, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_rule({ rule: rule, 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 - client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, 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_rule_client_stub.call_rpc_count - end - end - - def test_delete_rule - # 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" - force = true - - delete_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_rule({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_rule name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_rule({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_rule_client_stub.call_rpc_count - end - end - - def test_list_rule_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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" - page_size = 42 - page_token = "hello world" - view = :RULE_VIEW_UNSPECIFIED - - list_rule_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rule_revisions, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rule_revisions_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) 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 - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, 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 - client.list_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), 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_rule_revisions_client_stub.call_rpc_count - end - end - - def test_create_retrohunt - # 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" - retrohunt = {} - - create_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_retrohunt, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Retrohunt), request["retrohunt"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) 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 - client.create_retrohunt parent: parent, retrohunt: retrohunt 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 - client.create_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) 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 - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }, 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 - client.create_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), 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_retrohunt_client_stub.call_rpc_count - end - end - - def test_get_retrohunt - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_retrohunt, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_retrohunt({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_retrohunt name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_retrohunt({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.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_retrohunt_client_stub.call_rpc_count - end - end - - def test_list_retrohunts - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_retrohunts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_retrohunts, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_retrohunts_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_retrohunts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_retrohunts_client_stub.call_rpc_count - end - end - - def test_get_rule_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_rule_deployment, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_rule_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_rule_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_rule_deployment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.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_rule_deployment_client_stub.call_rpc_count - end - end - - def test_list_rule_deployments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_rule_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rule_deployments, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rule_deployments_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_rule_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_rule_deployments_client_stub.call_rpc_count - end - end - - def test_update_rule_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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. - rule_deployment = {} - update_mask = {} - - update_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_rule_deployment, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::RuleDeployment), request["rule_deployment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_rule_deployment({ rule_deployment: rule_deployment, 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 - client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, 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_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb +++ /dev/null @@ -1,26 +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 "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" From 2b4420c008c4736ceae2a3d471d0043d3cda218a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 30 Apr 2026 17:09:45 +0000 Subject: [PATCH 3/4] feat: Adding Client Libraries for BigQueryExportService PiperOrigin-RevId: 908082452 Source-Link: https://github.com/googleapis/googleapis/commit/2638026851b9110c280d75338581a752a4271340 Source-Link: https://github.com/googleapis/googleapis-gen/commit/62936673bdee50eeded2ff18b7a96ea8b7ec6d60 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNocm9uaWNsZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiNjI5MzY2NzNiZGVlNTBlZWRlZDJmZjE4YjdhOTZlYThiN2VjNmQ2MCJ9 --- .../google-cloud-chronicle-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-chronicle-v1/.rubocop.yml | 33 + .../google-cloud-chronicle-v1/.toys.rb | 28 + .../google-cloud-chronicle-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-chronicle-v1/CHANGELOG.md | 2 + .../google-cloud-chronicle-v1/Gemfile | 14 + .../google-cloud-chronicle-v1/LICENSE.md | 201 ++ .../google-cloud-chronicle-v1/README.md | 154 + .../google-cloud-chronicle-v1/Rakefile | 169 + .../gapic_metadata.json | 453 +++ .../google-cloud-chronicle-v1.gemspec | 28 + .../lib/google-cloud-chronicle-v1.rb | 21 + .../lib/google/cloud/chronicle/v1.rb | 55 + .../cloud/chronicle/v1/big_query_export_pb.rb | 34 + .../chronicle/v1/big_query_export_service.rb | 55 + .../v1/big_query_export_service/client.rb | 682 ++++ .../big_query_export_service/credentials.rb | 49 + .../v1/big_query_export_service/paths.rb | 71 + .../v1/big_query_export_service/rest.rb | 52 + .../big_query_export_service/rest/client.rb | 618 ++++ .../rest/service_stub.rb | 266 ++ .../v1/big_query_export_services_pb.rb | 51 + .../cloud/chronicle/v1/dashboard_chart_pb.rb | 83 + .../chronicle/v1/dashboard_chart_service.rb | 55 + .../v1/dashboard_chart_service/client.rb | 584 ++++ .../v1/dashboard_chart_service/credentials.rb | 49 + .../v1/dashboard_chart_service/paths.rb | 73 + .../v1/dashboard_chart_service/rest.rb | 52 + .../v1/dashboard_chart_service/rest/client.rb | 527 ++++ .../rest/service_stub.rb | 203 ++ .../v1/dashboard_chart_services_pb.rb | 47 + .../cloud/chronicle/v1/dashboard_query_pb.rb | 58 + .../chronicle/v1/dashboard_query_service.rb | 55 + .../v1/dashboard_query_service/client.rb | 589 ++++ .../v1/dashboard_query_service/credentials.rb | 49 + .../v1/dashboard_query_service/paths.rb | 94 + .../v1/dashboard_query_service/rest.rb | 52 + .../v1/dashboard_query_service/rest/client.rb | 532 ++++ .../rest/service_stub.rb | 204 ++ .../v1/dashboard_query_services_pb.rb | 47 + .../chronicle/v1/data_access_control_pb.rb | 44 + .../v1/data_access_control_service.rb | 56 + .../v1/data_access_control_service/client.rb | 1431 +++++++++ .../credentials.rb | 47 + .../v1/data_access_control_service/paths.rb | 94 + .../v1/data_access_control_service/rest.rb | 53 + .../rest/client.rb | 1318 ++++++++ .../rest/service_stub.rb | 695 +++++ .../v1/data_access_control_services_pb.rb | 76 + .../cloud/chronicle/v1/data_table_pb.rb | 57 + .../cloud/chronicle/v1/data_table_service.rb | 55 + .../chronicle/v1/data_table_service/client.rb | 1915 ++++++++++++ .../v1/data_table_service/credentials.rb | 49 + .../chronicle/v1/data_table_service/paths.rb | 138 + .../chronicle/v1/data_table_service/rest.rb | 52 + .../v1/data_table_service/rest/client.rb | 1767 +++++++++++ .../data_table_service/rest/service_stub.rb | 1004 ++++++ .../chronicle/v1/data_table_services_pb.rb | 73 + .../google/cloud/chronicle/v1/entity_pb.rb | 39 + .../cloud/chronicle/v1/entity_service.rb | 55 + .../chronicle/v1/entity_service/client.rb | 908 ++++++ .../v1/entity_service/credentials.rb | 47 + .../chronicle/v1/entity_service/paths.rb | 73 + .../cloud/chronicle/v1/entity_service/rest.rb | 52 + .../v1/entity_service/rest/client.rb | 830 +++++ .../v1/entity_service/rest/service_stub.rb | 388 +++ .../cloud/chronicle/v1/entity_services_pb.rb | 54 + .../v1/featured_content_metadata_pb.rb | 25 + .../featured_content_native_dashboard_pb.rb | 33 + ...atured_content_native_dashboard_service.rb | 56 + .../client.rb | 717 +++++ .../credentials.rb | 49 + .../paths.rb | 136 + .../rest.rb | 53 + .../rest/client.rb | 653 ++++ .../rest/service_stub.rb | 265 ++ ...ed_content_native_dashboard_services_pb.rb | 50 + .../google/cloud/chronicle/v1/instance_pb.rb | 27 + .../cloud/chronicle/v1/instance_service.rb | 55 + .../chronicle/v1/instance_service/client.rb | 481 +++ .../v1/instance_service/credentials.rb | 47 + .../chronicle/v1/instance_service/paths.rb | 52 + .../chronicle/v1/instance_service/rest.rb | 52 + .../v1/instance_service/rest/client.rb | 431 +++ .../v1/instance_service/rest/service_stub.rb | 142 + .../chronicle/v1/instance_services_pb.rb | 45 + .../cloud/chronicle/v1/native_dashboard_pb.rb | 61 + .../chronicle/v1/native_dashboard_service.rb | 55 + .../v1/native_dashboard_service/client.rb | 1611 ++++++++++ .../native_dashboard_service/credentials.rb | 49 + .../v1/native_dashboard_service/paths.rb | 115 + .../v1/native_dashboard_service/rest.rb | 52 + .../native_dashboard_service/rest/client.rb | 1484 +++++++++ .../rest/service_stub.rb | 822 +++++ .../v1/native_dashboard_services_pb.rb | 67 + .../cloud/chronicle/v1/reference_list_pb.rb | 38 + .../chronicle/v1/reference_list_service.rb | 55 + .../v1/reference_list_service/client.rb | 809 +++++ .../v1/reference_list_service/credentials.rb | 47 + .../v1/reference_list_service/paths.rb | 73 + .../v1/reference_list_service/rest.rb | 52 + .../v1/reference_list_service/rest/client.rb | 738 +++++ .../rest/service_stub.rb | 327 ++ .../v1/reference_list_services_pb.rb | 51 + .../lib/google/cloud/chronicle/v1/rest.rb | 47 + .../lib/google/cloud/chronicle/v1/rule_pb.rb | 61 + .../google/cloud/chronicle/v1/rule_service.rb | 56 + .../cloud/chronicle/v1/rule_service/client.rb | 1691 ++++++++++ .../chronicle/v1/rule_service/credentials.rb | 47 + .../chronicle/v1/rule_service/operations.rb | 841 +++++ .../cloud/chronicle/v1/rule_service/paths.rb | 159 + .../cloud/chronicle/v1/rule_service/rest.rb | 53 + .../chronicle/v1/rule_service/rest/client.rb | 1564 ++++++++++ .../v1/rule_service/rest/operations.rb | 925 ++++++ .../v1/rule_service/rest/service_stub.rb | 817 +++++ .../cloud/chronicle/v1/rule_services_pb.rb | 70 + .../lib/google/cloud/chronicle/v1/version.rb | 28 + .../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 ++ .../cloud/chronicle/v1/big_query_export.rb | 142 + .../cloud/chronicle/v1/dashboard_chart.rb | 923 ++++++ .../cloud/chronicle/v1/dashboard_query.rb | 653 ++++ .../cloud/chronicle/v1/data_access_control.rb | 364 +++ .../google/cloud/chronicle/v1/data_table.rb | 512 +++ .../google/cloud/chronicle/v1/entity.rb | 210 ++ .../chronicle/v1/featured_content_metadata.rb | 82 + .../v1/featured_content_native_dashboard.rb | 141 + .../google/cloud/chronicle/v1/instance.rb | 47 + .../cloud/chronicle/v1/native_dashboard.rb | 502 +++ .../cloud/chronicle/v1/reference_list.rb | 232 ++ .../google/cloud/chronicle/v1/rule.rb | 701 +++++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/date.rb | 56 + .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../get_big_query_export.rb | 47 + .../provision_big_query_export.rb | 47 + .../update_big_query_export.rb | 47 + .../batch_get_dashboard_charts.rb | 47 + .../get_dashboard_chart.rb | 47 + .../execute_dashboard_query.rb | 47 + .../get_dashboard_query.rb | 47 + .../create_data_access_label.rb | 47 + .../create_data_access_scope.rb | 47 + .../delete_data_access_label.rb | 47 + .../delete_data_access_scope.rb | 47 + .../get_data_access_label.rb | 47 + .../get_data_access_scope.rb | 47 + .../list_data_access_labels.rb | 51 + .../list_data_access_scopes.rb | 51 + .../update_data_access_label.rb | 47 + .../update_data_access_scope.rb | 47 + .../bulk_create_data_table_rows.rb | 47 + .../bulk_get_data_table_rows.rb | 47 + .../bulk_replace_data_table_rows.rb | 47 + .../bulk_update_data_table_rows.rb | 47 + .../data_table_service/create_data_table.rb | 47 + .../create_data_table_row.rb | 47 + .../data_table_service/delete_data_table.rb | 47 + .../delete_data_table_row.rb | 47 + .../data_table_service/get_data_table.rb | 47 + .../get_data_table_operation_errors.rb | 47 + .../data_table_service/get_data_table_row.rb | 47 + .../list_data_table_rows.rb | 51 + .../data_table_service/list_data_tables.rb | 51 + .../data_table_service/update_data_table.rb | 47 + .../update_data_table_row.rb | 47 + .../entity_service/create_watchlist.rb | 47 + .../entity_service/delete_watchlist.rb | 47 + .../snippets/entity_service/get_watchlist.rb | 47 + .../entity_service/list_watchlists.rb | 51 + .../entity_service/update_watchlist.rb | 47 + .../get_featured_content_native_dashboard.rb | 47 + ...stall_featured_content_native_dashboard.rb | 47 + ...list_featured_content_native_dashboards.rb | 51 + .../snippets/instance_service/get_instance.rb | 47 + .../native_dashboard_service/add_chart.rb | 47 + .../create_native_dashboard.rb | 47 + .../delete_native_dashboard.rb | 47 + .../duplicate_chart.rb | 47 + .../duplicate_native_dashboard.rb | 47 + .../native_dashboard_service/edit_chart.rb | 47 + .../export_native_dashboards.rb | 47 + .../get_native_dashboard.rb | 47 + .../import_native_dashboards.rb | 47 + .../list_native_dashboards.rb | 51 + .../native_dashboard_service/remove_chart.rb | 47 + .../update_native_dashboard.rb | 47 + .../create_reference_list.rb | 47 + .../get_reference_list.rb | 47 + .../list_reference_lists.rb | 51 + .../update_reference_list.rb | 47 + .../snippets/rule_service/create_retrohunt.rb | 54 + .../snippets/rule_service/create_rule.rb | 47 + .../snippets/rule_service/delete_rule.rb | 47 + .../snippets/rule_service/get_retrohunt.rb | 47 + .../snippets/rule_service/get_rule.rb | 47 + .../rule_service/get_rule_deployment.rb | 47 + .../snippets/rule_service/list_retrohunts.rb | 51 + .../rule_service/list_rule_deployments.rb | 51 + .../rule_service/list_rule_revisions.rb | 51 + .../snippets/rule_service/list_rules.rb | 51 + .../snippets/rule_service/update_rule.rb | 47 + .../rule_service/update_rule_deployment.rb | 47 + ...et_metadata_google.cloud.chronicle.v1.json | 2775 +++++++++++++++++ .../v1/big_query_export_service_paths_test.rb | 67 + .../v1/big_query_export_service_rest_test.rb | 262 ++ .../v1/big_query_export_service_test.rb | 280 ++ .../v1/dashboard_chart_service_paths_test.rb | 67 + .../v1/dashboard_chart_service_rest_test.rb | 208 ++ .../v1/dashboard_chart_service_test.rb | 222 ++ .../v1/dashboard_query_service_paths_test.rb | 79 + .../v1/dashboard_query_service_rest_test.rb | 211 ++ .../v1/dashboard_query_service_test.rb | 228 ++ .../data_access_control_service_paths_test.rb | 79 + .../data_access_control_service_rest_test.rb | 651 ++++ .../v1/data_access_control_service_test.rb | 718 +++++ .../v1/data_table_service_paths_test.rb | 103 + .../v1/data_table_service_rest_test.rb | 926 ++++++ .../chronicle/v1/data_table_service_test.rb | 1018 ++++++ .../chronicle/v1/entity_service_paths_test.rb | 67 + .../chronicle/v1/entity_service_rest_test.rb | 376 +++ .../cloud/chronicle/v1/entity_service_test.rb | 413 +++ ...ent_native_dashboard_service_paths_test.rb | 103 + ...tent_native_dashboard_service_rest_test.rb | 265 ++ ...d_content_native_dashboard_service_test.rb | 291 ++ .../v1/instance_service_paths_test.rb | 55 + .../v1/instance_service_rest_test.rb | 153 + .../chronicle/v1/instance_service_test.rb | 162 + .../v1/native_dashboard_service_paths_test.rb | 91 + .../v1/native_dashboard_service_rest_test.rb | 765 +++++ .../v1/native_dashboard_service_test.rb | 841 +++++ .../v1/reference_list_service_paths_test.rb | 67 + .../v1/reference_list_service_rest_test.rb | 322 ++ .../v1/reference_list_service_test.rb | 355 +++ .../v1/rule_service_operations_test.rb | 400 +++ .../chronicle/v1/rule_service_paths_test.rb | 115 + .../chronicle/v1/rule_service_rest_test.rb | 766 +++++ .../cloud/chronicle/v1/rule_service_test.rb | 877 ++++++ .../google-cloud-chronicle-v1/test/helper.rb | 26 + 251 files changed, 58362 insertions(+) create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/README.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/get_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/provision_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/update_big_query_export.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.gitignore b/owl-bot-staging/google-cloud-chronicle-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +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/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json new file mode 100644 index 000000000000..b353dde6b42b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "chronicle.googleapis.com", + "api_shortname": "chronicle", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest", + "distribution_name": "google-cloud-chronicle-v1", + "is_cloud": true, + "language": "ruby", + "name": "chronicle", + "name_pretty": "Chronicle V1 API", + "product_documentation": "https://cloud.google.com/chronicle/docs/secops/secops-overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/chronicle/docs/secops/secops-overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml b/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml new file mode 100644 index 000000000000..247c818fc834 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-chronicle-v1.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-chronicle-v1.rb" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb b/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb @@ -0,0 +1,28 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/.yardopts b/owl-bot-staging/google-cloud-chronicle-v1/.yardopts new file mode 100644 index 000000000000..279160678357 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Chronicle V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1cb69c3578b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-chronicle-v1 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-chronicle-v1 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/chronicle/v1" + +client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/chronicle/v1" + +::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::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-chronicle-v1 +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/chronicle/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::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/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-chronicle-v1/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/Gemfile @@ -0,0 +1,14 @@ +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-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md b/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/owl-bot-staging/google-cloud-chronicle-v1/README.md b/owl-bot-staging/google-cloud-chronicle-v1/README.md new file mode 100644 index 000000000000..d569847e64fe --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Chronicle V1 API + +The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. + +The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Chronicle V1 API. Most users should consider using +the main client gem, +[google-cloud-chronicle](https://rubygems.org/gems/google-cloud-chronicle). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-chronicle-v1 +``` + +## 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/chronicle.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/chronicle/v1" + +client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new +request = ::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest.new # (request fields as keyword arguments...) +response = client.get_big_query_export request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/chronicle/docs/secops/secops-overview) +for general usage information. + +## 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/chronicle/v1" +require "logger" + +client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::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.0+. + +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-chronicle`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-chronicle-v1`. +_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-chronicle`. +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-chronicle-v1`. + +### 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. diff --git a/owl-bot-staging/google-cloud-chronicle-v1/Rakefile b/owl-bot-staging/google-cloud-chronicle-v1/Rakefile new file mode 100644 index 000000000000..63fc23f2db54 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/Rakefile @@ -0,0 +1,169 @@ +# 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 "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-chronicle-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_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 GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/chronicle/v1/big_query_export_service/credentials" + ::Google::Cloud::Chronicle::V1::BigQueryExportService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_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-chronicle-v1 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-chronicle-v1 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-chronicle-v1 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-chronicle-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-chronicle-v1" + header "google-cloud-chronicle-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-chronicle-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-chronicle-v1 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-chronicle-v1 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-chronicle-v1 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/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json new file mode 100644 index 000000000000..a97437d01ef0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json @@ -0,0 +1,453 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.chronicle.v1", + "libraryPackage": "::Google::Cloud::Chronicle::V1", + "services": { + "BigQueryExportService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client", + "rpcs": { + "GetBigQueryExport": { + "methods": [ + "get_big_query_export" + ] + }, + "UpdateBigQueryExport": { + "methods": [ + "update_big_query_export" + ] + }, + "ProvisionBigQueryExport": { + "methods": [ + "provision_big_query_export" + ] + } + } + } + } + }, + "DashboardQueryService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client", + "rpcs": { + "GetDashboardQuery": { + "methods": [ + "get_dashboard_query" + ] + }, + "ExecuteDashboardQuery": { + "methods": [ + "execute_dashboard_query" + ] + } + } + } + } + }, + "DashboardChartService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client", + "rpcs": { + "GetDashboardChart": { + "methods": [ + "get_dashboard_chart" + ] + }, + "BatchGetDashboardCharts": { + "methods": [ + "batch_get_dashboard_charts" + ] + } + } + } + } + }, + "DataAccessControlService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client", + "rpcs": { + "CreateDataAccessLabel": { + "methods": [ + "create_data_access_label" + ] + }, + "GetDataAccessLabel": { + "methods": [ + "get_data_access_label" + ] + }, + "ListDataAccessLabels": { + "methods": [ + "list_data_access_labels" + ] + }, + "UpdateDataAccessLabel": { + "methods": [ + "update_data_access_label" + ] + }, + "DeleteDataAccessLabel": { + "methods": [ + "delete_data_access_label" + ] + }, + "CreateDataAccessScope": { + "methods": [ + "create_data_access_scope" + ] + }, + "GetDataAccessScope": { + "methods": [ + "get_data_access_scope" + ] + }, + "ListDataAccessScopes": { + "methods": [ + "list_data_access_scopes" + ] + }, + "UpdateDataAccessScope": { + "methods": [ + "update_data_access_scope" + ] + }, + "DeleteDataAccessScope": { + "methods": [ + "delete_data_access_scope" + ] + } + } + } + } + }, + "DataTableService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DataTableService::Client", + "rpcs": { + "CreateDataTable": { + "methods": [ + "create_data_table" + ] + }, + "ListDataTables": { + "methods": [ + "list_data_tables" + ] + }, + "GetDataTable": { + "methods": [ + "get_data_table" + ] + }, + "UpdateDataTable": { + "methods": [ + "update_data_table" + ] + }, + "DeleteDataTable": { + "methods": [ + "delete_data_table" + ] + }, + "CreateDataTableRow": { + "methods": [ + "create_data_table_row" + ] + }, + "UpdateDataTableRow": { + "methods": [ + "update_data_table_row" + ] + }, + "ListDataTableRows": { + "methods": [ + "list_data_table_rows" + ] + }, + "GetDataTableRow": { + "methods": [ + "get_data_table_row" + ] + }, + "DeleteDataTableRow": { + "methods": [ + "delete_data_table_row" + ] + }, + "BulkCreateDataTableRows": { + "methods": [ + "bulk_create_data_table_rows" + ] + }, + "BulkGetDataTableRows": { + "methods": [ + "bulk_get_data_table_rows" + ] + }, + "BulkReplaceDataTableRows": { + "methods": [ + "bulk_replace_data_table_rows" + ] + }, + "BulkUpdateDataTableRows": { + "methods": [ + "bulk_update_data_table_rows" + ] + }, + "GetDataTableOperationErrors": { + "methods": [ + "get_data_table_operation_errors" + ] + } + } + } + } + }, + "EntityService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::EntityService::Client", + "rpcs": { + "GetWatchlist": { + "methods": [ + "get_watchlist" + ] + }, + "ListWatchlists": { + "methods": [ + "list_watchlists" + ] + }, + "CreateWatchlist": { + "methods": [ + "create_watchlist" + ] + }, + "UpdateWatchlist": { + "methods": [ + "update_watchlist" + ] + }, + "DeleteWatchlist": { + "methods": [ + "delete_watchlist" + ] + } + } + } + } + }, + "NativeDashboardService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client", + "rpcs": { + "CreateNativeDashboard": { + "methods": [ + "create_native_dashboard" + ] + }, + "GetNativeDashboard": { + "methods": [ + "get_native_dashboard" + ] + }, + "ListNativeDashboards": { + "methods": [ + "list_native_dashboards" + ] + }, + "UpdateNativeDashboard": { + "methods": [ + "update_native_dashboard" + ] + }, + "DuplicateNativeDashboard": { + "methods": [ + "duplicate_native_dashboard" + ] + }, + "DeleteNativeDashboard": { + "methods": [ + "delete_native_dashboard" + ] + }, + "AddChart": { + "methods": [ + "add_chart" + ] + }, + "RemoveChart": { + "methods": [ + "remove_chart" + ] + }, + "EditChart": { + "methods": [ + "edit_chart" + ] + }, + "DuplicateChart": { + "methods": [ + "duplicate_chart" + ] + }, + "ExportNativeDashboards": { + "methods": [ + "export_native_dashboards" + ] + }, + "ImportNativeDashboards": { + "methods": [ + "import_native_dashboards" + ] + } + } + } + } + }, + "FeaturedContentNativeDashboardService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client", + "rpcs": { + "GetFeaturedContentNativeDashboard": { + "methods": [ + "get_featured_content_native_dashboard" + ] + }, + "ListFeaturedContentNativeDashboards": { + "methods": [ + "list_featured_content_native_dashboards" + ] + }, + "InstallFeaturedContentNativeDashboard": { + "methods": [ + "install_featured_content_native_dashboard" + ] + } + } + } + } + }, + "InstanceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::InstanceService::Client", + "rpcs": { + "GetInstance": { + "methods": [ + "get_instance" + ] + } + } + } + } + }, + "ReferenceListService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client", + "rpcs": { + "GetReferenceList": { + "methods": [ + "get_reference_list" + ] + }, + "ListReferenceLists": { + "methods": [ + "list_reference_lists" + ] + }, + "CreateReferenceList": { + "methods": [ + "create_reference_list" + ] + }, + "UpdateReferenceList": { + "methods": [ + "update_reference_list" + ] + } + } + } + } + }, + "RuleService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::RuleService::Client", + "rpcs": { + "CreateRule": { + "methods": [ + "create_rule" + ] + }, + "GetRule": { + "methods": [ + "get_rule" + ] + }, + "ListRules": { + "methods": [ + "list_rules" + ] + }, + "UpdateRule": { + "methods": [ + "update_rule" + ] + }, + "DeleteRule": { + "methods": [ + "delete_rule" + ] + }, + "ListRuleRevisions": { + "methods": [ + "list_rule_revisions" + ] + }, + "CreateRetrohunt": { + "methods": [ + "create_retrohunt" + ] + }, + "GetRetrohunt": { + "methods": [ + "get_retrohunt" + ] + }, + "ListRetrohunts": { + "methods": [ + "list_retrohunts" + ] + }, + "GetRuleDeployment": { + "methods": [ + "get_rule_deployment" + ] + }, + "ListRuleDeployments": { + "methods": [ + "list_rule_deployments" + ] + }, + "UpdateRuleDeployment": { + "methods": [ + "update_rule_deployment" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec b/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec new file mode 100644 index 000000000000..0cf9044d81bc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/chronicle/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-chronicle-v1" + gem.version = Google::Cloud::Chronicle::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details." + gem.summary = "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb new file mode 100644 index 000000000000..8d5cd2a8ddb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb @@ -0,0 +1,21 @@ +# 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/chronicle/v1" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb new file mode 100644 index 000000000000..a069a33dfd28 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/big_query_export_service" +require "google/cloud/chronicle/v1/dashboard_query_service" +require "google/cloud/chronicle/v1/dashboard_chart_service" +require "google/cloud/chronicle/v1/data_access_control_service" +require "google/cloud/chronicle/v1/data_table_service" +require "google/cloud/chronicle/v1/entity_service" +require "google/cloud/chronicle/v1/native_dashboard_service" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" +require "google/cloud/chronicle/v1/instance_service" +require "google/cloud/chronicle/v1/reference_list_service" +require "google/cloud/chronicle/v1/rule_service" +require "google/cloud/chronicle/v1/version" + +module Google + module Cloud + module Chronicle + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1" + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/chronicle/v1" + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/chronicle/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_pb.rb new file mode 100644 index 000000000000..adf4271454b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/big_query_export.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/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/chronicle/v1/big_query_export.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf9\x05\n\x0e\x42igQueryExport\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0bprovisioned\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12W\n\x18\x62ig_query_export_package\x18\x03 \x01(\x0e\x32\x30.google.cloud.chronicle.v1.BigQueryExportPackageB\x03\xe0\x41\x03\x12W\n\x15\x65ntity_graph_settings\x18\x04 \x01(\x0b\x32\x33.google.cloud.chronicle.v1.DataSourceExportSettingsB\x03\xe0\x41\x01\x12V\n\x14ioc_matches_settings\x18\x05 \x01(\x0b\x32\x33.google.cloud.chronicle.v1.DataSourceExportSettingsB\x03\xe0\x41\x01\x12Z\n\x18rule_detections_settings\x18\x06 \x01(\x0b\x32\x33.google.cloud.chronicle.v1.DataSourceExportSettingsB\x03\xe0\x41\x01\x12`\n\x1eudm_events_aggregates_settings\x18\x07 \x01(\x0b\x32\x33.google.cloud.chronicle.v1.DataSourceExportSettingsB\x03\xe0\x41\x01\x12U\n\x13udm_events_settings\x18\x08 \x01(\x0b\x32\x33.google.cloud.chronicle.v1.DataSourceExportSettingsB\x03\xe0\x41\x01:\x9a\x01\xea\x41\x96\x01\n\'chronicle.googleapis.com/BigQueryExport\x12Kprojects/{project}/locations/{location}/instances/{instance}/bigQueryExport*\x0e\x62igQueryExport2\x0e\x62igQueryExport\"\xfc\x01\n\x18\x44\x61taSourceExportSettings\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1b\n\x0eretention_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12U\n\x17latest_export_job_state\x18\x03 \x01(\x0e\x32/.google.cloud.chronicle.v1.LatestExportJobStateB\x03\xe0\x41\x03\x12<\n\x13\x64\x61ta_freshness_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x61ta_volume\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\"Y\n\x18GetBigQueryExportRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/BigQueryExport\"\x9d\x01\n\x1bUpdateBigQueryExportRequest\x12H\n\x10\x62ig_query_export\x18\x01 \x01(\x0b\x32).google.cloud.chronicle.v1.BigQueryExportB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"a\n\x1eProvisionBigQueryExportRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/BigQueryExport*\x8c\x01\n\x15\x42igQueryExportPackage\x12(\n$BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED\x10\x00\x12\"\n\x1e\x42IG_QUERY_EXPORT_PACKAGE_BYOBQ\x10\x01\x12%\n!BIG_QUERY_EXPORT_PACKAGE_ADVANCED\x10\x02*\x88\x01\n\x14LatestExportJobState\x12\'\n#LATEST_EXPORT_JOB_STATE_UNSPECIFIED\x10\x00\x12#\n\x1fLATEST_EXPORT_JOB_STATE_SUCCESS\x10\x01\x12\"\n\x1eLATEST_EXPORT_JOB_STATE_FAILED\x10\x02\x32\xec\x06\n\x15\x42igQueryExportService\x12\xc0\x01\n\x11GetBigQueryExport\x12\x33.google.cloud.chronicle.v1.GetBigQueryExportRequest\x1a).google.cloud.chronicle.v1.BigQueryExport\"K\xda\x41\x04name\x82\xd3\xe4\x93\x02>\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update the BigQuery export configuration for a Chronicle instance. + # + # @overload update_big_query_export(request, options = nil) + # Pass arguments to `update_big_query_export` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest, ::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_big_query_export(big_query_export: nil, update_mask: nil) + # Pass arguments to `update_big_query_export` 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 big_query_export [::Google::Cloud::Chronicle::V1::BigQueryExport, ::Hash] + # Required. The BigQueryExport settings to update. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/bigQueryExport + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest.new + # + # # Call the update_big_query_export method. + # result = client.update_big_query_export request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport. + # p result + # + def update_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest + + # 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_big_query_export.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::Chronicle::V1::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.big_query_export&.name + header_params["big_query_export.name"] = request.big_query_export.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_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_export_service_stub.call_rpc :update_big_query_export, 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 + + ## + # Provision the BigQuery export for a Chronicle instance. This will create + # \\{\\{gcp_name}} resources like \\{\\{storage_name}} buckets, BigQuery datasets + # and set default export settings for each data source. + # + # @overload provision_big_query_export(request, options = nil) + # Pass arguments to `provision_big_query_export` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest, ::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 provision_big_query_export(parent: nil) + # Pass arguments to `provision_big_query_export` 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 instance for which BigQuery export is being provisioned. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BigQueryExport] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest.new + # + # # Call the provision_big_query_export method. + # result = client.provision_big_query_export request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport. + # p result + # + def provision_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest + + # 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.provision_big_query_export.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::Chronicle::V1::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.provision_big_query_export.timeout, + metadata: metadata, + retry_policy: @config.rpcs.provision_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_export_service_stub.call_rpc :provision_big_query_export, 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 + + ## + # Configuration class for the BigQueryExportService API. + # + # This class represents the configuration for BigQueryExportService, + # 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::Chronicle::V1::BigQueryExportService::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 + # # get_big_query_export to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_big_query_export.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_big_query_export.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::Chronicle::V1::BigQueryExportService::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. + # * `: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 = "chronicle.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 BigQueryExportService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :get_big_query_export + ## + # RPC-specific configuration for `update_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :update_big_query_export + ## + # RPC-specific configuration for `provision_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :provision_big_query_export + + # @private + def initialize parent_rpcs = nil + get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export + @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config + update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export + @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config + provision_big_query_export_config = parent_rpcs.provision_big_query_export if parent_rpcs.respond_to? :provision_big_query_export + @provision_big_query_export = ::Gapic::Config::Method.new provision_big_query_export_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb new file mode 100644 index 000000000000..e1de4c525f2d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module BigQueryExportService + # Credentials for the BigQueryExportService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb new file mode 100644 index 000000000000..f0e3f0cb4d02 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb @@ -0,0 +1,71 @@ +# 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 Chronicle + module V1 + module BigQueryExportService + # Path helper methods for the BigQueryExportService API. + module Paths + ## + # Create a fully-qualified BigQueryExport resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/bigQueryExport` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def big_query_export_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/bigQueryExport" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb new file mode 100644 index 000000000000..f1737c604643 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/big_query_export_service/credentials" +require "google/cloud/chronicle/v1/big_query_export_service/paths" +require "google/cloud/chronicle/v1/big_query_export_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # Service for managing BigQuery export configurations for Chronicle instances. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/big_query_export_service/rest" + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new + # + module BigQueryExportService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/big_query_export_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb new file mode 100644 index 000000000000..72aa6ac72078 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb @@ -0,0 +1,618 @@ +# 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/chronicle/v1/big_query_export_pb" +require "google/cloud/chronicle/v1/big_query_export_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module BigQueryExportService + module Rest + ## + # REST client for the BigQueryExportService service. + # + # Service for managing BigQuery export configurations for Chronicle instances. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :big_query_export_service_stub + + ## + # Configure the BigQueryExportService Client class. + # + # See {::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BigQueryExportService clients + # ::Google::Cloud::Chronicle::V1::BigQueryExportService::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", "Chronicle", "V1"] + 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.get_big_query_export.timeout = 120.0 + default_config.rpcs.get_big_query_export.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_big_query_export.timeout = 120.0 + default_config.rpcs.update_big_query_export.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.provision_big_query_export.timeout = 120.0 + default_config.rpcs.provision_big_query_export.retry_policy = { + initial_delay: 1.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BigQueryExportService 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::Chronicle::V1::BigQueryExportService::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 + @big_query_export_service_stub.universe_domain + end + + ## + # Create a new BigQueryExportService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BigQueryExportService 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 + + @big_query_export_service_stub = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @big_query_export_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @big_query_export_service_stub.logger + end + + # Service calls + + ## + # Get the BigQuery export configuration for a Chronicle instance. + # + # @overload get_big_query_export(request, options = nil) + # Pass arguments to `get_big_query_export` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest, ::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_big_query_export(name: nil) + # Pass arguments to `get_big_query_export` 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 BigqueryExport to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/bigQueryExport + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetBigQueryExportRequest.new + # + # # Call the get_big_query_export method. + # result = client.get_big_query_export request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport. + # p result + # + def get_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest + + # 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_big_query_export.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::Chronicle::V1::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_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_export_service_stub.get_big_query_export 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 + + ## + # Update the BigQuery export configuration for a Chronicle instance. + # + # @overload update_big_query_export(request, options = nil) + # Pass arguments to `update_big_query_export` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest, ::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_big_query_export(big_query_export: nil, update_mask: nil) + # Pass arguments to `update_big_query_export` 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 big_query_export [::Google::Cloud::Chronicle::V1::BigQueryExport, ::Hash] + # Required. The BigQueryExport settings to update. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/bigQueryExport + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest.new + # + # # Call the update_big_query_export method. + # result = client.update_big_query_export request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport. + # p result + # + def update_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest + + # 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_big_query_export.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::Chronicle::V1::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_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_export_service_stub.update_big_query_export 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 + + ## + # Provision the BigQuery export for a Chronicle instance. This will create + # \\{\\{gcp_name}} resources like \\{\\{storage_name}} buckets, BigQuery datasets + # and set default export settings for each data source. + # + # @overload provision_big_query_export(request, options = nil) + # Pass arguments to `provision_big_query_export` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest, ::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 provision_big_query_export(parent: nil) + # Pass arguments to `provision_big_query_export` 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 instance for which BigQuery export is being provisioned. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BigQueryExport] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest.new + # + # # Call the provision_big_query_export method. + # result = client.provision_big_query_export request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport. + # p result + # + def provision_big_query_export request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest + + # 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.provision_big_query_export.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::Chronicle::V1::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.provision_big_query_export.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.provision_big_query_export.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_export_service_stub.provision_big_query_export 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 + + ## + # Configuration class for the BigQueryExportService REST API. + # + # This class represents the configuration for BigQueryExportService 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::Chronicle::V1::BigQueryExportService::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 + # # get_big_query_export to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_big_query_export.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_big_query_export.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. + # * `: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 = "chronicle.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 BigQueryExportService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :get_big_query_export + ## + # RPC-specific configuration for `update_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :update_big_query_export + ## + # RPC-specific configuration for `provision_big_query_export` + # @return [::Gapic::Config::Method] + # + attr_reader :provision_big_query_export + + # @private + def initialize parent_rpcs = nil + get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export + @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config + update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export + @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config + provision_big_query_export_config = parent_rpcs.provision_big_query_export if parent_rpcs.respond_to? :provision_big_query_export + @provision_big_query_export = ::Gapic::Config::Method.new provision_big_query_export_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb new file mode 100644 index 000000000000..46fcbadb0291 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb @@ -0,0 +1,266 @@ +# 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/chronicle/v1/big_query_export_pb" + +module Google + module Cloud + module Chronicle + module V1 + module BigQueryExportService + module Rest + ## + # REST service stub for the BigQueryExportService 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 get_big_query_export REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest] + # 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::Chronicle::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BigQueryExport] + # A result object deserialized from the server's reply + def get_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_big_query_export_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_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BigQueryExport.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_big_query_export REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest] + # 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::Chronicle::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BigQueryExport] + # A result object deserialized from the server's reply + def update_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_big_query_export_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_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BigQueryExport.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the provision_big_query_export REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest] + # 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::Chronicle::V1::BigQueryExport] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BigQueryExport] + # A result object deserialized from the server's reply + def provision_big_query_export request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_provision_big_query_export_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: "provision_big_query_export", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BigQueryExport.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 get_big_query_export REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest] + # 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_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/bigQueryExport/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_big_query_export REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest] + # 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_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{big_query_export.name}", + body: "big_query_export", + matches: [ + ["big_query_export.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/bigQueryExport/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the provision_big_query_export REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_provision_big_query_export_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/bigQueryExport:provision", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb new file mode 100644 index 000000000000..0f9f2eefb72c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/big_query_export.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/big_query_export_pb' + +module Google + module Cloud + module Chronicle + module V1 + module BigQueryExportService + # Service for managing BigQuery export configurations for Chronicle instances. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.BigQueryExportService' + + # Get the BigQuery export configuration for a Chronicle instance. + rpc :GetBigQueryExport, ::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest, ::Google::Cloud::Chronicle::V1::BigQueryExport + # Update the BigQuery export configuration for a Chronicle instance. + rpc :UpdateBigQueryExport, ::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest, ::Google::Cloud::Chronicle::V1::BigQueryExport + # Provision the BigQuery export for a Chronicle instance. This will create + # {{gcp_name}} resources like {{storage_name}} buckets, BigQuery datasets + # and set default export settings for each data source. + rpc :ProvisionBigQueryExport, ::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest, ::Google::Cloud::Chronicle::V1::BigQueryExport + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb new file mode 100644 index 000000000000..8ac2f8e6e1cb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/dashboard_chart.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/chronicle/v1/dashboard_query_pb' + + +descriptor_data = "\n/google/cloud/chronicle/v1/dashboard_chart.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/chronicle/v1/dashboard_query.proto\"\xfd=\n\x0e\x44\x61shboardChart\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12J\n\x10native_dashboard\x18\x04 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12;\n\ttile_type\x18\x07 \x01(\x0e\x32#.google.cloud.chronicle.v1.TileTypeB\x03\xe0\x41\x01\x12X\n\x10\x63hart_datasource\x18\x05 \x01(\x0b\x32\x39.google.cloud.chronicle.v1.DashboardChart.ChartDatasourceB\x03\xe0\x41\x01\x12S\n\rvisualization\x18\x06 \x01(\x0b\x32\x37.google.cloud.chronicle.v1.DashboardChart.VisualizationB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11\x64rill_down_config\x18\t \x01(\x0b\x32\x39.google.cloud.chronicle.v1.DashboardChart.DrillDownConfigB\x03\xe0\x41\x01\x12\x13\n\x06tokens\x18\n \x03(\tB\x03\xe0\x41\x01\x1a\x95\x01\n\x0f\x43hartDatasource\x12\x45\n\x0f\x64\x61shboard_query\x18\x01 \x01(\tB,\xfa\x41)\n\'chronicle.googleapis.com/DashboardQuery\x12;\n\x0c\x64\x61ta_sources\x18\x03 \x03(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x1a\x8c+\n\rVisualization\x12L\n\x06x_axes\x18\x07 \x03(\x0b\x32<.google.cloud.chronicle.v1.DashboardChart.Visualization.Axis\x12L\n\x06y_axes\x18\x08 \x03(\x0b\x32<.google.cloud.chronicle.v1.DashboardChart.Visualization.Axis\x12N\n\x06series\x18\x03 \x03(\x0b\x32>.google.cloud.chronicle.v1.DashboardChart.Visualization.Series\x12P\n\x07tooltip\x18\x04 \x01(\x0b\x32?.google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip\x12O\n\x07legends\x18\t \x03(\x0b\x32>.google.cloud.chronicle.v1.DashboardChart.Visualization.Legend\x12V\n\x0b\x63olumn_defs\x18\n \x03(\x0b\x32\x41.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef\x12^\n\x0ctable_config\x18\x12 \x01(\x0b\x32\x43.google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfigB\x03\xe0\x41\x01\x12\x31\n\x06\x62utton\x18\x0b \x01(\x0b\x32!.google.cloud.chronicle.v1.Button\x12:\n\x08markdown\x18\x11 \x01(\x0b\x32#.google.cloud.chronicle.v1.MarkdownB\x03\xe0\x41\x01\x12\x1a\n\rseries_column\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rgrouping_type\x18\r \x01(\tB\x03\xe0\x41\x01\x12i\n\x12google_maps_config\x18\x0e \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfigB\x03\xe0\x41\x01\x12\'\n\x1athreshold_coloring_enabled\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12[\n\x0bvisual_maps\x18\x10 \x03(\x0b\x32\x41.google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMapB\x03\xe0\x41\x01\x1a\x88\x01\n\x04\x41xis\x12\x36\n\taxis_type\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.AxisType\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x10\n\x03min\x18\x06 \x01(\x05H\x00\x88\x01\x01\x12\x10\n\x03max\x18\x07 \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\x1a\xc1\x12\n\x06Series\x12:\n\x0bseries_type\x18\x08 \x01(\x0e\x32%.google.cloud.chronicle.v1.SeriesType\x12\x13\n\x0bseries_name\x18\x02 \x01(\t\x12\x13\n\x0bshow_symbol\x18\x04 \x01(\x08\x12\x17\n\x0fshow_background\x18\x05 \x01(\x08\x12\r\n\x05stack\x18\x06 \x01(\t\x12M\n\x15series_stack_strategy\x18\t \x01(\x0e\x32..google.cloud.chronicle.v1.SeriesStackStrategy\x12U\n\x06\x65ncode\x18\n \x01(\x0b\x32\x45.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode\x12\r\n\x05label\x18\x0b \x01(\t\x12\r\n\x05\x66ield\x18\x0c \x01(\t\x12\x61\n\ndata_label\x18\r \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabelB\x03\xe0\x41\x01\x12\x13\n\x06radius\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x61\n\nitem_style\x18\x0f \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyleB\x03\xe0\x41\x01\x12 \n\x13series_unique_value\x18\x10 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\narea_style\x18\x11 \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyleB\x03\xe0\x41\x01\x12\x63\n\x0bitem_colors\x18\x12 \x01(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColorsB\x03\xe0\x41\x01\x12\x65\n\x0cgauge_config\x18\x13 \x01(\x0b\x32J.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfigB\x03\xe0\x41\x01\x12r\n\x13metric_trend_config\x18\x14 \x01(\x0b\x32P.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfigB\x03\xe0\x41\x01\x1a@\n\x06\x45ncode\x12\t\n\x01x\x18\x01 \x01(\t\x12\t\n\x01y\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\x12\x11\n\titem_name\x18\x04 \x01(\t\x1a\x1e\n\tDataLabel\x12\x11\n\x04show\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1aU\n\tItemStyle\x12\x19\n\x0c\x62order_width\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x62order_color\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x63olor\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xbb\x01\n\tAreaStyle\x12\x12\n\x05\x63olor\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06origin\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bshadow_blur\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x19\n\x0cshadow_color\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fshadow_offset_x\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fshadow_offset_y\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07opacity\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x1a<\n\x12UserSelectedValues\x12\x12\n\x05\x63olor\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x8a\x01\n\x0f\x43hartSliceColor\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x65\n\x05value\x18\x02 \x01(\x0b\x32Q.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValuesB\x03\xe0\x41\x01\x1aq\n\nItemColors\x12\x63\n\x06\x63olors\x18\x01 \x03(\x0b\x32N.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColorB\x03\xe0\x41\x01\x1a\x34\n\nGaugeValue\x12\x12\n\x05value\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\xc0\x02\n\x0bGaugeConfig\x12\x62\n\nbase_value\x18\x01 \x01(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xe0\x41\x01\x12\x63\n\x0blimit_value\x18\x02 \x01(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xe0\x41\x01\x12h\n\x10threshold_values\x18\x03 \x03(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xe0\x41\x01\x1a\x96\x02\n\x11MetricTrendConfig\x12\x43\n\rmetric_format\x18\x01 \x01(\x0e\x32\'.google.cloud.chronicle.v1.MetricFormatB\x03\xe0\x41\x01\x12\x1e\n\x11show_metric_trend\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12P\n\x14metric_display_trend\x18\x03 \x01(\x0e\x32-.google.cloud.chronicle.v1.MetricDisplayTrendB\x03\xe0\x41\x01\x12J\n\x11metric_trend_type\x18\x04 \x01(\x0e\x32*.google.cloud.chronicle.v1.MetricTrendTypeB\x03\xe0\x41\x01\x1a[\n\x07Tooltip\x12\x0c\n\x04show\x18\x01 \x01(\x08\x12\x42\n\x0ftooltip_trigger\x18\x03 \x01(\x0e\x32).google.cloud.chronicle.v1.ToolTipTrigger\x1a\x87\x02\n\x06Legend\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04show\x18\x02 \x01(\x08\x12\x0f\n\x07z_level\x18\x03 \x01(\x05\x12\t\n\x01z\x18\x04 \x01(\x05\x12\x0c\n\x04left\x18\x05 \x01(\x05\x12\x0b\n\x03top\x18\x06 \x01(\x05\x12\r\n\x05right\x18\x07 \x01(\x05\x12\x0e\n\x06\x62ottom\x18\x08 \x01(\x05\x12>\n\rlegend_orient\x18\x0c \x01(\x0e\x32\'.google.cloud.chronicle.v1.LegendOrient\x12<\n\x0clegend_align\x18\r \x01(\x0e\x32&.google.cloud.chronicle.v1.LegendAlign\x12\x0f\n\x07padding\x18\x0b \x03(\x05\x1a*\n\tColumnDef\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06header\x18\x02 \x01(\t\x1av\n\x18\x43olumnRenderTypeSettings\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x12\x63olumn_render_type\x18\x02 \x01(\x0e\x32%.google.cloud.chronicle.v1.RenderTypeB\x03\xe0\x41\x01\x1am\n\x15\x43olumnTooltipSettings\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13header_tooltip_text\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x63\x65ll_tooltip_text\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x9d\x02\n\x0bTableConfig\x12\x1d\n\x10\x65nable_text_wrap\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12z\n\x1b\x63olumn_render_type_settings\x18\x02 \x03(\x0b\x32P.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettingsB\x03\xe0\x41\x01\x12s\n\x17\x63olumn_tooltip_settings\x18\x03 \x03(\x0b\x32M.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettingsB\x03\xe0\x41\x01\x1a\xfd\x05\n\x10GoogleMapsConfig\x12q\n\rdata_settings\x18\x01 \x01(\x0b\x32U.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettingsB\x03\xe0\x41\x01\x12;\n\tplot_mode\x18\x02 \x01(\x0e\x32#.google.cloud.chronicle.v1.PlotModeB\x03\xe0\x41\x01\x12o\n\x0cmap_position\x18\x03 \x01(\x0b\x32T.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPositionB\x03\xe0\x41\x01\x12s\n\x0epoint_settings\x18\x04 \x01(\x0b\x32V.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettingsB\x03\xe0\x41\x01\x1a\x66\n\x0c\x44\x61taSettings\x12\x1c\n\x0flatitude_column\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10longitude_column\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x63ount_column\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a~\n\x0bMapPosition\x12\x15\n\x08\x66it_data\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0elatitude_value\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01\x12\x1c\n\x0flongitude_value\x18\x06 \x01(\x01\x42\x03\xe0\x41\x01\x12\x1d\n\x10zoom_scale_value\x18\x07 \x01(\x01\x42\x03\xe0\x41\x01\x1ak\n\rPointSettings\x12\x46\n\x0fpoint_size_type\x18\x01 \x01(\x0e\x32(.google.cloud.chronicle.v1.PointSizeTypeB\x03\xe0\x41\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\xb2\x02\n\tVisualMap\x12\x46\n\x0fvisual_map_type\x18\x01 \x01(\x0e\x32(.google.cloud.chronicle.v1.VisualMapTypeB\x03\xe0\x41\x01\x12\x65\n\x06pieces\x18\x02 \x03(\x0b\x32P.google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPieceB\x03\xe0\x41\x01\x1av\n\x0eVisualMapPiece\x12\x15\n\x03min\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x15\n\x03max\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05label\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x06\n\x04_minB\x06\n\x04_max\x1a\xed\x0b\n\x0f\x44rillDownConfig\x12\x62\n\x10left_drill_downs\x18\x01 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDownB\x03\xe0\x41\x02\x12\x63\n\x11right_drill_downs\x18\x02 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDownB\x03\xe0\x41\x02\x1a\x90\n\n\tDrillDown\x12x\n\x10\x64\x65\x66\x61ult_settings\x18\x03 \x01(\x0b\x32\\.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettingsH\x00\x12v\n\x0f\x63ustom_settings\x18\x04 \x01(\x0b\x32[.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettingsH\x00\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x30\n\x18\x44\x65\x66\x61ultDrillDownSettings\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x1a\xa6\x07\n\x17\x43ustomDrillDownSettings\x12{\n\x05query\x18\x03 \x01(\x0b\x32j.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQueryH\x00\x12}\n\x06\x66ilter\x18\x04 \x01(\x0b\x32k.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilterH\x00\x12\x8a\x01\n\rexternal_link\x18\x05 \x01(\x0b\x32q.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLinkH\x00\x12\x14\n\x07new_tab\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1e\n\x11left_click_column\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0e\x44rillDownQuery\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xd5\x02\n\x0f\x44rillDownFilter\x12\xa5\x01\n\x11\x64\x61shboard_filters\x18\x01 \x03(\x0b\x32\x84\x01.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilterB\x03\xe0\x41\x02\x1a\x99\x01\n\x18\x44rillDownDashboardFilter\x12 \n\x13\x64\x61shboard_filter_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12[\n\x1a\x66ilter_operator_and_values\x18\x02 \x03(\x0b\x32\x32.google.cloud.chronicle.v1.FilterOperatorAndValuesB\x03\xe0\x41\x02\x1a\x44\n\x15\x44rillDownExternalLink\x12\x11\n\x04link\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06\x61\x63tionB\n\n\x08settings:\xa4\x01\xea\x41\xa0\x01\n\'chronicle.googleapis.com/DashboardChart\x12Tprojects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}*\x0f\x64\x61shboardCharts2\x0e\x64\x61shboardChart\"\x90\x02\n\x06\x42utton\x12\x12\n\x05label\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\thyperlink\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07new_tab\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x45\n\nproperties\x18\x05 \x01(\x0b\x32,.google.cloud.chronicle.v1.Button.PropertiesB\x03\xe0\x41\x01\x1a\x63\n\nProperties\x12\x12\n\x05\x63olor\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62utton_style\x18\x02 \x01(\x0e\x32&.google.cloud.chronicle.v1.ButtonStyleB\x03\xe0\x41\x01\"\xa6\x01\n\x08Markdown\x12\x14\n\x07\x63ontent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\nproperties\x18\x02 \x01(\x0b\x32\x36.google.cloud.chronicle.v1.Markdown.MarkdownPropertiesB\x03\xe0\x41\x01\x1a\x33\n\x12MarkdownProperties\x12\x1d\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Y\n\x18GetDashboardChartRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"\xa1\x01\n\x1e\x42\x61tchGetDashboardChartsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/DashboardChart\x12>\n\x05names\x18\x02 \x03(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"f\n\x1f\x42\x61tchGetDashboardChartsResponse\x12\x43\n\x10\x64\x61shboard_charts\x18\x01 \x03(\x0b\x32).google.cloud.chronicle.v1.DashboardChart*p\n\x08TileType\x12\x19\n\x15TILE_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17TILE_TYPE_VISUALIZATION\x10\x01\x12\x14\n\x10TILE_TYPE_BUTTON\x10\x02\x12\x16\n\x12TILE_TYPE_MARKDOWN\x10\x03*t\n\nRenderType\x12\x1b\n\x17RENDER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10RENDER_TYPE_TEXT\x10\x01\x12\x14\n\x10RENDER_TYPE_ICON\x10\x02\x12\x1d\n\x19RENDER_TYPE_ICON_AND_TEXT\x10\x03*Q\n\x08\x41xisType\x12\x19\n\x15\x41XIS_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05VALUE\x10\x01\x12\x0c\n\x08\x43\x41TEGORY\x10\x02\x12\x08\n\x04TIME\x10\x03\x12\x07\n\x03LOG\x10\x04*t\n\nSeriesType\x12\x1b\n\x17SERIES_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04LINE\x10\x01\x12\x07\n\x03\x42\x41R\x10\x02\x12\x07\n\x03PIE\x10\x03\x12\x08\n\x04TEXT\x10\x04\x12\x07\n\x03MAP\x10\x05\x12\t\n\x05GAUGE\x10\x06\x12\x0f\n\x0bSCATTERPLOT\x10\x07*o\n\x13SeriesStackStrategy\x12%\n!SERIES_STACK_STRATEGY_UNSPECIFIED\x10\x00\x12\x0c\n\x08SAMESIGN\x10\x01\x12\x07\n\x03\x41LL\x10\x02\x12\x0c\n\x08POSITIVE\x10\x03\x12\x0c\n\x08NEGATIVE\x10\x04*\x7f\n\x0eToolTipTrigger\x12\x1f\n\x1bTOOLTIP_TRIGGER_UNSPECIFIED\x10\x00\x12\x18\n\x14TOOLTIP_TRIGGER_NONE\x10\x01\x12\x18\n\x14TOOLTIP_TRIGGER_ITEM\x10\x02\x12\x18\n\x14TOOLTIP_TRIGGER_AXIS\x10\x03*K\n\x0cLegendOrient\x12\x1d\n\x19LEGEND_ORIENT_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERTICAL\x10\x01\x12\x0e\n\nHORIZONTAL\x10\x02*J\n\x0bLegendAlign\x12\x1c\n\x18LEGEND_ALIGN_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x08\n\x04LEFT\x10\x02\x12\t\n\x05RIGHT\x10\x03*}\n\x0b\x42uttonStyle\x12\x1c\n\x18\x42UTTON_STYLE_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42UTTON_STYLE_FILLED\x10\x01\x12\x19\n\x15\x42UTTON_STYLE_OUTLINED\x10\x02\x12\x1c\n\x18\x42UTTON_STYLE_TRANSPARENT\x10\x03*f\n\x08PlotMode\x12\x19\n\x15PLOT_MODE_UNSPECIFIED\x10\x00\x12\x14\n\x10PLOT_MODE_POINTS\x10\x01\x12\x15\n\x11PLOT_MODE_HEATMAP\x10\x02\x12\x12\n\x0ePLOT_MODE_BOTH\x10\x03*u\n\rPointSizeType\x12\x1f\n\x1bPOINT_SIZE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15POINT_SIZE_TYPE_FIXED\x10\x01\x12(\n$POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE\x10\x02*e\n\x0cMetricFormat\x12\x1d\n\x19METRIC_FORMAT_UNSPECIFIED\x10\x00\x12\x18\n\x14METRIC_FORMAT_NUMBER\x10\x01\x12\x1c\n\x18METRIC_FORMAT_PLAIN_TEXT\x10\x02*\xc0\x01\n\x12MetricDisplayTrend\x12$\n METRIC_DISPLAY_TREND_UNSPECIFIED\x10\x00\x12\'\n#METRIC_DISPLAY_TREND_ABSOLUTE_VALUE\x10\x02\x12#\n\x1fMETRIC_DISPLAY_TREND_PERCENTAGE\x10\x03\x12\x36\n2METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE\x10\x04*r\n\x0fMetricTrendType\x12!\n\x1dMETRIC_TREND_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19METRIC_TREND_TYPE_REGULAR\x10\x01\x12\x1d\n\x19METRIC_TREND_TYPE_INVERSE\x10\x02*O\n\rVisualMapType\x12\x1f\n\x1bVISUAL_MAP_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nCONTINUOUS\x10\x01\x12\r\n\tPIECEWISE\x10\x02\x32\xfe\x04\n\x15\x44\x61shboardChartService\x12\xc3\x01\n\x11GetDashboardChart\x12\x33.google.cloud.chronicle.v1.GetDashboardChartRequest\x1a).google.cloud.chronicle.v1.DashboardChart\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/instances/*/dashboardCharts/*}\x12\xf1\x01\n\x17\x42\x61tchGetDashboardCharts\x12\x39.google.cloud.chronicle.v1.BatchGetDashboardChartsRequest\x1a:.google.cloud.chronicle.v1.BatchGetDashboardChartsResponse\"_\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/instances/*}/dashboardCharts:batchGet\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xca\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x13\x44\x61shboardChartProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + DashboardChart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart").msgclass + DashboardChart::ChartDatasource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.ChartDatasource").msgclass + DashboardChart::Visualization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization").msgclass + DashboardChart::Visualization::Axis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Axis").msgclass + DashboardChart::Visualization::Series = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series").msgclass + DashboardChart::Visualization::Series::Encode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode").msgclass + DashboardChart::Visualization::Series::DataLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabel").msgclass + DashboardChart::Visualization::Series::ItemStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyle").msgclass + DashboardChart::Visualization::Series::AreaStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyle").msgclass + DashboardChart::Visualization::Series::UserSelectedValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValues").msgclass + DashboardChart::Visualization::Series::ChartSliceColor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColor").msgclass + DashboardChart::Visualization::Series::ItemColors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColors").msgclass + DashboardChart::Visualization::Series::GaugeValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue").msgclass + DashboardChart::Visualization::Series::GaugeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfig").msgclass + DashboardChart::Visualization::Series::MetricTrendConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfig").msgclass + DashboardChart::Visualization::Tooltip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip").msgclass + DashboardChart::Visualization::Legend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Legend").msgclass + DashboardChart::Visualization::ColumnDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef").msgclass + DashboardChart::Visualization::ColumnRenderTypeSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettings").msgclass + DashboardChart::Visualization::ColumnTooltipSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettings").msgclass + DashboardChart::Visualization::TableConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfig").msgclass + DashboardChart::Visualization::GoogleMapsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig").msgclass + DashboardChart::Visualization::GoogleMapsConfig::DataSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettings").msgclass + DashboardChart::Visualization::GoogleMapsConfig::MapPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPosition").msgclass + DashboardChart::Visualization::GoogleMapsConfig::PointSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettings").msgclass + DashboardChart::Visualization::VisualMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap").msgclass + DashboardChart::Visualization::VisualMap::VisualMapPiece = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPiece").msgclass + DashboardChart::DrillDownConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig").msgclass + DashboardChart::DrillDownConfig::DrillDown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown").msgclass + DashboardChart::DrillDownConfig::DrillDown::DefaultDrillDownSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettings").msgclass + DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings").msgclass + DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQuery").msgclass + DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter").msgclass + DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter::DrillDownDashboardFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilter").msgclass + DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownExternalLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLink").msgclass + Button = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Button").msgclass + Button::Properties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Button.Properties").msgclass + Markdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Markdown").msgclass + Markdown::MarkdownProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Markdown.MarkdownProperties").msgclass + GetDashboardChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDashboardChartRequest").msgclass + BatchGetDashboardChartsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BatchGetDashboardChartsRequest").msgclass + BatchGetDashboardChartsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BatchGetDashboardChartsResponse").msgclass + TileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.TileType").enummodule + RenderType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RenderType").enummodule + AxisType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AxisType").enummodule + SeriesType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.SeriesType").enummodule + SeriesStackStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.SeriesStackStrategy").enummodule + ToolTipTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ToolTipTrigger").enummodule + LegendOrient = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.LegendOrient").enummodule + LegendAlign = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.LegendAlign").enummodule + ButtonStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ButtonStyle").enummodule + PlotMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.PlotMode").enummodule + PointSizeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.PointSizeType").enummodule + MetricFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.MetricFormat").enummodule + MetricDisplayTrend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.MetricDisplayTrend").enummodule + MetricTrendType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.MetricTrendType").enummodule + VisualMapType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.VisualMapType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb new file mode 100644 index 000000000000..6a8b4f84d9ac --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/dashboard_chart_service/credentials" +require "google/cloud/chronicle/v1/dashboard_chart_service/paths" +require "google/cloud/chronicle/v1/dashboard_chart_service/client" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing dashboards' charts. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/dashboard_chart_service" + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/dashboard_chart_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new + # + module DashboardChartService + end + end + end + end +end + +helper_path = ::File.join __dir__, "dashboard_chart_service", "helpers.rb" +require "google/cloud/chronicle/v1/dashboard_chart_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb new file mode 100644 index 000000000000..47581154918d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb @@ -0,0 +1,584 @@ +# 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/chronicle/v1/dashboard_chart_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardChartService + ## + # Client for the DashboardChartService service. + # + # A service providing functionality for managing dashboards' charts. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dashboard_chart_service_stub + + ## + # Configure the DashboardChartService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DashboardChartService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DashboardChartService clients + # ::Google::Cloud::Chronicle::V1::DashboardChartService::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", "Chronicle", "V1"] + 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.get_dashboard_chart.timeout = 60.0 + default_config.rpcs.get_dashboard_chart.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.batch_get_dashboard_charts.timeout = 60.0 + default_config.rpcs.batch_get_dashboard_charts.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DashboardChartService 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::Chronicle::V1::DashboardChartService::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 + @dashboard_chart_service_stub.universe_domain + end + + ## + # Create a new DashboardChartService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DashboardChartService 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/chronicle/v1/dashboard_chart_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 + + @dashboard_chart_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::DashboardChartService::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 + ) + + @dashboard_chart_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dashboard_chart_service_stub.logger + end + + # Service calls + + ## + # Get a dashboard chart. + # + # @overload get_dashboard_chart(request, options = nil) + # Pass arguments to `get_dashboard_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDashboardChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, ::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_dashboard_chart(name: nil) + # Pass arguments to `get_dashboard_chart` 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 name of the dashboardChart to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardCharts/\\{chart} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DashboardChart] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new + # + # # Call the get_dashboard_chart method. + # result = client.get_dashboard_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardChart. + # p result + # + def get_dashboard_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest + + # 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_dashboard_chart.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::Chronicle::V1::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_dashboard_chart.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dashboard_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_chart_service_stub.call_rpc :get_dashboard_chart, 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 + + ## + # Get dashboard charts in batches. + # + # @overload batch_get_dashboard_charts(request, options = nil) + # Pass arguments to `batch_get_dashboard_charts` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, ::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_get_dashboard_charts(parent: nil, names: nil) + # Pass arguments to `batch_get_dashboard_charts` 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 parent resource shared by all dashboard charts being + # retrieved. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance} If this is + # set, the parent of all of the dashboard charts specified in `names` must + # match this field. + # @param names [::Array<::String>] + # Required. The names of the dashboard charts to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new + # + # # Call the batch_get_dashboard_charts method. + # result = client.batch_get_dashboard_charts request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse. + # p result + # + def batch_get_dashboard_charts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest + + # 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_get_dashboard_charts.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::Chronicle::V1::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.batch_get_dashboard_charts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_get_dashboard_charts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_chart_service_stub.call_rpc :batch_get_dashboard_charts, 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 + + ## + # Configuration class for the DashboardChartService API. + # + # This class represents the configuration for DashboardChartService, + # 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::Chronicle::V1::DashboardChartService::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 + # # get_dashboard_chart to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_chart.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_chart.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::Chronicle::V1::DashboardChartService::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. + # * `: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 = "chronicle.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 DashboardChartService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_dashboard_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dashboard_chart + ## + # RPC-specific configuration for `batch_get_dashboard_charts` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_dashboard_charts + + # @private + def initialize parent_rpcs = nil + get_dashboard_chart_config = parent_rpcs.get_dashboard_chart if parent_rpcs.respond_to? :get_dashboard_chart + @get_dashboard_chart = ::Gapic::Config::Method.new get_dashboard_chart_config + batch_get_dashboard_charts_config = parent_rpcs.batch_get_dashboard_charts if parent_rpcs.respond_to? :batch_get_dashboard_charts + @batch_get_dashboard_charts = ::Gapic::Config::Method.new batch_get_dashboard_charts_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb new file mode 100644 index 000000000000..8c5f54e38221 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module DashboardChartService + # Credentials for the DashboardChartService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb new file mode 100644 index 000000000000..9bbfee50192d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb @@ -0,0 +1,73 @@ +# 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 Chronicle + module V1 + module DashboardChartService + # Path helper methods for the DashboardChartService API. + module Paths + ## + # Create a fully-qualified DashboardChart resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param chart [String] + # + # @return [::String] + def dashboard_chart_path project:, location:, instance:, chart: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb new file mode 100644 index 000000000000..6a4e38024078 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/dashboard_chart_service/credentials" +require "google/cloud/chronicle/v1/dashboard_chart_service/paths" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing dashboards' charts. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/dashboard_chart_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new + # + module DashboardChartService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb new file mode 100644 index 000000000000..1abece7b2fd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb @@ -0,0 +1,527 @@ +# 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/chronicle/v1/dashboard_chart_pb" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardChartService + module Rest + ## + # REST client for the DashboardChartService service. + # + # A service providing functionality for managing dashboards' charts. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dashboard_chart_service_stub + + ## + # Configure the DashboardChartService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DashboardChartService clients + # ::Google::Cloud::Chronicle::V1::DashboardChartService::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", "Chronicle", "V1"] + 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.get_dashboard_chart.timeout = 60.0 + default_config.rpcs.get_dashboard_chart.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.batch_get_dashboard_charts.timeout = 60.0 + default_config.rpcs.batch_get_dashboard_charts.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DashboardChartService 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::Chronicle::V1::DashboardChartService::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 + @dashboard_chart_service_stub.universe_domain + end + + ## + # Create a new DashboardChartService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DashboardChartService 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 + + @dashboard_chart_service_stub = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @dashboard_chart_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dashboard_chart_service_stub.logger + end + + # Service calls + + ## + # Get a dashboard chart. + # + # @overload get_dashboard_chart(request, options = nil) + # Pass arguments to `get_dashboard_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDashboardChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, ::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_dashboard_chart(name: nil) + # Pass arguments to `get_dashboard_chart` 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 name of the dashboardChart to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardCharts/\\{chart} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DashboardChart] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new + # + # # Call the get_dashboard_chart method. + # result = client.get_dashboard_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardChart. + # p result + # + def get_dashboard_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest + + # 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_dashboard_chart.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::Chronicle::V1::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_dashboard_chart.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dashboard_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_chart_service_stub.get_dashboard_chart 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 + + ## + # Get dashboard charts in batches. + # + # @overload batch_get_dashboard_charts(request, options = nil) + # Pass arguments to `batch_get_dashboard_charts` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, ::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_get_dashboard_charts(parent: nil, names: nil) + # Pass arguments to `batch_get_dashboard_charts` 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 parent resource shared by all dashboard charts being + # retrieved. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance} If this is + # set, the parent of all of the dashboard charts specified in `names` must + # match this field. + # @param names [::Array<::String>] + # Required. The names of the dashboard charts to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new + # + # # Call the batch_get_dashboard_charts method. + # result = client.batch_get_dashboard_charts request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse. + # p result + # + def batch_get_dashboard_charts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest + + # 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_get_dashboard_charts.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::Chronicle::V1::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_get_dashboard_charts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_get_dashboard_charts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_chart_service_stub.batch_get_dashboard_charts 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 + + ## + # Configuration class for the DashboardChartService REST API. + # + # This class represents the configuration for DashboardChartService 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::Chronicle::V1::DashboardChartService::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 + # # get_dashboard_chart to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_chart.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_chart.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. + # * `: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 = "chronicle.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 DashboardChartService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_dashboard_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dashboard_chart + ## + # RPC-specific configuration for `batch_get_dashboard_charts` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_dashboard_charts + + # @private + def initialize parent_rpcs = nil + get_dashboard_chart_config = parent_rpcs.get_dashboard_chart if parent_rpcs.respond_to? :get_dashboard_chart + @get_dashboard_chart = ::Gapic::Config::Method.new get_dashboard_chart_config + batch_get_dashboard_charts_config = parent_rpcs.batch_get_dashboard_charts if parent_rpcs.respond_to? :batch_get_dashboard_charts + @batch_get_dashboard_charts = ::Gapic::Config::Method.new batch_get_dashboard_charts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb new file mode 100644 index 000000000000..e79d617d732c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb @@ -0,0 +1,203 @@ +# 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/chronicle/v1/dashboard_chart_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardChartService + module Rest + ## + # REST service stub for the DashboardChartService 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 get_dashboard_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest] + # 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::Chronicle::V1::DashboardChart] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # A result object deserialized from the server's reply + def get_dashboard_chart request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dashboard_chart_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_dashboard_chart", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DashboardChart.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_get_dashboard_charts REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest] + # 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::Chronicle::V1::BatchGetDashboardChartsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] + # A result object deserialized from the server's reply + def batch_get_dashboard_charts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_dashboard_charts_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_get_dashboard_charts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse.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 get_dashboard_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest] + # 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_dashboard_chart_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dashboardCharts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_get_dashboard_charts REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest] + # 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_get_dashboard_charts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dashboardCharts:batchGet", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb new file mode 100644 index 000000000000..33780def2e31 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/dashboard_chart.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/dashboard_chart_pb' + +module Google + module Cloud + module Chronicle + module V1 + module DashboardChartService + # A service providing functionality for managing dashboards' charts. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.DashboardChartService' + + # Get a dashboard chart. + rpc :GetDashboardChart, ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, ::Google::Cloud::Chronicle::V1::DashboardChart + # Get dashboard charts in batches. + rpc :BatchGetDashboardCharts, ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb new file mode 100644 index 000000000000..25fc186ae397 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/dashboard_query.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/protobuf/any_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n/google/cloud/chronicle/v1/dashboard_query.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1agoogle/type/interval.proto\"\xb5\x05\n\x0e\x44\x61shboardQuery\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardQuery\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x05input\x18\x03 \x01(\x0b\x32/.google.cloud.chronicle.v1.DashboardQuery.InputB\x03\xe0\x41\x02\x12H\n\x0f\x64\x61shboard_chart\x18\x04 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\x12\x11\n\x04\x65tag\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x02\n\x05Input\x12,\n\x0btime_window\x18\x01 \x01(\x0b\x32\x15.google.type.IntervalH\x00\x12U\n\rrelative_time\x18\x03 \x01(\x0b\x32<.google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTimeH\x00\x1ah\n\x0cRelativeTime\x12;\n\ttime_unit\x18\x01 \x01(\x0e\x32#.google.cloud.chronicle.v1.TimeUnitB\x03\xe0\x41\x02\x12\x1b\n\x0estart_time_val\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x42\x0c\n\ntime_input:\xa6\x01\xea\x41\xa2\x01\n\'chronicle.googleapis.com/DashboardQuery\x12Uprojects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}*\x10\x64\x61shboardQueries2\x0e\x64\x61shboardQuery\"Y\n\x18GetDashboardQueryRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardQuery\"\xa0\x02\n\x1c\x45xecuteDashboardQueryRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/DashboardQuery\x12=\n\x05query\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x02\x12@\n\x07\x66ilters\x18\x03 \x03(\x0b\x32*.google.cloud.chronicle.v1.DashboardFilterB\x03\xe0\x41\x01\x12\x18\n\x0b\x63lear_cache\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17use_previous_time_range\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xd6\x05\n\x11QueryRuntimeError\x12\x13\n\x0b\x65rror_title\x18\x01 \x01(\t\x12\x19\n\x11\x65rror_description\x18\x02 \x01(\t\x12R\n\x0e\x65rror_severity\x18\x03 \x01(\x0e\x32:.google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity\x12X\n\x08metadata\x18\x04 \x03(\x0b\x32\x46.google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata\x12R\n\x0ewarning_reason\x18\x05 \x01(\x0e\x32:.google.cloud.chronicle.v1.QueryRuntimeError.WarningReason\x1aq\n\x19QueryRuntimeErrorMetadata\x12\x45\n\x03key\x18\x01 \x01(\x0e\x32\x38.google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey\x12\r\n\x05value\x18\x02 \x01(\t\"H\n\rErrorSeverity\x12\x1e\n\x1a\x45RROR_SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\n\n\x06SEVERE\x10\x02\":\n\x0bMetadataKey\x12\x1c\n\x18METADATA_KEY_UNSPECIFIED\x10\x00\x12\r\n\tROW_LIMIT\x10\x01\"\x95\x01\n\rWarningReason\x12\x1e\n\x1aWARNING_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12ROW_LIMIT_EXCEEDED\x10\x01\x12\x1e\n\x1a\x44\x45\x46\x41ULT_ROW_LIMIT_EXCEEDED\x10\x02\x12,\n(CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED\x10\x03\"\xc2\x0b\n\x1d\x45xecuteDashboardQueryResponse\x12T\n\x07results\x18\x01 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData\x12;\n\x0c\x64\x61ta_sources\x18\x03 \x03(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x12J\n!last_backend_cache_refreshed_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12*\n\x0btime_window\x18\x05 \x01(\x0b\x32\x15.google.type.Interval\x12J\n\x14query_runtime_errors\x18\x06 \x03(\x0b\x32,.google.cloud.chronicle.v1.QueryRuntimeError\x12J\n\x11language_features\x18\x07 \x03(\x0e\x32*.google.cloud.chronicle.v1.LanguageFeatureB\x03\xe0\x41\x01\x1a\xa6\x04\n\x0b\x43olumnValue\x12\x12\n\x08null_val\x18\x01 \x01(\x08H\x00\x12\x12\n\x08\x62ool_val\x18\x02 \x01(\x08H\x00\x12\x13\n\tbytes_val\x18\x03 \x01(\x0cH\x00\x12\x14\n\ndouble_val\x18\x04 \x01(\x01H\x00\x12\x13\n\tint64_val\x18\x05 \x01(\x03H\x00\x12\x14\n\nuint64_val\x18\x06 \x01(\x04H\x00\x12\x14\n\nstring_val\x18\x07 \x01(\tH\x00\x12\x33\n\rtimestamp_val\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12%\n\x08\x64\x61te_val\x18\t \x01(\x0b\x32\x11.google.type.DateH\x00\x12)\n\tproto_val\x18\n \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x64\n\x08metadata\x18\x0b \x01(\x0b\x32R.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata\x1a\x8c\x01\n\rValueMetadata\x12\x33\n\x05links\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.InAppLink\x12\x13\n\x0b\x66ield_paths\x18\x02 \x03(\t\x12\x31\n\rtimestamp_val\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x07\n\x05value\x1a\xa3\x02\n\nColumnType\x12U\n\x05value\x18\x01 \x01(\x0b\x32\x44.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValueH\x00\x12X\n\x04list\x18\x02 \x01(\x0b\x32H.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.ListH\x00\x1a\\\n\x04List\x12T\n\x06values\x18\x01 \x03(\x0b\x32\x44.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValueB\x06\n\x04type\x1a\xae\x01\n\nColumnData\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12S\n\x06values\x18\x02 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType\x12;\n\x08metadata\x18\x03 \x01(\x0b\x32).google.cloud.chronicle.v1.ColumnMetadata\"\xf4\x03\n\x0f\x44\x61shboardFilter\x12\n\n\x02id\x18\x01 \x01(\t\x12:\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x12\x12\n\nfield_path\x18\x03 \x01(\t\x12\\\n filter_operator_and_field_values\x18\x04 \x03(\x0b\x32\x32.google.cloud.chronicle.v1.FilterOperatorAndValues\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x11\n\tchart_ids\x18\x06 \x03(\t\x12*\n\x1dis_standard_time_range_filter\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cis_mandatory\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\x37\n%is_standard_time_range_filter_enabled\x18\t \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12T\n\x16\x61\x64vanced_filter_config\x18\n \x01(\x0b\x32/.google.cloud.chronicle.v1.AdvancedFilterConfigB\x03\xe0\x41\x01\x42(\n&_is_standard_time_range_filter_enabled\"s\n\x17\x46ilterOperatorAndValues\x12\x42\n\x0f\x66ilter_operator\x18\x01 \x01(\x0e\x32).google.cloud.chronicle.v1.FilterOperator\x12\x14\n\x0c\x66ield_values\x18\x02 \x03(\t\"\xc6\x05\n\x14\x41\x64vancedFilterConfig\x12\x12\n\x05token\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tseparator\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10multiple_allowed\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0e\x64\x65\x66\x61ult_values\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12!\n\x14skip_default_affixes\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12V\n\x0cvalue_source\x18\x08 \x01(\x0b\x32;.google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSourceB\x03\xe0\x41\x02\x1a\xd1\x01\n\x0bValueSource\x12\\\n\x0emanual_options\x18\x01 \x01(\x0b\x32=.google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptionsB\x03\xe0\x41\x01H\x00\x12Z\n\rquery_options\x18\x02 \x01(\x0b\x32<.google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptionsB\x03\xe0\x41\x01H\x00\x42\x08\n\x06source\x1a%\n\rManualOptions\x12\x14\n\x07options\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\xa5\x01\n\x0cQueryOptions\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x63olumn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x1aglobal_time_filter_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x05input\x18\x04 \x01(\x0b\x32/.google.cloud.chronicle.v1.DashboardQuery.InputB\x03\xe0\x41\x01\"9\n\tInAppLink\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x10\n\x08icon_url\x18\x03 \x01(\t\"\xb5\x02\n\x0e\x43olumnMetadata\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x12\n\nfield_path\x18\x02 \x01(\t\x12\x15\n\rfunction_name\x18\x03 \x01(\t\x12\x17\n\x0f\x66unction_module\x18\x04 \x01(\t\x12:\n\x0b\x64\x61ta_source\x18\x05 \x01(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x12H\n\x12timestamp_metadata\x18\x06 \x01(\x0b\x32,.google.cloud.chronicle.v1.TimestampMetadata\x12\x11\n\tlongitude\x18\x07 \x01(\x08\x12\x10\n\x08latitude\x18\x08 \x01(\x08\x12\x10\n\x08selected\x18\t \x01(\x08\x12\x12\n\nunselected\x18\n \x01(\x08\"\x83\x01\n\x11TimestampMetadata\x12\x13\n\x0btime_format\x18\x01 \x01(\t\x12\x11\n\ttime_zone\x18\x02 \x01(\t\x12\x18\n\x10time_granularity\x18\x03 \x01(\t\x12\x13\n\x0bis_sortable\x18\x04 \x01(\x08\x12\x17\n\x0fis_interpolable\x18\x05 \x01(\x08*[\n\x0fLanguageFeature\x12 \n\x1cLANGUAGE_FEATURE_UNSPECIFIED\x10\x00\x12\t\n\x05JOINS\x10\x01\x12\n\n\x06STAGES\x10\x02\x12\x0f\n\x0b\x44\x41TA_TABLES\x10\x03*\xe4\x02\n\x0e\x46ilterOperator\x12\x1f\n\x1b\x46ILTER_OPERATOR_UNSPECIFIED\x10\x00\x12\t\n\x05\x45QUAL\x10\x01\x12\r\n\tNOT_EQUAL\x10\x02\x12\x06\n\x02IN\x10\x03\x12\x10\n\x0cGREATER_THAN\x10\x04\x12\x1c\n\x18GREATER_THAN_OR_EQUAL_TO\x10\x05\x12\r\n\tLESS_THAN\x10\x06\x12\x19\n\x15LESS_THAN_OR_EQUAL_TO\x10\x07\x12\x0b\n\x07\x42\x45TWEEN\x10\x08\x12\x08\n\x04PAST\x10\t\x12\x0b\n\x07IS_NULL\x10\n\x12\x0f\n\x0bIS_NOT_NULL\x10\x0b\x12\x0f\n\x0bSTARTS_WITH\x10\x0c\x12\r\n\tENDS_WITH\x10\r\x12\x18\n\x14\x44OES_NOT_STARTS_WITH\x10\x0e\x12\x16\n\x12\x44OES_NOT_ENDS_WITH\x10\x0f\x12\n\n\x06NOT_IN\x10\x10\x12\x0c\n\x08\x43ONTAINS\x10\x11\x12\x14\n\x10\x44OES_NOT_CONTAIN\x10\x12*\x9a\x02\n\nDataSource\x12\x1b\n\x17\x44\x41TA_SOURCE_UNSPECIFIED\x10\x00\x12\x07\n\x03UDM\x10\x01\x12\n\n\x06\x45NTITY\x10\x02\x12\x15\n\x11INGESTION_METRICS\x10\x03\x12\x13\n\x0fRULE_DETECTIONS\x10\x04\x12\x0c\n\x08RULESETS\x10\x05\x12\n\n\x06GLOBAL\x10\x06\x12\x0f\n\x0bIOC_MATCHES\x10\x07\x12\t\n\x05RULES\x10\x08\x12\x0e\n\nSOAR_CASES\x10\t\x12\x12\n\x0eSOAR_PLAYBOOKS\x10\n\x12\x15\n\x11SOAR_CASE_HISTORY\x10\x0b\x12\x0e\n\nDATA_TABLE\x10\x0c\x12\x11\n\rINVESTIGATION\x10\r\x12\x1a\n\x16INVESTIGATION_FEEDBACK\x10\x0e*o\n\x08TimeUnit\x12\x19\n\x15TIME_UNIT_UNSPECIFIED\x10\x00\x12\n\n\x06SECOND\x10\x01\x12\n\n\x06MINUTE\x10\x02\x12\x08\n\x04HOUR\x10\x03\x12\x07\n\x03\x44\x41Y\x10\x04\x12\x08\n\x04WEEK\x10\x05\x12\t\n\x05MONTH\x10\x06\x12\x08\n\x04YEAR\x10\x07\x32\xfc\x04\n\x15\x44\x61shboardQueryService\x12\xc4\x01\n\x11GetDashboardQuery\x12\x33.google.cloud.chronicle.v1.GetDashboardQueryRequest\x1a).google.cloud.chronicle.v1.DashboardQuery\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dashboardQueries/*}\x12\xee\x01\n\x15\x45xecuteDashboardQuery\x12\x37.google.cloud.chronicle.v1.ExecuteDashboardQueryRequest\x1a\x38.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse\"b\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02M\"H/v1/{parent=projects/*/locations/*/instances/*}/dashboardQueries:execute:\x01*\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xca\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x13\x44\x61shboardQueryProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + DashboardQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardQuery").msgclass + DashboardQuery::Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardQuery.Input").msgclass + DashboardQuery::Input::RelativeTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTime").msgclass + GetDashboardQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDashboardQueryRequest").msgclass + ExecuteDashboardQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryRequest").msgclass + QueryRuntimeError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError").msgclass + QueryRuntimeError::QueryRuntimeErrorMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata").msgclass + QueryRuntimeError::ErrorSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity").enummodule + QueryRuntimeError::MetadataKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey").enummodule + QueryRuntimeError::WarningReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.WarningReason").enummodule + ExecuteDashboardQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse").msgclass + ExecuteDashboardQueryResponse::ColumnValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue").msgclass + ExecuteDashboardQueryResponse::ColumnValue::ValueMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata").msgclass + ExecuteDashboardQueryResponse::ColumnType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType").msgclass + ExecuteDashboardQueryResponse::ColumnType::List = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.List").msgclass + ExecuteDashboardQueryResponse::ColumnData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData").msgclass + DashboardFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardFilter").msgclass + FilterOperatorAndValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FilterOperatorAndValues").msgclass + AdvancedFilterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig").msgclass + AdvancedFilterConfig::ValueSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSource").msgclass + AdvancedFilterConfig::ManualOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptions").msgclass + AdvancedFilterConfig::QueryOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptions").msgclass + InAppLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InAppLink").msgclass + ColumnMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ColumnMetadata").msgclass + TimestampMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.TimestampMetadata").msgclass + LanguageFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.LanguageFeature").enummodule + FilterOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FilterOperator").enummodule + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataSource").enummodule + TimeUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.TimeUnit").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb new file mode 100644 index 000000000000..fea1bce2d395 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/dashboard_query_service/credentials" +require "google/cloud/chronicle/v1/dashboard_query_service/paths" +require "google/cloud/chronicle/v1/dashboard_query_service/client" +require "google/cloud/chronicle/v1/dashboard_query_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing dashboards' queries. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/dashboard_query_service" + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/dashboard_query_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + module DashboardQueryService + end + end + end + end +end + +helper_path = ::File.join __dir__, "dashboard_query_service", "helpers.rb" +require "google/cloud/chronicle/v1/dashboard_query_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb new file mode 100644 index 000000000000..75eb19e93766 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb @@ -0,0 +1,589 @@ +# 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/chronicle/v1/dashboard_query_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardQueryService + ## + # Client for the DashboardQueryService service. + # + # A service providing functionality for managing dashboards' queries. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dashboard_query_service_stub + + ## + # Configure the DashboardQueryService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DashboardQueryService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DashboardQueryService clients + # ::Google::Cloud::Chronicle::V1::DashboardQueryService::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", "Chronicle", "V1"] + 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.get_dashboard_query.timeout = 60.0 + default_config.rpcs.get_dashboard_query.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.execute_dashboard_query.timeout = 1800.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::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 + @dashboard_query_service_stub.universe_domain + end + + ## + # Create a new DashboardQueryService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DashboardQueryService 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/chronicle/v1/dashboard_query_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 + + @dashboard_query_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::DashboardQueryService::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 + ) + + @dashboard_query_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dashboard_query_service_stub.logger + end + + # Service calls + + ## + # Get a dashboard query. + # + # @overload get_dashboard_query(request, options = nil) + # Pass arguments to `get_dashboard_query` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, ::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_dashboard_query(name: nil) + # Pass arguments to `get_dashboard_query` 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 name of the dashboardQuery to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardQueries/\\{query} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DashboardQuery] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new + # + # # Call the get_dashboard_query method. + # result = client.get_dashboard_query request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardQuery. + # p result + # + def get_dashboard_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest + + # 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_dashboard_query.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::Chronicle::V1::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_dashboard_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dashboard_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_query_service_stub.call_rpc :get_dashboard_query, 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 + + ## + # Execute a query and return the data. + # + # @overload execute_dashboard_query(request, options = nil) + # Pass arguments to `execute_dashboard_query` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, ::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 execute_dashboard_query(parent: nil, query: nil, filters: nil, clear_cache: nil, use_previous_time_range: nil) + # Pass arguments to `execute_dashboard_query` 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 parent, under which to run this dashboardQuery. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Required. The query to execute and get results back for. + # QueryID or 'query', 'input.time_window' fields will be used. Use + # 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + # query. + # @param filters [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter, ::Hash>] + # Optional. Dashboard level filters other than query string. + # @param clear_cache [::Boolean] + # Optional. When true, the backend would read from the database, rather than + # fetching data directly from the cache. + # @param use_previous_time_range [::Boolean] + # Optional. When true, the backend will execute the query against the + # previous time range of the query. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new + # + # # Call the execute_dashboard_query method. + # result = client.execute_dashboard_query request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse. + # p result + # + def execute_dashboard_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest + + # 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.execute_dashboard_query.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::Chronicle::V1::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.execute_dashboard_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.execute_dashboard_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_query_service_stub.call_rpc :execute_dashboard_query, 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 + + ## + # Configuration class for the DashboardQueryService API. + # + # This class represents the configuration for DashboardQueryService, + # 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::Chronicle::V1::DashboardQueryService::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 + # # get_dashboard_query to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_query.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_query.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::Chronicle::V1::DashboardQueryService::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. + # * `: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 = "chronicle.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 DashboardQueryService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_dashboard_query` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dashboard_query + ## + # RPC-specific configuration for `execute_dashboard_query` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_dashboard_query + + # @private + def initialize parent_rpcs = nil + get_dashboard_query_config = parent_rpcs.get_dashboard_query if parent_rpcs.respond_to? :get_dashboard_query + @get_dashboard_query = ::Gapic::Config::Method.new get_dashboard_query_config + execute_dashboard_query_config = parent_rpcs.execute_dashboard_query if parent_rpcs.respond_to? :execute_dashboard_query + @execute_dashboard_query = ::Gapic::Config::Method.new execute_dashboard_query_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb new file mode 100644 index 000000000000..18fdc4a6bfae --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module DashboardQueryService + # Credentials for the DashboardQueryService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb new file mode 100644 index 000000000000..937d3f33b4e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb @@ -0,0 +1,94 @@ +# 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 Chronicle + module V1 + module DashboardQueryService + # Path helper methods for the DashboardQueryService API. + module Paths + ## + # Create a fully-qualified DashboardChart resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param chart [String] + # + # @return [::String] + def dashboard_chart_path project:, location:, instance:, chart: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" + end + + ## + # Create a fully-qualified DashboardQuery resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param query [String] + # + # @return [::String] + def dashboard_query_path project:, location:, instance:, query: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardQueries/#{query}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb new file mode 100644 index 000000000000..7679559f64da --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/dashboard_query_service/credentials" +require "google/cloud/chronicle/v1/dashboard_query_service/paths" +require "google/cloud/chronicle/v1/dashboard_query_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing dashboards' queries. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/dashboard_query_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + module DashboardQueryService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/dashboard_query_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb new file mode 100644 index 000000000000..2653019e183b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb @@ -0,0 +1,532 @@ +# 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/chronicle/v1/dashboard_query_pb" +require "google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardQueryService + module Rest + ## + # REST client for the DashboardQueryService service. + # + # A service providing functionality for managing dashboards' queries. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :dashboard_query_service_stub + + ## + # Configure the DashboardQueryService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DashboardQueryService clients + # ::Google::Cloud::Chronicle::V1::DashboardQueryService::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", "Chronicle", "V1"] + 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.get_dashboard_query.timeout = 60.0 + default_config.rpcs.get_dashboard_query.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.execute_dashboard_query.timeout = 1800.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::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 + @dashboard_query_service_stub.universe_domain + end + + ## + # Create a new DashboardQueryService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DashboardQueryService 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 + + @dashboard_query_service_stub = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @dashboard_query_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @dashboard_query_service_stub.logger + end + + # Service calls + + ## + # Get a dashboard query. + # + # @overload get_dashboard_query(request, options = nil) + # Pass arguments to `get_dashboard_query` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, ::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_dashboard_query(name: nil) + # Pass arguments to `get_dashboard_query` 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 name of the dashboardQuery to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardQueries/\\{query} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DashboardQuery] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new + # + # # Call the get_dashboard_query method. + # result = client.get_dashboard_query request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardQuery. + # p result + # + def get_dashboard_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest + + # 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_dashboard_query.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::Chronicle::V1::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_dashboard_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dashboard_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_query_service_stub.get_dashboard_query 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 + + ## + # Execute a query and return the data. + # + # @overload execute_dashboard_query(request, options = nil) + # Pass arguments to `execute_dashboard_query` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, ::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 execute_dashboard_query(parent: nil, query: nil, filters: nil, clear_cache: nil, use_previous_time_range: nil) + # Pass arguments to `execute_dashboard_query` 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 parent, under which to run this dashboardQuery. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Required. The query to execute and get results back for. + # QueryID or 'query', 'input.time_window' fields will be used. Use + # 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + # query. + # @param filters [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter, ::Hash>] + # Optional. Dashboard level filters other than query string. + # @param clear_cache [::Boolean] + # Optional. When true, the backend would read from the database, rather than + # fetching data directly from the cache. + # @param use_previous_time_range [::Boolean] + # Optional. When true, the backend will execute the query against the + # previous time range of the query. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new + # + # # Call the execute_dashboard_query method. + # result = client.execute_dashboard_query request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse. + # p result + # + def execute_dashboard_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest + + # 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.execute_dashboard_query.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::Chronicle::V1::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.execute_dashboard_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.execute_dashboard_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @dashboard_query_service_stub.execute_dashboard_query 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 + + ## + # Configuration class for the DashboardQueryService REST API. + # + # This class represents the configuration for DashboardQueryService 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::Chronicle::V1::DashboardQueryService::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 + # # get_dashboard_query to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_query.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_dashboard_query.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. + # * `: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 = "chronicle.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 DashboardQueryService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_dashboard_query` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dashboard_query + ## + # RPC-specific configuration for `execute_dashboard_query` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_dashboard_query + + # @private + def initialize parent_rpcs = nil + get_dashboard_query_config = parent_rpcs.get_dashboard_query if parent_rpcs.respond_to? :get_dashboard_query + @get_dashboard_query = ::Gapic::Config::Method.new get_dashboard_query_config + execute_dashboard_query_config = parent_rpcs.execute_dashboard_query if parent_rpcs.respond_to? :execute_dashboard_query + @execute_dashboard_query = ::Gapic::Config::Method.new execute_dashboard_query_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb new file mode 100644 index 000000000000..b58063ce1d9b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb @@ -0,0 +1,204 @@ +# 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/chronicle/v1/dashboard_query_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DashboardQueryService + module Rest + ## + # REST service stub for the DashboardQueryService 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 get_dashboard_query REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest] + # 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::Chronicle::V1::DashboardQuery] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # A result object deserialized from the server's reply + def get_dashboard_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dashboard_query_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_dashboard_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DashboardQuery.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the execute_dashboard_query REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest] + # 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::Chronicle::V1::ExecuteDashboardQueryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] + # A result object deserialized from the server's reply + def execute_dashboard_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_execute_dashboard_query_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: "execute_dashboard_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse.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 get_dashboard_query REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest] + # 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_dashboard_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dashboardQueries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the execute_dashboard_query REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_execute_dashboard_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dashboardQueries:execute", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb new file mode 100644 index 000000000000..f96c55661d70 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb @@ -0,0 +1,47 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/dashboard_query.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/dashboard_query_pb' + +module Google + module Cloud + module Chronicle + module V1 + module DashboardQueryService + # A service providing functionality for managing dashboards' queries. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.DashboardQueryService' + + # Get a dashboard query. + rpc :GetDashboardQuery, ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, ::Google::Cloud::Chronicle::V1::DashboardQuery + # Execute a query and return the data. + rpc :ExecuteDashboardQuery, ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb new file mode 100644 index 000000000000..cc6fd584534a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/data_access_control.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/chronicle/v1/data_access_control.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x01\n\x1c\x43reateDataAccessLabelRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12J\n\x11\x64\x61ta_access_label\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_label_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\x9b\x01\n\x1bListDataAccessLabelsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x1cListDataAccessLabelsResponse\x12\x46\n\x12\x64\x61ta_access_labels\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x1cUpdateDataAccessLabelRequest\x12J\n\x11\x64\x61ta_access_label\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\xcf\x01\n\x1c\x43reateDataAccessScopeRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12J\n\x11\x64\x61ta_access_scope\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_scope_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\x9b\x01\n\x1bListDataAccessScopesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd3\x01\n\x1cListDataAccessScopesResponse\x12\x46\n\x12\x64\x61ta_access_scopes\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScope\x12-\n global_data_access_scope_granted\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB#\n!_global_data_access_scope_granted\"\x9b\x01\n\x1cUpdateDataAccessScopeRequest\x12J\n\x11\x64\x61ta_access_scope\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\xd5\x03\n\x0f\x44\x61taAccessLabel\x12\x13\n\tudm_query\x18\x03 \x01(\tH\x00\x12;\n\x04name\x18\x01 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessLabel\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}B\x0c\n\ndefinition\"\x88\x05\n\x0f\x44\x61taAccessScope\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12\\\n\x1a\x61llowed_data_access_labels\x18\x02 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12[\n\x19\x64\x65nied_data_access_labels\x18\x03 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tallow_all\x18\n \x01(\x08\x42\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessScope\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}\"\xd0\x01\n\x18\x44\x61taAccessLabelReference\x12\x1b\n\x11\x64\x61ta_access_label\x18\x01 \x01(\tH\x00\x12\x12\n\x08log_type\x18\x02 \x01(\tH\x00\x12\x19\n\x0f\x61sset_namespace\x18\x03 \x01(\tH\x00\x12\x44\n\x0fingestion_label\x18\x04 \x01(\x0b\x32).google.cloud.chronicle.v1.IngestionLabelH\x00\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x42\x07\n\x05label\"V\n\x0eIngestionLabel\x12 \n\x13ingestion_label_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15ingestion_label_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xe6\x12\n\x18\x44\x61taAccessControlService\x12\x8a\x02\n\x15\x43reateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.CreateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8b\x01\xda\x41-parent,data_access_label,data_access_label_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels:\x11\x64\x61ta_access_label\x12\xc7\x01\n\x12GetDataAccessLabel\x12\x34.google.cloud.chronicle.v1.GetDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\xda\x01\n\x14ListDataAccessLabels\x12\x36.google.cloud.chronicle.v1.ListDataAccessLabelsRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessLabelsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels\x12\x8c\x02\n\x15UpdateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_label,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_label.name=projects/*/locations/*/instances/*/dataAccessLabels/*}:\x11\x64\x61ta_access_label\x12\xb9\x01\n\x15\x44\x65leteDataAccessLabel\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessLabelRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\x8a\x02\n\x15\x43reateDataAccessScope\x12\x37.google.cloud.chronicle.v1.CreateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8b\x01\xda\x41-parent,data_access_scope,data_access_scope_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes:\x11\x64\x61ta_access_scope\x12\xc7\x01\n\x12GetDataAccessScope\x12\x34.google.cloud.chronicle.v1.GetDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x12\xda\x01\n\x14ListDataAccessScopes\x12\x36.google.cloud.chronicle.v1.ListDataAccessScopesRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessScopesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes\x12\x8c\x02\n\x15UpdateDataAccessScope\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_scope,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_scope.name=projects/*/locations/*/instances/*/dataAccessScopes/*}:\x11\x64\x61ta_access_scope\x12\xb9\x01\n\x15\x44\x65leteDataAccessScope\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessScopeRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0f\x44\x61taAccessProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + CreateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessLabelRequest").msgclass + GetDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessLabelRequest").msgclass + ListDataAccessLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsRequest").msgclass + ListDataAccessLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsResponse").msgclass + UpdateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessLabelRequest").msgclass + DeleteDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessLabelRequest").msgclass + CreateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessScopeRequest").msgclass + GetDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessScopeRequest").msgclass + ListDataAccessScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesRequest").msgclass + ListDataAccessScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesResponse").msgclass + UpdateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessScopeRequest").msgclass + DeleteDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessScopeRequest").msgclass + DataAccessLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabel").msgclass + DataAccessScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessScope").msgclass + DataAccessLabelReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabelReference").msgclass + IngestionLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.IngestionLabel").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb new file mode 100644 index 000000000000..7001b817d96a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb @@ -0,0 +1,56 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/data_access_control_service/credentials" +require "google/cloud/chronicle/v1/data_access_control_service/paths" +require "google/cloud/chronicle/v1/data_access_control_service/client" +require "google/cloud/chronicle/v1/data_access_control_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/data_access_control_service" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/data_access_control_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + module DataAccessControlService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_access_control_service", "helpers.rb" +require "google/cloud/chronicle/v1/data_access_control_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb new file mode 100644 index 000000000000..06ae3041cf1e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb @@ -0,0 +1,1431 @@ +# 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/chronicle/v1/data_access_control_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + ## + # Client for the DataAccessControlService service. + # + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_access_control_service_stub + + ## + # Configure the DataAccessControlService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataAccessControlService clients + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] + 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_data_access_label.timeout = 60.0 + + default_config.rpcs.get_data_access_label.timeout = 60.0 + default_config.rpcs.get_data_access_label.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_labels.timeout = 60.0 + default_config.rpcs.list_data_access_labels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_label.timeout = 60.0 + + default_config.rpcs.delete_data_access_label.timeout = 60.0 + + default_config.rpcs.create_data_access_scope.timeout = 60.0 + + default_config.rpcs.get_data_access_scope.timeout = 60.0 + default_config.rpcs.get_data_access_scope.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_scopes.timeout = 60.0 + default_config.rpcs.list_data_access_scopes.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_scope.timeout = 60.0 + + default_config.rpcs.delete_data_access_scope.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 + @data_access_control_service_stub.universe_domain + end + + ## + # Create a new DataAccessControlService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataAccessControlService 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/chronicle/v1/data_access_control_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 + + @data_access_control_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::DataAccessControlService::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 + ) + + @data_access_control_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_access_control_service_stub.logger + end + + # Service calls + + ## + # Creates a data access label. + # Data access labels are applied to incoming event data and selected in data + # access scopes (another resource), and only users with scopes containing the + # label can see data with that label. Currently, the data access label + # resource only includes custom labels, which are labels that correspond + # to UDM queries over event data. + # + # @overload create_data_access_label(request, options = nil) + # Pass arguments to `create_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) + # Pass arguments to `create_data_access_label` 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 parent resource where this Data Access Label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. Data access label to create. + # @param data_access_label_id [::String] + # Required. The ID to use for the data access label, which will become the + # label's display name and the final component of the label's resource name. + # The maximum number of characters should be 63. Regex pattern is as per AIP: + # https://google.aip.dev/122#resource-id-segments + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new + # + # # Call the create_data_access_label method. + # result = client.create_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def create_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :create_data_access_label, 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 data access label. + # + # @overload get_data_access_label(request, options = nil) + # Pass arguments to `get_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::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_data_access_label(name: nil) + # Pass arguments to `get_data_access_label` 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 ID of the data access label to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new + # + # # Call the get_data_access_label method. + # result = client.get_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def get_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :get_data_access_label, 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 all data access labels for the customer. + # + # @overload list_data_access_labels(request, options = nil) + # Pass arguments to `list_data_access_labels` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_labels` 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 parent resource where this data access label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access labels to return. The service may return + # fewer than this value. If unspecified, at most 100 data access labels will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessLabelsRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessLabel and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new + # + # # Call the list_data_access_labels method. + # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. + # p item + # end + # + def list_data_access_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest + + # 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_data_access_labels.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::Chronicle::V1::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_data_access_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_access_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :list_data_access_labels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, 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 data access label. + # + # @overload update_data_access_label(request, options = nil) + # Pass arguments to `update_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::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_data_access_label(data_access_label: nil, update_mask: nil) + # Pass arguments to `update_data_access_label` 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 data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. The data access label to update. + # + # The label's `name` field is used to identify the label to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description and definition + # fields are supported for update; an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new + # + # # Call the update_data_access_label method. + # result = client.update_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def update_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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.data_access_label&.name + header_params["data_access_label.name"] = request.data_access_label.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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :update_data_access_label, 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 data access label. When a label is deleted, new + # data that enters in the system will not receive the label, but the label + # will not be removed from old data that still refers to it. + # + # @overload delete_data_access_label(request, options = nil) + # Pass arguments to `delete_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::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_data_access_label(name: nil) + # Pass arguments to `delete_data_access_label` 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 ID of the data access label to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new + # + # # Call the delete_data_access_label method. + # result = client.delete_data_access_label request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :delete_data_access_label, 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 data access scope. + # Data access scope is a combination of allowed and denied labels attached + # to a permission group. If a scope has allowed labels A and B and denied + # labels C and D, then the group of people attached to the scope + # will have permissions to see all events labeled with A or B (or both) and + # not labeled with either C or D. + # + # @overload create_data_access_scope(request, options = nil) + # Pass arguments to `create_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) + # Pass arguments to `create_data_access_scope` 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 parent resource where this Data Access Scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. Data access scope to create. + # @param data_access_scope_id [::String] + # Required. The user provided scope id which will become the last part of the + # name of the scope resource. Needs to be compliant with + # https://google.aip.dev/122 + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new + # + # # Call the create_data_access_scope method. + # result = client.create_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def create_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :create_data_access_scope, 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 + + ## + # Retrieves an existing data access scope. + # + # @overload get_data_access_scope(request, options = nil) + # Pass arguments to `get_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::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_data_access_scope(name: nil) + # Pass arguments to `get_data_access_scope` 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 ID of the data access scope to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new + # + # # Call the get_data_access_scope method. + # result = client.get_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def get_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :get_data_access_scope, 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 all existing data access scopes for the customer. + # + # @overload list_data_access_scopes(request, options = nil) + # Pass arguments to `list_data_access_scopes` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_scopes` 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 parent resource where this data access scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access scopes to return. The service may return + # fewer than this value. If unspecified, at most 100 data access scopes will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessScopesRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessScope and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new + # + # # Call the list_data_access_scopes method. + # result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. + # p item + # end + # + def list_data_access_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest + + # 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_data_access_scopes.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::Chronicle::V1::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_data_access_scopes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_access_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :list_data_access_scopes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_scopes, 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 data access scope. + # + # @overload update_data_access_scope(request, options = nil) + # Pass arguments to `update_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::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_data_access_scope(data_access_scope: nil, update_mask: nil) + # Pass arguments to `update_data_access_scope` 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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. The data access scope to update. + # + # The scope's `name` field is used to identify the scope to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description, the allowed + # and denied labels list fields are supported for update; + # an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new + # + # # Call the update_data_access_scope method. + # result = client.update_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def update_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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.data_access_scope&.name + header_params["data_access_scope.name"] = request.data_access_scope.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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :update_data_access_scope, 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 data access scope. + # + # @overload delete_data_access_scope(request, options = nil) + # Pass arguments to `delete_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::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_data_access_scope(name: nil) + # Pass arguments to `delete_data_access_scope` 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 ID of the data access scope to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new + # + # # Call the delete_data_access_scope method. + # result = client.delete_data_access_scope request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :delete_data_access_scope, 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 + + ## + # Configuration class for the DataAccessControlService API. + # + # This class represents the configuration for DataAccessControlService, + # 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::Chronicle::V1::DataAccessControlService::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_data_access_label to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.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::Chronicle::V1::DataAccessControlService::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. + # * `: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 = "chronicle.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 DataAccessControlService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_label + ## + # RPC-specific configuration for `get_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_label + ## + # RPC-specific configuration for `list_data_access_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_labels + ## + # RPC-specific configuration for `update_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_label + ## + # RPC-specific configuration for `delete_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_label + ## + # RPC-specific configuration for `create_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_scope + ## + # RPC-specific configuration for `get_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_scope + ## + # RPC-specific configuration for `list_data_access_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_scopes + ## + # RPC-specific configuration for `update_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_scope + ## + # RPC-specific configuration for `delete_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_scope + + # @private + def initialize parent_rpcs = nil + create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label + @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config + get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label + @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config + list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels + @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config + update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label + @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config + delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label + @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config + create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope + @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config + get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope + @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config + list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes + @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config + update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope + @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config + delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope + @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb new file mode 100644 index 000000000000..2e86b999c1a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + module DataAccessControlService + # Credentials for the DataAccessControlService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb new file mode 100644 index 000000000000..f3ec957a19df --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb @@ -0,0 +1,94 @@ +# 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 Chronicle + module V1 + module DataAccessControlService + # Path helper methods for the DataAccessControlService API. + module Paths + ## + # Create a fully-qualified DataAccessLabel resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_label [String] + # + # @return [::String] + def data_access_label_path project:, location:, instance:, data_access_label: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessLabels/#{data_access_label}" + end + + ## + # Create a fully-qualified DataAccessScope resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_scope [String] + # + # @return [::String] + def data_access_scope_path project:, location:, instance:, data_access_scope: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb new file mode 100644 index 000000000000..e93f75e06d2d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb @@ -0,0 +1,53 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/data_access_control_service/credentials" +require "google/cloud/chronicle/v1/data_access_control_service/paths" +require "google/cloud/chronicle/v1/data_access_control_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/data_access_control_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + module DataAccessControlService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/data_access_control_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb new file mode 100644 index 000000000000..88d1752de0f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb @@ -0,0 +1,1318 @@ +# 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/chronicle/v1/data_access_control_pb" +require "google/cloud/chronicle/v1/data_access_control_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + module Rest + ## + # REST client for the DataAccessControlService service. + # + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_access_control_service_stub + + ## + # Configure the DataAccessControlService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataAccessControlService clients + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] + 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_data_access_label.timeout = 60.0 + + default_config.rpcs.get_data_access_label.timeout = 60.0 + default_config.rpcs.get_data_access_label.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_labels.timeout = 60.0 + default_config.rpcs.list_data_access_labels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_label.timeout = 60.0 + + default_config.rpcs.delete_data_access_label.timeout = 60.0 + + default_config.rpcs.create_data_access_scope.timeout = 60.0 + + default_config.rpcs.get_data_access_scope.timeout = 60.0 + default_config.rpcs.get_data_access_scope.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_scopes.timeout = 60.0 + default_config.rpcs.list_data_access_scopes.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_scope.timeout = 60.0 + + default_config.rpcs.delete_data_access_scope.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 + @data_access_control_service_stub.universe_domain + end + + ## + # Create a new DataAccessControlService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataAccessControlService 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 + + @data_access_control_service_stub = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_access_control_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_access_control_service_stub.logger + end + + # Service calls + + ## + # Creates a data access label. + # Data access labels are applied to incoming event data and selected in data + # access scopes (another resource), and only users with scopes containing the + # label can see data with that label. Currently, the data access label + # resource only includes custom labels, which are labels that correspond + # to UDM queries over event data. + # + # @overload create_data_access_label(request, options = nil) + # Pass arguments to `create_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) + # Pass arguments to `create_data_access_label` 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 parent resource where this Data Access Label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. Data access label to create. + # @param data_access_label_id [::String] + # Required. The ID to use for the data access label, which will become the + # label's display name and the final component of the label's resource name. + # The maximum number of characters should be 63. Regex pattern is as per AIP: + # https://google.aip.dev/122#resource-id-segments + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new + # + # # Call the create_data_access_label method. + # result = client.create_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def create_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.create_data_access_label 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 data access label. + # + # @overload get_data_access_label(request, options = nil) + # Pass arguments to `get_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::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_data_access_label(name: nil) + # Pass arguments to `get_data_access_label` 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 ID of the data access label to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new + # + # # Call the get_data_access_label method. + # result = client.get_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def get_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.get_data_access_label 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 all data access labels for the customer. + # + # @overload list_data_access_labels(request, options = nil) + # Pass arguments to `list_data_access_labels` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_labels` 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 parent resource where this data access label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access labels to return. The service may return + # fewer than this value. If unspecified, at most 100 data access labels will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessLabelsRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessLabel and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new + # + # # Call the list_data_access_labels method. + # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. + # p item + # end + # + def list_data_access_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest + + # 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_data_access_labels.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::Chronicle::V1::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_data_access_labels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_access_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.list_data_access_labels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, "data_access_labels", 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 data access label. + # + # @overload update_data_access_label(request, options = nil) + # Pass arguments to `update_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::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_data_access_label(data_access_label: nil, update_mask: nil) + # Pass arguments to `update_data_access_label` 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 data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. The data access label to update. + # + # The label's `name` field is used to identify the label to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description and definition + # fields are supported for update; an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new + # + # # Call the update_data_access_label method. + # result = client.update_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def update_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.update_data_access_label 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 data access label. When a label is deleted, new + # data that enters in the system will not receive the label, but the label + # will not be removed from old data that still refers to it. + # + # @overload delete_data_access_label(request, options = nil) + # Pass arguments to `delete_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::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_data_access_label(name: nil) + # Pass arguments to `delete_data_access_label` 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 ID of the data access label to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new + # + # # Call the delete_data_access_label method. + # result = client.delete_data_access_label request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest + + # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.delete_data_access_label 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 data access scope. + # Data access scope is a combination of allowed and denied labels attached + # to a permission group. If a scope has allowed labels A and B and denied + # labels C and D, then the group of people attached to the scope + # will have permissions to see all events labeled with A or B (or both) and + # not labeled with either C or D. + # + # @overload create_data_access_scope(request, options = nil) + # Pass arguments to `create_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) + # Pass arguments to `create_data_access_scope` 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 parent resource where this Data Access Scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. Data access scope to create. + # @param data_access_scope_id [::String] + # Required. The user provided scope id which will become the last part of the + # name of the scope resource. Needs to be compliant with + # https://google.aip.dev/122 + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new + # + # # Call the create_data_access_scope method. + # result = client.create_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def create_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.create_data_access_scope 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 + + ## + # Retrieves an existing data access scope. + # + # @overload get_data_access_scope(request, options = nil) + # Pass arguments to `get_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::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_data_access_scope(name: nil) + # Pass arguments to `get_data_access_scope` 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 ID of the data access scope to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new + # + # # Call the get_data_access_scope method. + # result = client.get_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def get_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.get_data_access_scope 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 all existing data access scopes for the customer. + # + # @overload list_data_access_scopes(request, options = nil) + # Pass arguments to `list_data_access_scopes` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_scopes` 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 parent resource where this data access scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access scopes to return. The service may return + # fewer than this value. If unspecified, at most 100 data access scopes will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessScopesRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessScope and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new + # + # # Call the list_data_access_scopes method. + # result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. + # p item + # end + # + def list_data_access_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest + + # 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_data_access_scopes.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::Chronicle::V1::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_data_access_scopes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_access_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.list_data_access_scopes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_scopes, "data_access_scopes", 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 data access scope. + # + # @overload update_data_access_scope(request, options = nil) + # Pass arguments to `update_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::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_data_access_scope(data_access_scope: nil, update_mask: nil) + # Pass arguments to `update_data_access_scope` 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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. The data access scope to update. + # + # The scope's `name` field is used to identify the scope to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description, the allowed + # and denied labels list fields are supported for update; + # an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new + # + # # Call the update_data_access_scope method. + # result = client.update_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def update_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.update_data_access_scope 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 data access scope. + # + # @overload delete_data_access_scope(request, options = nil) + # Pass arguments to `delete_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::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_data_access_scope(name: nil) + # Pass arguments to `delete_data_access_scope` 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 ID of the data access scope to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new + # + # # Call the delete_data_access_scope method. + # result = client.delete_data_access_scope request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest + + # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.delete_data_access_scope 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 + + ## + # Configuration class for the DataAccessControlService REST API. + # + # This class represents the configuration for DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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_data_access_label to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.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. + # * `: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 = "chronicle.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 DataAccessControlService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_label + ## + # RPC-specific configuration for `get_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_label + ## + # RPC-specific configuration for `list_data_access_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_labels + ## + # RPC-specific configuration for `update_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_label + ## + # RPC-specific configuration for `delete_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_label + ## + # RPC-specific configuration for `create_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_scope + ## + # RPC-specific configuration for `get_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_scope + ## + # RPC-specific configuration for `list_data_access_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_scopes + ## + # RPC-specific configuration for `update_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_scope + ## + # RPC-specific configuration for `delete_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_scope + + # @private + def initialize parent_rpcs = nil + create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label + @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config + get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label + @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config + list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels + @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config + update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label + @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config + delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label + @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config + create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope + @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config + get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope + @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config + list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes + @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config + update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope + @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config + delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope + @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb new file mode 100644 index 000000000000..c11b9f42da29 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb @@ -0,0 +1,695 @@ +# 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/chronicle/v1/data_access_control_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + module Rest + ## + # REST service stub for the DataAccessControlService 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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] + # 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::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # A result object deserialized from the server's reply + def create_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_label_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_data_access_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] + # 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::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # A result object deserialized from the server's reply + def get_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_label_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_data_access_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_labels REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] + # 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::Chronicle::V1::ListDataAccessLabelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse] + # A result object deserialized from the server's reply + def list_data_access_labels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_labels_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_data_access_labels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] + # 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::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # A result object deserialized from the server's reply + def update_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_label_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_data_access_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] + # 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_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_label_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_data_access_label", + 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 create_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] + # 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::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # A result object deserialized from the server's reply + def create_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_scope_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_data_access_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] + # 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::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # A result object deserialized from the server's reply + def get_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_scope_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_data_access_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scopes REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] + # 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::Chronicle::V1::ListDataAccessScopesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse] + # A result object deserialized from the server's reply + def list_data_access_scopes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_scopes_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_data_access_scopes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] + # 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::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # A result object deserialized from the server's reply + def update_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_scope_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_data_access_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] + # 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_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_scope_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_data_access_scope", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the create_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataAccessLabels", + body: "data_access_label", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_access_labels REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] + # 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_data_access_labels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataAccessLabels", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_access_label.name}", + body: "data_access_label", + matches: [ + ["data_access_label.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataAccessScopes", + body: "data_access_scope", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_access_scopes REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] + # 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_data_access_scopes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataAccessScopes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_access_scope.name}", + body: "data_access_scope", + matches: [ + ["data_access_scope.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb new file mode 100644 index 000000000000..0ef90feac2fc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb @@ -0,0 +1,76 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/data_access_control.proto for package 'Google.Cloud.Chronicle.V1' +# 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/chronicle/v1/data_access_control_pb' + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + # DataAccessControlService exposes resources and endpoints related to data + # access control. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.DataAccessControlService' + + # Creates a data access label. + # Data access labels are applied to incoming event data and selected in data + # access scopes (another resource), and only users with scopes containing the + # label can see data with that label. Currently, the data access label + # resource only includes custom labels, which are labels that correspond + # to UDM queries over event data. + rpc :CreateDataAccessLabel, ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel + # Gets a data access label. + rpc :GetDataAccessLabel, ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel + # Lists all data access labels for the customer. + rpc :ListDataAccessLabels, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse + # Updates a data access label. + rpc :UpdateDataAccessLabel, ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel + # Deletes a data access label. When a label is deleted, new + # data that enters in the system will not receive the label, but the label + # will not be removed from old data that still refers to it. + rpc :DeleteDataAccessLabel, ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::Google::Protobuf::Empty + # Creates a data access scope. + # Data access scope is a combination of allowed and denied labels attached + # to a permission group. If a scope has allowed labels A and B and denied + # labels C and D, then the group of people attached to the scope + # will have permissions to see all events labeled with A or B (or both) and + # not labeled with either C or D. + rpc :CreateDataAccessScope, ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope + # Retrieves an existing data access scope. + rpc :GetDataAccessScope, ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope + # Lists all existing data access scopes for the customer. + rpc :ListDataAccessScopes, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse + # Updates a data access scope. + rpc :UpdateDataAccessScope, ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope + # Deletes a data access scope. + rpc :DeleteDataAccessScope, ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb new file mode 100644 index 000000000000..7b754fbc9e2a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/data_table.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n*google/cloud/chronicle/v1/data_table.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xaf\x01\n\x16\x43reateDataTableRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/DataTable\x12=\n\ndata_table\x18\x02 \x01(\x0b\x32$.google.cloud.chronicle.v1.DataTableB\x03\xe0\x41\x02\x12\x1a\n\rdata_table_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"O\n\x13GetDataTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/DataTable\"\x8d\x01\n\x16UpdateDataTableRequest\x12=\n\ndata_table\x18\x01 \x01(\x0b\x32$.google.cloud.chronicle.v1.DataTableB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x9b\x01\n\x15ListDataTablesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/DataTable\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\"f\n\x16\x44\x65leteDataTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/DataTable\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"l\n\x16ListDataTablesResponse\x12\x39\n\x0b\x64\x61ta_tables\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.DataTable\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa0\x01\n\x19\x43reateDataTableRowRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12\x44\n\x0e\x64\x61ta_table_row\x18\x02 \x01(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRowB\x03\xe0\x41\x02\"\x97\x01\n\x19UpdateDataTableRowRequest\x12\x44\n\x0e\x64\x61ta_table_row\x18\x01 \x01(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRowB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb6\x01\n\x18ListDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"{\n\x19ListDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"U\n\x16GetDataTableRowRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%chronicle.googleapis.com/DataTableRow\"X\n\x19\x44\x65leteDataTableRowRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%chronicle.googleapis.com/DataTableRow\"\xac\x01\n\x1e\x42ulkCreateDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.CreateDataTableRowRequestB\x03\xe0\x41\x02\"c\n\x1f\x42ulkCreateDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xa6\x01\n\x1b\x42ulkGetDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12H\n\x08requests\x18\x02 \x03(\x0b\x32\x31.google.cloud.chronicle.v1.GetDataTableRowRequestB\x03\xe0\x41\x02\"`\n\x1c\x42ulkGetDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xad\x01\n\x1f\x42ulkReplaceDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.CreateDataTableRowRequestB\x03\xe0\x41\x02\"d\n BulkReplaceDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xac\x01\n\x1e\x42ulkUpdateDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.UpdateDataTableRowRequestB\x03\xe0\x41\x02\"c\n\x1f\x42ulkUpdateDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"b\n\x12\x44\x61taTableScopeInfo\x12L\n\x12\x64\x61ta_access_scopes\x18\x01 \x03(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\x99\x06\n\tDataTable\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0b\x63olumn_info\x18\x06 \x03(\x0b\x32..google.cloud.chronicle.v1.DataTableColumnInfoB\x03\xe0\x41\x05\x12\x1c\n\x0f\x64\x61ta_table_uuid\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05rules\x18\x08 \x03(\tB\x03\xe0\x41\x03\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x1d\n\x10row_time_to_live\x18\n \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15\x61pproximate_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12\x46\n\nscope_info\x18\x0c \x01(\x0b\x32-.google.cloud.chronicle.v1.DataTableScopeInfoB\x03\xe0\x41\x01\x12L\n\rupdate_source\x18\r \x01(\x0e\x32\x30.google.cloud.chronicle.v1.DataTableUpdateSourceB\x03\xe0\x41\x03\x12\x45\n\x1crow_time_to_live_update_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x95\x01\xea\x41\x91\x01\n\"chronicle.googleapis.com/DataTable\x12Tprojects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}*\ndataTables2\tdataTable\"\x81\x03\n\x0c\x44\x61taTableRow\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x06values\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1d\n\x10row_time_to_live\x18\x05 \x01(\tB\x03\xe0\x41\x01:\xbd\x01\xea\x41\xb9\x01\n%chronicle.googleapis.com/DataTableRow\x12sprojects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}*\rdataTableRows2\x0c\x64\x61taTableRow\"\xfa\x02\n\x13\x44\x61taTableColumnInfo\x12\x1c\n\x12mapped_column_path\x18\x03 \x01(\tH\x00\x12Y\n\x0b\x63olumn_type\x18\x04 \x01(\x0e\x32\x42.google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnTypeH\x00\x12\x19\n\x0c\x63olumn_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0foriginal_column\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nkey_column\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0frepeated_values\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"j\n\x13\x44\x61taTableColumnType\x12&\n\"DATA_TABLE_COLUMN_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\t\n\x05REGEX\x10\x02\x12\x08\n\x04\x43IDR\x10\x03\x12\n\n\x06NUMBER\x10\x04\x42\x0e\n\x0cpath_or_type\"m\n\"GetDataTableOperationErrorsRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1chronicle.googleapis.com/DataTableOperationErrors\"\xb8\x02\n\x18\x44\x61taTableOperationErrors\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12&\n\nrpc_errors\x18\x03 \x03(\x0b\x32\x12.google.rpc.Status:\xe0\x01\xea\x41\xdc\x01\n1chronicle.googleapis.com/DataTableOperationErrors\x12sprojects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}*\x18\x64\x61taTableOperationErrors2\x18\x64\x61taTableOperationErrors*a\n\x15\x44\x61taTableUpdateSource\x12(\n$DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x08\n\x04RULE\x10\x02\x12\n\n\x06SEARCH\x10\x03\x32\x89\x1c\n\x10\x44\x61taTableService\x12\xdc\x01\n\x0f\x43reateDataTable\x12\x31.google.cloud.chronicle.v1.CreateDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"p\xda\x41\x1fparent,data_table,data_table_id\x82\xd3\xe4\x93\x02H\":/v1/{parent=projects/*/locations/*/instances/*}/dataTables:\ndata_table\x12\xc2\x01\n\x0eListDataTables\x12\x30.google.cloud.chronicle.v1.ListDataTablesRequest\x1a\x31.google.cloud.chronicle.v1.ListDataTablesResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/dataTables\x12\xaf\x01\n\x0cGetDataTable\x12..google.cloud.chronicle.v1.GetDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/dataTables/*}\x12\xde\x01\n\x0fUpdateDataTable\x12\x31.google.cloud.chronicle.v1.UpdateDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"r\xda\x41\x16\x64\x61ta_table,update_mask\x82\xd3\xe4\x93\x02S2E/v1/{data_table.name=projects/*/locations/*/instances/*/dataTables/*}:\ndata_table\x12\xad\x01\n\x0f\x44\x65leteDataTable\x12\x31.google.cloud.chronicle.v1.DeleteDataTableRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\nname,force\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/dataTables/*}\x12\xef\x01\n\x12\x43reateDataTableRow\x12\x34.google.cloud.chronicle.v1.CreateDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"z\xda\x41\x15parent,data_table_row\x82\xd3\xe4\x93\x02\\\"J/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:\x0e\x64\x61ta_table_row\x12\x84\x02\n\x12UpdateDataTableRow\x12\x34.google.cloud.chronicle.v1.UpdateDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"\x8e\x01\xda\x41\x1a\x64\x61ta_table_row,update_mask\x82\xd3\xe4\x93\x02k2Y/v1/{data_table_row.name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}:\x0e\x64\x61ta_table_row\x12\xdb\x01\n\x11ListDataTableRows\x12\x33.google.cloud.chronicle.v1.ListDataTableRowsRequest\x1a\x34.google.cloud.chronicle.v1.ListDataTableRowsResponse\"[\xda\x41\x06parent\x82\xd3\xe4\x93\x02L\x12J/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows\x12\xc8\x01\n\x0fGetDataTableRow\x12\x31.google.cloud.chronicle.v1.GetDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}\x12\xbd\x01\n\x12\x44\x65leteDataTableRow\x12\x34.google.cloud.chronicle.v1.DeleteDataTableRowRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*J/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}\x12\x84\x02\n\x17\x42ulkCreateDataTableRows\x12\x39.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest\x1a:.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse\"r\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02Z\"U/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkCreate:\x01*\x12\xf8\x01\n\x14\x42ulkGetDataTableRows\x12\x36.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest\x1a\x37.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse\"o\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02W\"R/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkGet:\x01*\x12\x88\x02\n\x18\x42ulkReplaceDataTableRows\x12:.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest\x1a;.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse\"s\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02[\"V/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkReplace:\x01*\x12\x84\x02\n\x17\x42ulkUpdateDataTableRows\x12\x39.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest\x1a:.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse\"r\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02Z\"U/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkUpdate:\x01*\x12\xea\x01\n\x1bGetDataTableOperationErrors\x12=.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest\x1a\x33.google.cloud.chronicle.v1.DataTableOperationErrors\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/instances/*/dataTableOperationErrors/*}\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xc5\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0e\x44\x61taTableProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + CreateDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataTableRequest").msgclass + GetDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableRequest").msgclass + UpdateDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataTableRequest").msgclass + ListDataTablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTablesRequest").msgclass + DeleteDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataTableRequest").msgclass + ListDataTablesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTablesResponse").msgclass + CreateDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataTableRowRequest").msgclass + UpdateDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataTableRowRequest").msgclass + ListDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTableRowsRequest").msgclass + ListDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTableRowsResponse").msgclass + GetDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableRowRequest").msgclass + DeleteDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataTableRowRequest").msgclass + BulkCreateDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest").msgclass + BulkCreateDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse").msgclass + BulkGetDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkGetDataTableRowsRequest").msgclass + BulkGetDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkGetDataTableRowsResponse").msgclass + BulkReplaceDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest").msgclass + BulkReplaceDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse").msgclass + BulkUpdateDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest").msgclass + BulkUpdateDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse").msgclass + DataTableScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableScopeInfo").msgclass + DataTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTable").msgclass + DataTableRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableRow").msgclass + DataTableColumnInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableColumnInfo").msgclass + DataTableColumnInfo::DataTableColumnType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType").enummodule + GetDataTableOperationErrorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest").msgclass + DataTableOperationErrors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableOperationErrors").msgclass + DataTableUpdateSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableUpdateSource").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb new file mode 100644 index 000000000000..db30ac0f8aa8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/data_table_service/credentials" +require "google/cloud/chronicle/v1/data_table_service/paths" +require "google/cloud/chronicle/v1/data_table_service/client" +require "google/cloud/chronicle/v1/data_table_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # DataTableManager provides an interface for managing data tables. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/data_table_service" + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/data_table_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + module DataTableService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_table_service", "helpers.rb" +require "google/cloud/chronicle/v1/data_table_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb new file mode 100644 index 000000000000..9575eeb78010 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb @@ -0,0 +1,1915 @@ +# 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/chronicle/v1/data_table_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DataTableService + ## + # Client for the DataTableService service. + # + # DataTableManager provides an interface for managing data tables. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_table_service_stub + + ## + # Configure the DataTableService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DataTableService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTableService clients + # ::Google::Cloud::Chronicle::V1::DataTableService::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", "Chronicle", "V1"] + 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_data_table.timeout = 600.0 + + default_config.rpcs.list_data_tables.timeout = 600.0 + default_config.rpcs.list_data_tables.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_table.timeout = 600.0 + default_config.rpcs.get_data_table.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_table.timeout = 600.0 + + default_config.rpcs.delete_data_table.timeout = 600.0 + + default_config.rpcs.create_data_table_row.timeout = 600.0 + + default_config.rpcs.update_data_table_row.timeout = 600.0 + + default_config.rpcs.list_data_table_rows.timeout = 600.0 + default_config.rpcs.list_data_table_rows.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_table_row.timeout = 600.0 + default_config.rpcs.get_data_table_row.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_data_table_row.timeout = 600.0 + + default_config.rpcs.bulk_create_data_table_rows.timeout = 600.0 + + default_config.rpcs.bulk_get_data_table_rows.timeout = 600.0 + default_config.rpcs.bulk_get_data_table_rows.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.bulk_replace_data_table_rows.timeout = 600.0 + + default_config.rpcs.bulk_update_data_table_rows.timeout = 600.0 + + default_config.rpcs.get_data_table_operation_errors.timeout = 600.0 + default_config.rpcs.get_data_table_operation_errors.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTableService 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::Chronicle::V1::DataTableService::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 + @data_table_service_stub.universe_domain + end + + ## + # Create a new DataTableService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTableService 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/chronicle/v1/data_table_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 + + @data_table_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::DataTableService::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 + ) + + @data_table_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_table_service_stub.logger + end + + # Service calls + + ## + # Create a new data table. + # + # @overload create_data_table(request, options = nil) + # Pass arguments to `create_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::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_data_table(parent: nil, data_table: nil, data_table_id: nil) + # Pass arguments to `create_data_table` 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 parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] + # Required. The data table being created. + # @param data_table_id [::String] + # Required. The ID to use for the data table. This is also the display name + # for the data table. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Must be unique and has length < 256. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new + # + # # Call the create_data_table method. + # result = client.create_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def create_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :create_data_table, 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 + + ## + # List data tables. + # + # @overload list_data_tables(request, options = nil) + # Pass arguments to `list_data_tables` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataTablesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::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_data_tables(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_data_tables` 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 parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param page_size [::Integer] + # Optional. The maximum number of data tables to return. The service may + # return fewer than this value. If unspecified, at most 100 data tables will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataTables` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to + # `ListDataTables` must match the call that provided the page + # token. + # @param order_by [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new + # + # # Call the list_data_tables method. + # result = client.list_data_tables 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::Chronicle::V1::DataTable. + # p item + # end + # + def list_data_tables request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTablesRequest + + # 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_data_tables.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::Chronicle::V1::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_data_tables.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_tables.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :list_data_tables, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_table_service_stub, :list_data_tables, 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 + + ## + # Get data table info. + # + # @overload get_data_table(request, options = nil) + # Pass arguments to `get_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::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_data_table(name: nil) + # Pass arguments to `get_data_table` 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 data table to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new + # + # # Call the get_data_table method. + # result = client.get_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def get_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :get_data_table, 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 + + ## + # Update data table. + # + # @overload update_data_table(request, options = nil) + # Pass arguments to `update_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::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_data_table(data_table: nil, update_mask: nil) + # Pass arguments to `update_data_table` 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 data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] + # Required. This field is used to identify the datatable to update. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of metadata fields to update. Currently data tables only + # support updating the `description`, `row_time_to_live` and `scope_info` + # fields. When no field mask is supplied, all non-empty fields will be + # updated. A field mask of "*" will update all fields, whether empty or not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new + # + # # Call the update_data_table method. + # result = client.update_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def update_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest + + # 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_data_table.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::Chronicle::V1::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.data_table&.name + header_params["data_table.name"] = request.data_table.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_data_table.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :update_data_table, 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 + + ## + # Delete data table. + # + # @overload delete_data_table(request, options = nil) + # Pass arguments to `delete_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::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_data_table(name: nil, force: nil) + # Pass arguments to `delete_data_table` 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 data table to delete. + # Format + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + # @param force [::Boolean] + # Optional. If set to true, any rows under this data table will also be + # deleted. (Otherwise, the request will only work if the data table has no + # rows.) + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new + # + # # Call the delete_data_table method. + # result = client.delete_data_table request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :delete_data_table, 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 + + ## + # Create a new data table row. + # + # @overload create_data_table_row(request, options = nil) + # Pass arguments to `create_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::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_data_table_row(parent: nil, data_table_row: nil) + # Pass arguments to `create_data_table_row` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] + # Required. The data table row to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new + # + # # Call the create_data_table_row method. + # result = client.create_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def create_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :create_data_table_row, 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 + + ## + # Update data table row + # + # @overload update_data_table_row(request, options = nil) + # Pass arguments to `update_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::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_data_table_row(data_table_row: nil, update_mask: nil) + # Pass arguments to `update_data_table_row` 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 data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] + # Required. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. Currently data table rows only + # support updating the `values` field. When no field mask is supplied, all + # non-empty fields will be updated. A field mask of "*" will update all + # fields, whether empty or not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new + # + # # Call the update_data_table_row method. + # result = client.update_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def update_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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.data_table_row&.name + header_params["data_table_row.name"] = request.data_table_row.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_data_table_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :update_data_table_row, 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 + + ## + # List data table rows. + # + # @overload list_data_table_rows(request, options = nil) + # Pass arguments to `list_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::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_data_table_rows(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_data_table_rows` 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 id of the data table. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @param page_size [::Integer] + # Optional. The maximum number of data table rows to return. The service may + # return fewer than this value. If unspecified, at most 100 data table rows + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataTableRows` call. + # @param order_by [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + # @param filter [::String] + # Optional. Filter facilitating search over data table rows. This filter + # performs a case-insensitive substring match on the row values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new + # + # # Call the list_data_table_rows method. + # result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. + # p item + # end + # + def list_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest + + # 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_data_table_rows.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::Chronicle::V1::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_data_table_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :list_data_table_rows, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_table_service_stub, :list_data_table_rows, 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 + + ## + # Get data table row + # + # @overload get_data_table_row(request, options = nil) + # Pass arguments to `get_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::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_data_table_row(name: nil) + # Pass arguments to `get_data_table_row` 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 data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new + # + # # Call the get_data_table_row method. + # result = client.get_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def get_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :get_data_table_row, 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 + + ## + # Delete data table row. + # + # @overload delete_data_table_row(request, options = nil) + # Pass arguments to `delete_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::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_data_table_row(name: nil) + # Pass arguments to `delete_data_table_row` 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 data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new + # + # # Call the delete_data_table_row method. + # result = client.delete_data_table_row request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :delete_data_table_row, 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 + + ## + # Create data table rows in bulk. + # + # @overload bulk_create_data_table_rows(request, options = nil) + # Pass arguments to `bulk_create_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::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 bulk_create_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_create_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] + # Required. Data table rows to create. A maximum of 1000 rows (for sync + # requests) or 2000 rows (for async requests) can be created in a single + # request. Total size of the rows should be less than 4MB. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new + # + # # Call the bulk_create_data_table_rows method. + # result = client.bulk_create_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. + # p result + # + def bulk_create_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest + + # 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.bulk_create_data_table_rows.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::Chronicle::V1::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.bulk_create_data_table_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_create_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :bulk_create_data_table_rows, 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 + + ## + # Get data table rows in bulk. + # + # @overload bulk_get_data_table_rows(request, options = nil) + # Pass arguments to `bulk_get_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::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 bulk_get_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_get_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Hash>] + # Required. Data table rows to get. At max 1,000 rows can be there in a + # request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new + # + # # Call the bulk_get_data_table_rows method. + # result = client.bulk_get_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. + # p result + # + def bulk_get_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest + + # 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.bulk_get_data_table_rows.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::Chronicle::V1::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.bulk_get_data_table_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_get_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :bulk_get_data_table_rows, 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 + + ## + # Replace all existing data table rows with new data table rows. + # + # @overload bulk_replace_data_table_rows(request, options = nil) + # Pass arguments to `bulk_replace_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::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 bulk_replace_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_replace_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] + # Required. Data table rows to replace the existing data table rows. A + # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + # can be replaced in a single request. Total size of the rows should be less + # than 4MB. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new + # + # # Call the bulk_replace_data_table_rows method. + # result = client.bulk_replace_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. + # p result + # + def bulk_replace_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest + + # 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.bulk_replace_data_table_rows.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::Chronicle::V1::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.bulk_replace_data_table_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_replace_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :bulk_replace_data_table_rows, 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 + + ## + # Update data table rows in bulk. + # + # @overload bulk_update_data_table_rows(request, options = nil) + # Pass arguments to `bulk_update_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::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 bulk_update_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_update_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Hash>] + # Required. Data table rows to update. At max 1,000 rows (or rows with size + # less than 2MB) can be there in a request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new + # + # # Call the bulk_update_data_table_rows method. + # result = client.bulk_update_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. + # p result + # + def bulk_update_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest + + # 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.bulk_update_data_table_rows.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::Chronicle::V1::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.bulk_update_data_table_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_update_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :bulk_update_data_table_rows, 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 + + ## + # Get the error for a data table operation. + # + # @overload get_data_table_operation_errors(request, options = nil) + # Pass arguments to `get_data_table_operation_errors` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::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_data_table_operation_errors(name: nil) + # Pass arguments to `get_data_table_operation_errors` 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 data table operation errors. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new + # + # # Call the get_data_table_operation_errors method. + # result = client.get_data_table_operation_errors request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. + # p result + # + def get_data_table_operation_errors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest + + # 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_data_table_operation_errors.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::Chronicle::V1::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_data_table_operation_errors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_table_operation_errors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.call_rpc :get_data_table_operation_errors, 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 + + ## + # Configuration class for the DataTableService API. + # + # This class represents the configuration for DataTableService, + # 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::Chronicle::V1::DataTableService::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_data_table to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DataTableService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_table.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_table.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::Chronicle::V1::DataTableService::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. + # * `: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 = "chronicle.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 DataTableService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_table + ## + # RPC-specific configuration for `list_data_tables` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_tables + ## + # RPC-specific configuration for `get_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table + ## + # RPC-specific configuration for `update_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_table + ## + # RPC-specific configuration for `delete_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_table + ## + # RPC-specific configuration for `create_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_table_row + ## + # RPC-specific configuration for `update_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_table_row + ## + # RPC-specific configuration for `list_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_table_rows + ## + # RPC-specific configuration for `get_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table_row + ## + # RPC-specific configuration for `delete_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_table_row + ## + # RPC-specific configuration for `bulk_create_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_create_data_table_rows + ## + # RPC-specific configuration for `bulk_get_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_get_data_table_rows + ## + # RPC-specific configuration for `bulk_replace_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_replace_data_table_rows + ## + # RPC-specific configuration for `bulk_update_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_update_data_table_rows + ## + # RPC-specific configuration for `get_data_table_operation_errors` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table_operation_errors + + # @private + def initialize parent_rpcs = nil + create_data_table_config = parent_rpcs.create_data_table if parent_rpcs.respond_to? :create_data_table + @create_data_table = ::Gapic::Config::Method.new create_data_table_config + list_data_tables_config = parent_rpcs.list_data_tables if parent_rpcs.respond_to? :list_data_tables + @list_data_tables = ::Gapic::Config::Method.new list_data_tables_config + get_data_table_config = parent_rpcs.get_data_table if parent_rpcs.respond_to? :get_data_table + @get_data_table = ::Gapic::Config::Method.new get_data_table_config + update_data_table_config = parent_rpcs.update_data_table if parent_rpcs.respond_to? :update_data_table + @update_data_table = ::Gapic::Config::Method.new update_data_table_config + delete_data_table_config = parent_rpcs.delete_data_table if parent_rpcs.respond_to? :delete_data_table + @delete_data_table = ::Gapic::Config::Method.new delete_data_table_config + create_data_table_row_config = parent_rpcs.create_data_table_row if parent_rpcs.respond_to? :create_data_table_row + @create_data_table_row = ::Gapic::Config::Method.new create_data_table_row_config + update_data_table_row_config = parent_rpcs.update_data_table_row if parent_rpcs.respond_to? :update_data_table_row + @update_data_table_row = ::Gapic::Config::Method.new update_data_table_row_config + list_data_table_rows_config = parent_rpcs.list_data_table_rows if parent_rpcs.respond_to? :list_data_table_rows + @list_data_table_rows = ::Gapic::Config::Method.new list_data_table_rows_config + get_data_table_row_config = parent_rpcs.get_data_table_row if parent_rpcs.respond_to? :get_data_table_row + @get_data_table_row = ::Gapic::Config::Method.new get_data_table_row_config + delete_data_table_row_config = parent_rpcs.delete_data_table_row if parent_rpcs.respond_to? :delete_data_table_row + @delete_data_table_row = ::Gapic::Config::Method.new delete_data_table_row_config + bulk_create_data_table_rows_config = parent_rpcs.bulk_create_data_table_rows if parent_rpcs.respond_to? :bulk_create_data_table_rows + @bulk_create_data_table_rows = ::Gapic::Config::Method.new bulk_create_data_table_rows_config + bulk_get_data_table_rows_config = parent_rpcs.bulk_get_data_table_rows if parent_rpcs.respond_to? :bulk_get_data_table_rows + @bulk_get_data_table_rows = ::Gapic::Config::Method.new bulk_get_data_table_rows_config + bulk_replace_data_table_rows_config = parent_rpcs.bulk_replace_data_table_rows if parent_rpcs.respond_to? :bulk_replace_data_table_rows + @bulk_replace_data_table_rows = ::Gapic::Config::Method.new bulk_replace_data_table_rows_config + bulk_update_data_table_rows_config = parent_rpcs.bulk_update_data_table_rows if parent_rpcs.respond_to? :bulk_update_data_table_rows + @bulk_update_data_table_rows = ::Gapic::Config::Method.new bulk_update_data_table_rows_config + get_data_table_operation_errors_config = parent_rpcs.get_data_table_operation_errors if parent_rpcs.respond_to? :get_data_table_operation_errors + @get_data_table_operation_errors = ::Gapic::Config::Method.new get_data_table_operation_errors_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb new file mode 100644 index 000000000000..1ed772b14e1b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module DataTableService + # Credentials for the DataTableService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb new file mode 100644 index 000000000000..9d9e63d2bcae --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb @@ -0,0 +1,138 @@ +# 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 Chronicle + module V1 + module DataTableService + # Path helper methods for the DataTableService API. + module Paths + ## + # Create a fully-qualified DataAccessScope resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_scope [String] + # + # @return [::String] + def data_access_scope_path project:, location:, instance:, data_access_scope: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" + end + + ## + # Create a fully-qualified DataTable resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_table [String] + # + # @return [::String] + def data_table_path project:, location:, instance:, data_table: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataTables/#{data_table}" + end + + ## + # Create a fully-qualified DataTableOperationErrors resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_table_operation_errors [String] + # + # @return [::String] + def data_table_operation_errors_path project:, location:, instance:, data_table_operation_errors: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataTableOperationErrors/#{data_table_operation_errors}" + end + + ## + # Create a fully-qualified DataTableRow resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_table [String] + # @param data_table_row [String] + # + # @return [::String] + def data_table_row_path project:, location:, instance:, data_table:, data_table_row: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + raise ::ArgumentError, "data_table cannot contain /" if data_table.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataTables/#{data_table}/dataTableRows/#{data_table_row}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb new file mode 100644 index 000000000000..9f355abee4eb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/data_table_service/credentials" +require "google/cloud/chronicle/v1/data_table_service/paths" +require "google/cloud/chronicle/v1/data_table_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # DataTableManager provides an interface for managing data tables. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/data_table_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + module DataTableService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/data_table_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb new file mode 100644 index 000000000000..30ed96d59257 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb @@ -0,0 +1,1767 @@ +# 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/chronicle/v1/data_table_pb" +require "google/cloud/chronicle/v1/data_table_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module DataTableService + module Rest + ## + # REST client for the DataTableService service. + # + # DataTableManager provides an interface for managing data tables. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_table_service_stub + + ## + # Configure the DataTableService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTableService clients + # ::Google::Cloud::Chronicle::V1::DataTableService::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", "Chronicle", "V1"] + 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_data_table.timeout = 600.0 + + default_config.rpcs.list_data_tables.timeout = 600.0 + default_config.rpcs.list_data_tables.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_table.timeout = 600.0 + default_config.rpcs.get_data_table.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_table.timeout = 600.0 + + default_config.rpcs.delete_data_table.timeout = 600.0 + + default_config.rpcs.create_data_table_row.timeout = 600.0 + + default_config.rpcs.update_data_table_row.timeout = 600.0 + + default_config.rpcs.list_data_table_rows.timeout = 600.0 + default_config.rpcs.list_data_table_rows.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_table_row.timeout = 600.0 + default_config.rpcs.get_data_table_row.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_data_table_row.timeout = 600.0 + + default_config.rpcs.bulk_create_data_table_rows.timeout = 600.0 + + default_config.rpcs.bulk_get_data_table_rows.timeout = 600.0 + default_config.rpcs.bulk_get_data_table_rows.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.bulk_replace_data_table_rows.timeout = 600.0 + + default_config.rpcs.bulk_update_data_table_rows.timeout = 600.0 + + default_config.rpcs.get_data_table_operation_errors.timeout = 600.0 + default_config.rpcs.get_data_table_operation_errors.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTableService 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::Chronicle::V1::DataTableService::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 + @data_table_service_stub.universe_domain + end + + ## + # Create a new DataTableService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTableService 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 + + @data_table_service_stub = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_table_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_table_service_stub.logger + end + + # Service calls + + ## + # Create a new data table. + # + # @overload create_data_table(request, options = nil) + # Pass arguments to `create_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::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_data_table(parent: nil, data_table: nil, data_table_id: nil) + # Pass arguments to `create_data_table` 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 parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] + # Required. The data table being created. + # @param data_table_id [::String] + # Required. The ID to use for the data table. This is also the display name + # for the data table. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Must be unique and has length < 256. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new + # + # # Call the create_data_table method. + # result = client.create_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def create_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.create_data_table 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 + + ## + # List data tables. + # + # @overload list_data_tables(request, options = nil) + # Pass arguments to `list_data_tables` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataTablesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::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_data_tables(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_data_tables` 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 parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param page_size [::Integer] + # Optional. The maximum number of data tables to return. The service may + # return fewer than this value. If unspecified, at most 100 data tables will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataTables` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to + # `ListDataTables` must match the call that provided the page + # token. + # @param order_by [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new + # + # # Call the list_data_tables method. + # result = client.list_data_tables 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::Chronicle::V1::DataTable. + # p item + # end + # + def list_data_tables request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTablesRequest + + # 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_data_tables.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::Chronicle::V1::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_data_tables.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_tables.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.list_data_tables request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_table_service_stub, :list_data_tables, "data_tables", 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 + + ## + # Get data table info. + # + # @overload get_data_table(request, options = nil) + # Pass arguments to `get_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::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_data_table(name: nil) + # Pass arguments to `get_data_table` 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 data table to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new + # + # # Call the get_data_table method. + # result = client.get_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def get_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.get_data_table 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 + + ## + # Update data table. + # + # @overload update_data_table(request, options = nil) + # Pass arguments to `update_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::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_data_table(data_table: nil, update_mask: nil) + # Pass arguments to `update_data_table` 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 data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] + # Required. This field is used to identify the datatable to update. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of metadata fields to update. Currently data tables only + # support updating the `description`, `row_time_to_live` and `scope_info` + # fields. When no field mask is supplied, all non-empty fields will be + # updated. A field mask of "*" will update all fields, whether empty or not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new + # + # # Call the update_data_table method. + # result = client.update_data_table request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + # p result + # + def update_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.update_data_table 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 + + ## + # Delete data table. + # + # @overload delete_data_table(request, options = nil) + # Pass arguments to `delete_data_table` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataTableRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::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_data_table(name: nil, force: nil) + # Pass arguments to `delete_data_table` 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 data table to delete. + # Format + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + # @param force [::Boolean] + # Optional. If set to true, any rows under this data table will also be + # deleted. (Otherwise, the request will only work if the data table has no + # rows.) + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new + # + # # Call the delete_data_table method. + # result = client.delete_data_table request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_table request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest + + # 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_data_table.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::Chronicle::V1::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_data_table.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_table.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.delete_data_table 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 + + ## + # Create a new data table row. + # + # @overload create_data_table_row(request, options = nil) + # Pass arguments to `create_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::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_data_table_row(parent: nil, data_table_row: nil) + # Pass arguments to `create_data_table_row` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] + # Required. The data table row to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new + # + # # Call the create_data_table_row method. + # result = client.create_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def create_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.create_data_table_row 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 + + ## + # Update data table row + # + # @overload update_data_table_row(request, options = nil) + # Pass arguments to `update_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::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_data_table_row(data_table_row: nil, update_mask: nil) + # Pass arguments to `update_data_table_row` 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 data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] + # Required. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. Currently data table rows only + # support updating the `values` field. When no field mask is supplied, all + # non-empty fields will be updated. A field mask of "*" will update all + # fields, whether empty or not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new + # + # # Call the update_data_table_row method. + # result = client.update_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def update_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.update_data_table_row 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 + + ## + # List data table rows. + # + # @overload list_data_table_rows(request, options = nil) + # Pass arguments to `list_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::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_data_table_rows(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_data_table_rows` 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 id of the data table. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @param page_size [::Integer] + # Optional. The maximum number of data table rows to return. The service may + # return fewer than this value. If unspecified, at most 100 data table rows + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDataTableRows` call. + # @param order_by [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + # @param filter [::String] + # Optional. Filter facilitating search over data table rows. This filter + # performs a case-insensitive substring match on the row values. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new + # + # # Call the list_data_table_rows method. + # result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. + # p item + # end + # + def list_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest + + # 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_data_table_rows.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::Chronicle::V1::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_data_table_rows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.list_data_table_rows request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_table_service_stub, :list_data_table_rows, "data_table_rows", 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 + + ## + # Get data table row + # + # @overload get_data_table_row(request, options = nil) + # Pass arguments to `get_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::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_data_table_row(name: nil) + # Pass arguments to `get_data_table_row` 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 data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new + # + # # Call the get_data_table_row method. + # result = client.get_data_table_row request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + # p result + # + def get_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.get_data_table_row 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 + + ## + # Delete data table row. + # + # @overload delete_data_table_row(request, options = nil) + # Pass arguments to `delete_data_table_row` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::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_data_table_row(name: nil) + # Pass arguments to `delete_data_table_row` 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 data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new + # + # # Call the delete_data_table_row method. + # result = client.delete_data_table_row request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_table_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest + + # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_table_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.delete_data_table_row 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 + + ## + # Create data table rows in bulk. + # + # @overload bulk_create_data_table_rows(request, options = nil) + # Pass arguments to `bulk_create_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::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 bulk_create_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_create_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] + # Required. Data table rows to create. A maximum of 1000 rows (for sync + # requests) or 2000 rows (for async requests) can be created in a single + # request. Total size of the rows should be less than 4MB. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new + # + # # Call the bulk_create_data_table_rows method. + # result = client.bulk_create_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. + # p result + # + def bulk_create_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest + + # 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.bulk_create_data_table_rows.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::Chronicle::V1::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.bulk_create_data_table_rows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_create_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.bulk_create_data_table_rows 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 + + ## + # Get data table rows in bulk. + # + # @overload bulk_get_data_table_rows(request, options = nil) + # Pass arguments to `bulk_get_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::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 bulk_get_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_get_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Hash>] + # Required. Data table rows to get. At max 1,000 rows can be there in a + # request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new + # + # # Call the bulk_get_data_table_rows method. + # result = client.bulk_get_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. + # p result + # + def bulk_get_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest + + # 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.bulk_get_data_table_rows.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::Chronicle::V1::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.bulk_get_data_table_rows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_get_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.bulk_get_data_table_rows 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 + + ## + # Replace all existing data table rows with new data table rows. + # + # @overload bulk_replace_data_table_rows(request, options = nil) + # Pass arguments to `bulk_replace_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::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 bulk_replace_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_replace_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] + # Required. Data table rows to replace the existing data table rows. A + # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + # can be replaced in a single request. Total size of the rows should be less + # than 4MB. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new + # + # # Call the bulk_replace_data_table_rows method. + # result = client.bulk_replace_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. + # p result + # + def bulk_replace_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest + + # 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.bulk_replace_data_table_rows.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::Chronicle::V1::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.bulk_replace_data_table_rows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_replace_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.bulk_replace_data_table_rows 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 + + ## + # Update data table rows in bulk. + # + # @overload bulk_update_data_table_rows(request, options = nil) + # Pass arguments to `bulk_update_data_table_rows` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::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 bulk_update_data_table_rows(parent: nil, requests: nil) + # Pass arguments to `bulk_update_data_table_rows` 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 id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @param requests [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Hash>] + # Required. Data table rows to update. At max 1,000 rows (or rows with size + # less than 2MB) can be there in a request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new + # + # # Call the bulk_update_data_table_rows method. + # result = client.bulk_update_data_table_rows request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. + # p result + # + def bulk_update_data_table_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest + + # 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.bulk_update_data_table_rows.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::Chronicle::V1::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.bulk_update_data_table_rows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_update_data_table_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.bulk_update_data_table_rows 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 + + ## + # Get the error for a data table operation. + # + # @overload get_data_table_operation_errors(request, options = nil) + # Pass arguments to `get_data_table_operation_errors` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::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_data_table_operation_errors(name: nil) + # Pass arguments to `get_data_table_operation_errors` 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 data table operation errors. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new + # + # # Call the get_data_table_operation_errors method. + # result = client.get_data_table_operation_errors request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. + # p result + # + def get_data_table_operation_errors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest + + # 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_data_table_operation_errors.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::Chronicle::V1::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_data_table_operation_errors.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_table_operation_errors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_table_service_stub.get_data_table_operation_errors 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 + + ## + # Configuration class for the DataTableService REST API. + # + # This class represents the configuration for DataTableService 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::Chronicle::V1::DataTableService::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_data_table to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_table.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_table.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. + # * `: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 = "chronicle.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 DataTableService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_table + ## + # RPC-specific configuration for `list_data_tables` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_tables + ## + # RPC-specific configuration for `get_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table + ## + # RPC-specific configuration for `update_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_table + ## + # RPC-specific configuration for `delete_data_table` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_table + ## + # RPC-specific configuration for `create_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_table_row + ## + # RPC-specific configuration for `update_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_table_row + ## + # RPC-specific configuration for `list_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_table_rows + ## + # RPC-specific configuration for `get_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table_row + ## + # RPC-specific configuration for `delete_data_table_row` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_table_row + ## + # RPC-specific configuration for `bulk_create_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_create_data_table_rows + ## + # RPC-specific configuration for `bulk_get_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_get_data_table_rows + ## + # RPC-specific configuration for `bulk_replace_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_replace_data_table_rows + ## + # RPC-specific configuration for `bulk_update_data_table_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_update_data_table_rows + ## + # RPC-specific configuration for `get_data_table_operation_errors` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_table_operation_errors + + # @private + def initialize parent_rpcs = nil + create_data_table_config = parent_rpcs.create_data_table if parent_rpcs.respond_to? :create_data_table + @create_data_table = ::Gapic::Config::Method.new create_data_table_config + list_data_tables_config = parent_rpcs.list_data_tables if parent_rpcs.respond_to? :list_data_tables + @list_data_tables = ::Gapic::Config::Method.new list_data_tables_config + get_data_table_config = parent_rpcs.get_data_table if parent_rpcs.respond_to? :get_data_table + @get_data_table = ::Gapic::Config::Method.new get_data_table_config + update_data_table_config = parent_rpcs.update_data_table if parent_rpcs.respond_to? :update_data_table + @update_data_table = ::Gapic::Config::Method.new update_data_table_config + delete_data_table_config = parent_rpcs.delete_data_table if parent_rpcs.respond_to? :delete_data_table + @delete_data_table = ::Gapic::Config::Method.new delete_data_table_config + create_data_table_row_config = parent_rpcs.create_data_table_row if parent_rpcs.respond_to? :create_data_table_row + @create_data_table_row = ::Gapic::Config::Method.new create_data_table_row_config + update_data_table_row_config = parent_rpcs.update_data_table_row if parent_rpcs.respond_to? :update_data_table_row + @update_data_table_row = ::Gapic::Config::Method.new update_data_table_row_config + list_data_table_rows_config = parent_rpcs.list_data_table_rows if parent_rpcs.respond_to? :list_data_table_rows + @list_data_table_rows = ::Gapic::Config::Method.new list_data_table_rows_config + get_data_table_row_config = parent_rpcs.get_data_table_row if parent_rpcs.respond_to? :get_data_table_row + @get_data_table_row = ::Gapic::Config::Method.new get_data_table_row_config + delete_data_table_row_config = parent_rpcs.delete_data_table_row if parent_rpcs.respond_to? :delete_data_table_row + @delete_data_table_row = ::Gapic::Config::Method.new delete_data_table_row_config + bulk_create_data_table_rows_config = parent_rpcs.bulk_create_data_table_rows if parent_rpcs.respond_to? :bulk_create_data_table_rows + @bulk_create_data_table_rows = ::Gapic::Config::Method.new bulk_create_data_table_rows_config + bulk_get_data_table_rows_config = parent_rpcs.bulk_get_data_table_rows if parent_rpcs.respond_to? :bulk_get_data_table_rows + @bulk_get_data_table_rows = ::Gapic::Config::Method.new bulk_get_data_table_rows_config + bulk_replace_data_table_rows_config = parent_rpcs.bulk_replace_data_table_rows if parent_rpcs.respond_to? :bulk_replace_data_table_rows + @bulk_replace_data_table_rows = ::Gapic::Config::Method.new bulk_replace_data_table_rows_config + bulk_update_data_table_rows_config = parent_rpcs.bulk_update_data_table_rows if parent_rpcs.respond_to? :bulk_update_data_table_rows + @bulk_update_data_table_rows = ::Gapic::Config::Method.new bulk_update_data_table_rows_config + get_data_table_operation_errors_config = parent_rpcs.get_data_table_operation_errors if parent_rpcs.respond_to? :get_data_table_operation_errors + @get_data_table_operation_errors = ::Gapic::Config::Method.new get_data_table_operation_errors_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb new file mode 100644 index 000000000000..110794e9d528 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb @@ -0,0 +1,1004 @@ +# 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/chronicle/v1/data_table_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DataTableService + module Rest + ## + # REST service stub for the DataTableService 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_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRequest] + # 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::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # A result object deserialized from the server's reply + def create_data_table request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_table_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_data_table", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_tables REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTablesRequest] + # 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::Chronicle::V1::ListDataTablesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListDataTablesResponse] + # A result object deserialized from the server's reply + def list_data_tables request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_tables_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_data_tables", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.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_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRequest] + # 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::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # A result object deserialized from the server's reply + def get_data_table request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_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_data_table", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest] + # 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::Chronicle::V1::DataTable] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # A result object deserialized from the server's reply + def update_data_table request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_table_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_data_table", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest] + # 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_data_table request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_table_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_data_table", + 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 create_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest] + # 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::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # A result object deserialized from the server's reply + def create_data_table_row request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_table_row_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_data_table_row", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest] + # 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::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # A result object deserialized from the server's reply + def update_data_table_row request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_table_row_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_data_table_row", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest] + # 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::Chronicle::V1::ListDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse] + # A result object deserialized from the server's reply + def list_data_table_rows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_table_rows_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_data_table_rows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.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_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest] + # 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::Chronicle::V1::DataTableRow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # A result object deserialized from the server's reply + def get_data_table_row request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_row_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_data_table_row", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest] + # 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_data_table_row request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_table_row_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_data_table_row", + 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 bulk_create_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest] + # 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::Chronicle::V1::BulkCreateDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] + # A result object deserialized from the server's reply + def bulk_create_data_table_rows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_create_data_table_rows_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: "bulk_create_data_table_rows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the bulk_get_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest] + # 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::Chronicle::V1::BulkGetDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] + # A result object deserialized from the server's reply + def bulk_get_data_table_rows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_get_data_table_rows_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: "bulk_get_data_table_rows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the bulk_replace_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest] + # 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::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] + # A result object deserialized from the server's reply + def bulk_replace_data_table_rows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_replace_data_table_rows_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: "bulk_replace_data_table_rows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the bulk_update_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest] + # 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::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] + # A result object deserialized from the server's reply + def bulk_update_data_table_rows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_update_data_table_rows_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: "bulk_update_data_table_rows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.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_data_table_operation_errors REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest] + # 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::Chronicle::V1::DataTableOperationErrors] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] + # A result object deserialized from the server's reply + def get_data_table_operation_errors request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_operation_errors_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_data_table_operation_errors", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.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_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRequest] + # 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_data_table_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTables", + body: "data_table", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_tables REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTablesRequest] + # 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_data_tables_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataTables", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRequest] + # 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_data_table_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest] + # 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_data_table_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_table.name}", + body: "data_table", + matches: [ + ["data_table.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_table REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest] + # 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_data_table_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest] + # 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_data_table_row_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTableRows", + body: "data_table_row", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest] + # 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_data_table_row_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_table_row.name}", + body: "data_table_row", + matches: [ + ["data_table_row.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest] + # 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_data_table_rows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataTableRows", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest] + # 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_data_table_row_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_table_row REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest] + # 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_data_table_row_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_create_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_create_data_table_rows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTableRows:bulkCreate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_get_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_get_data_table_rows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTableRows:bulkGet", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_replace_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_replace_data_table_rows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTableRows:bulkReplace", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_update_data_table_rows REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_update_data_table_rows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataTableRows:bulkUpdate", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_table_operation_errors REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest] + # 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_data_table_operation_errors_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTableOperationErrors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb new file mode 100644 index 000000000000..39896c092027 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb @@ -0,0 +1,73 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/data_table.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/data_table_pb' + +module Google + module Cloud + module Chronicle + module V1 + module DataTableService + # DataTableManager provides an interface for managing data tables. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.DataTableService' + + # Create a new data table. + rpc :CreateDataTable, ::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable + # List data tables. + rpc :ListDataTables, ::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::Google::Cloud::Chronicle::V1::ListDataTablesResponse + # Get data table info. + rpc :GetDataTable, ::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable + # Update data table. + rpc :UpdateDataTable, ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable + # Delete data table. + rpc :DeleteDataTable, ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::Google::Protobuf::Empty + # Create a new data table row. + rpc :CreateDataTableRow, ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow + # Update data table row + rpc :UpdateDataTableRow, ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow + # List data table rows. + rpc :ListDataTableRows, ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse + # Get data table row + rpc :GetDataTableRow, ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow + # Delete data table row. + rpc :DeleteDataTableRow, ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::Google::Protobuf::Empty + # Create data table rows in bulk. + rpc :BulkCreateDataTableRows, ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse + # Get data table rows in bulk. + rpc :BulkGetDataTableRows, ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse + # Replace all existing data table rows with new data table rows. + rpc :BulkReplaceDataTableRows, ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse + # Update data table rows in bulk. + rpc :BulkUpdateDataTableRows, ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse + # Get the error for a data table operation. + rpc :GetDataTableOperationErrors, ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::Google::Cloud::Chronicle::V1::DataTableOperationErrors + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb new file mode 100644 index 000000000000..80fdf542b870 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/entity.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/chronicle/v1/entity.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\x06\n\tWatchlist\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12multiplying_factor\x18\x05 \x01(\x02\x42\x03\xe0\x41\x01\x12h\n\x1b\x65ntity_population_mechanism\x18\x06 \x01(\x0b\x32>.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanismB\x03\xe0\x41\x02\x12K\n\x0c\x65ntity_count\x18\x07 \x01(\x0b\x32\x30.google.cloud.chronicle.v1.Watchlist.EntityCountB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\\\n\x1awatchlist_user_preferences\x18\n \x01(\x0b\x32\x33.google.cloud.chronicle.v1.WatchlistUserPreferencesB\x03\xe0\x41\x01\x1a\x90\x01\n\x19\x45ntityPopulationMechanism\x12\\\n\x06manual\x18\x01 \x01(\x0b\x32\x45.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.ManualB\x03\xe0\x41\x01H\x00\x1a\x08\n\x06ManualB\x0b\n\tmechanism\x1a\x34\n\x0b\x45ntityCount\x12\x11\n\x04user\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x12\n\x05\x61sset\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03:\x94\x01\xea\x41\x90\x01\n\"chronicle.googleapis.com/Watchlist\x12Sprojects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}*\nwatchlists2\twatchlist\"/\n\x18WatchlistUserPreferences\x12\x13\n\x06pinned\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x13GetWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\"\x99\x01\n\x15ListWatchlistsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"u\n\x16ListWatchlistsResponse\x12=\n\nwatchlists\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n\x16\x43reateWatchlistRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\x12\x19\n\x0cwatchlist_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12<\n\twatchlist\x18\x03 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\"\x8c\x01\n\x16UpdateWatchlistRequest\x12<\n\twatchlist\x18\x01 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x16\x44\x65leteWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x32\xbe\x08\n\rEntityService\x12\xaf\x01\n\x0cGetWatchlist\x12..google.cloud.chronicle.v1.GetWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x12\xc2\x01\n\x0eListWatchlists\x12\x30.google.cloud.chronicle.v1.ListWatchlistsRequest\x1a\x31.google.cloud.chronicle.v1.ListWatchlistsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/watchlists\x12\xd9\x01\n\x0f\x43reateWatchlist\x12\x31.google.cloud.chronicle.v1.CreateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"m\xda\x41\x1dparent,watchlist,watchlist_id\x82\xd3\xe4\x93\x02G\":/v1/{parent=projects/*/locations/*/instances/*}/watchlists:\twatchlist\x12\xdb\x01\n\x0fUpdateWatchlist\x12\x31.google.cloud.chronicle.v1.UpdateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"o\xda\x41\x15watchlist,update_mask\x82\xd3\xe4\x93\x02Q2D/v1/{watchlist.name=projects/*/locations/*/instances/*/watchlists/*}:\twatchlist\x12\xad\x01\n\x0f\x44\x65leteWatchlist\x12\x31.google.cloud.chronicle.v1.DeleteWatchlistRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\nname,force\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc2\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0b\x45ntityProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + Watchlist = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist").msgclass + Watchlist::EntityPopulationMechanism = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism").msgclass + Watchlist::EntityPopulationMechanism::Manual = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual").msgclass + Watchlist::EntityCount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityCount").msgclass + WatchlistUserPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.WatchlistUserPreferences").msgclass + GetWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetWatchlistRequest").msgclass + ListWatchlistsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsRequest").msgclass + ListWatchlistsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsResponse").msgclass + CreateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateWatchlistRequest").msgclass + UpdateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateWatchlistRequest").msgclass + DeleteWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteWatchlistRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb new file mode 100644 index 000000000000..5dd703d38f49 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/entity_service/credentials" +require "google/cloud/chronicle/v1/entity_service/paths" +require "google/cloud/chronicle/v1/entity_service/client" +require "google/cloud/chronicle/v1/entity_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # EntityService contains apis for finding entities. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/entity_service" + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/entity_service/rest" + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + module EntityService + end + end + end + end +end + +helper_path = ::File.join __dir__, "entity_service", "helpers.rb" +require "google/cloud/chronicle/v1/entity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb new file mode 100644 index 000000000000..58bdcbe09913 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb @@ -0,0 +1,908 @@ +# 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/chronicle/v1/entity_pb" + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + ## + # Client for the EntityService service. + # + # EntityService contains apis for finding entities. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :entity_service_stub + + ## + # Configure the EntityService Client class. + # + # See {::Google::Cloud::Chronicle::V1::EntityService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EntityService clients + # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] + 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.get_watchlist.timeout = 90.0 + default_config.rpcs.get_watchlist.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_watchlists.timeout = 90.0 + default_config.rpcs.list_watchlists.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_watchlist.timeout = 90.0 + + default_config.rpcs.update_watchlist.timeout = 90.0 + + default_config.rpcs.delete_watchlist.timeout = 90.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EntityService 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::Chronicle::V1::EntityService::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 + @entity_service_stub.universe_domain + end + + ## + # Create a new EntityService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EntityService 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/chronicle/v1/entity_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 + + @entity_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::EntityService::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 + ) + + @entity_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @entity_service_stub.logger + end + + # Service calls + + ## + # Gets watchlist details for the given watchlist ID. + # + # @overload get_watchlist(request, options = nil) + # Pass arguments to `get_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::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_watchlist(name: nil) + # Pass arguments to `get_watchlist` 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 parent, which owns this collection of watchlists. + # The name of the watchlist to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new + # + # # Call the get_watchlist method. + # result = client.get_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def get_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :get_watchlist, 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 all watchlists for the given instance. + # + # @overload list_watchlists(request, options = nil) + # Pass arguments to `list_watchlists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_watchlists` 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 parent, which owns this collection of watchlists. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # Optional. The maximum number of watchlists to return. + # The service may return fewer than this value. + # If unspecified, at most 200 watchlists will be returned. + # The maximum value is 200; values above 200 will be coerced to 200. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListWatchlists` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListWatchlists` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Which watchlist to return in aip.dev/160 form. + # Currently, only the following filters are supported: + # - `watchlist_user_preferences.pinned=true` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new + # + # # Call the list_watchlists method. + # result = client.list_watchlists 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::Chronicle::V1::Watchlist. + # p item + # end + # + def list_watchlists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest + + # 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_watchlists.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::Chronicle::V1::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_watchlists.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_watchlists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :list_watchlists, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @entity_service_stub, :list_watchlists, 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 + + ## + # Creates a watchlist for the given instance. + # Note that there can be at most 200 watchlists per instance. + # + # @overload create_watchlist(request, options = nil) + # Pass arguments to `create_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) + # Pass arguments to `create_watchlist` 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 parent resource where this watchlist will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param watchlist_id [::String] + # Optional. The ID to use for the watchlist, + # which will become the final component of the watchlist's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new + # + # # Call the create_watchlist method. + # result = client.create_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def create_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :create_watchlist, 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 + + ## + # Updates the watchlist for the given instance. + # + # @overload update_watchlist(request, options = nil) + # Pass arguments to `update_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::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_watchlist(watchlist: nil, update_mask: nil) + # Pass arguments to `update_watchlist` 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 watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to update. + # + # The watchlist's `name` field is used to identify the watchlist to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new + # + # # Call the update_watchlist method. + # result = client.update_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def update_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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.watchlist&.name + header_params["watchlist.name"] = request.watchlist.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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :update_watchlist, 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 the watchlist for the given instance. + # + # @overload delete_watchlist(request, options = nil) + # Pass arguments to `delete_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::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_watchlist(name: nil, force: nil) + # Pass arguments to `delete_watchlist` 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 name of the watchlist to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param force [::Boolean] + # Optional. If set to true, any entities under this watchlist will also be + # deleted. (Otherwise, the request will only work if the watchlist has no + # entities.) + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new + # + # # Call the delete_watchlist method. + # result = client.delete_watchlist request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :delete_watchlist, 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 + + ## + # Configuration class for the EntityService API. + # + # This class represents the configuration for EntityService, + # 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::Chronicle::V1::EntityService::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 + # # get_watchlist to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::EntityService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.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::Chronicle::V1::EntityService::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. + # * `: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 = "chronicle.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 EntityService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :get_watchlist + ## + # RPC-specific configuration for `list_watchlists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_watchlists + ## + # RPC-specific configuration for `create_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :create_watchlist + ## + # RPC-specific configuration for `update_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :update_watchlist + ## + # RPC-specific configuration for `delete_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_watchlist + + # @private + def initialize parent_rpcs = nil + get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist + @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config + list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists + @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config + create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist + @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config + update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist + @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config + delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist + @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb new file mode 100644 index 000000000000..d22648b53244 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + module EntityService + # Credentials for the EntityService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb new file mode 100644 index 000000000000..21433575930f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb @@ -0,0 +1,73 @@ +# 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 Chronicle + module V1 + module EntityService + # Path helper methods for the EntityService API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified Watchlist resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param watchlist [String] + # + # @return [::String] + def watchlist_path project:, location:, instance:, watchlist: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/watchlists/#{watchlist}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb new file mode 100644 index 000000000000..5e1f8b48cf66 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/entity_service/credentials" +require "google/cloud/chronicle/v1/entity_service/paths" +require "google/cloud/chronicle/v1/entity_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # EntityService contains apis for finding entities. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/entity_service/rest" + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + module EntityService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/entity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb new file mode 100644 index 000000000000..fc82038f4319 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb @@ -0,0 +1,830 @@ +# 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/chronicle/v1/entity_pb" +require "google/cloud/chronicle/v1/entity_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + module Rest + ## + # REST client for the EntityService service. + # + # EntityService contains apis for finding entities. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :entity_service_stub + + ## + # Configure the EntityService Client class. + # + # See {::Google::Cloud::Chronicle::V1::EntityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EntityService clients + # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] + 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.get_watchlist.timeout = 90.0 + default_config.rpcs.get_watchlist.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_watchlists.timeout = 90.0 + default_config.rpcs.list_watchlists.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_watchlist.timeout = 90.0 + + default_config.rpcs.update_watchlist.timeout = 90.0 + + default_config.rpcs.delete_watchlist.timeout = 90.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EntityService 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::Chronicle::V1::EntityService::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 + @entity_service_stub.universe_domain + end + + ## + # Create a new EntityService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EntityService 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 + + @entity_service_stub = ::Google::Cloud::Chronicle::V1::EntityService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @entity_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @entity_service_stub.logger + end + + # Service calls + + ## + # Gets watchlist details for the given watchlist ID. + # + # @overload get_watchlist(request, options = nil) + # Pass arguments to `get_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::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_watchlist(name: nil) + # Pass arguments to `get_watchlist` 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 parent, which owns this collection of watchlists. + # The name of the watchlist to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new + # + # # Call the get_watchlist method. + # result = client.get_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def get_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.get_watchlist 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 all watchlists for the given instance. + # + # @overload list_watchlists(request, options = nil) + # Pass arguments to `list_watchlists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_watchlists` 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 parent, which owns this collection of watchlists. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # Optional. The maximum number of watchlists to return. + # The service may return fewer than this value. + # If unspecified, at most 200 watchlists will be returned. + # The maximum value is 200; values above 200 will be coerced to 200. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListWatchlists` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListWatchlists` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Which watchlist to return in aip.dev/160 form. + # Currently, only the following filters are supported: + # - `watchlist_user_preferences.pinned=true` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new + # + # # Call the list_watchlists method. + # result = client.list_watchlists 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::Chronicle::V1::Watchlist. + # p item + # end + # + def list_watchlists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest + + # 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_watchlists.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::Chronicle::V1::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_watchlists.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_watchlists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.list_watchlists request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @entity_service_stub, :list_watchlists, "watchlists", 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 + + ## + # Creates a watchlist for the given instance. + # Note that there can be at most 200 watchlists per instance. + # + # @overload create_watchlist(request, options = nil) + # Pass arguments to `create_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) + # Pass arguments to `create_watchlist` 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 parent resource where this watchlist will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param watchlist_id [::String] + # Optional. The ID to use for the watchlist, + # which will become the final component of the watchlist's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new + # + # # Call the create_watchlist method. + # result = client.create_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def create_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.create_watchlist 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 + + ## + # Updates the watchlist for the given instance. + # + # @overload update_watchlist(request, options = nil) + # Pass arguments to `update_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::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_watchlist(watchlist: nil, update_mask: nil) + # Pass arguments to `update_watchlist` 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 watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to update. + # + # The watchlist's `name` field is used to identify the watchlist to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new + # + # # Call the update_watchlist method. + # result = client.update_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def update_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.update_watchlist 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 the watchlist for the given instance. + # + # @overload delete_watchlist(request, options = nil) + # Pass arguments to `delete_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::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_watchlist(name: nil, force: nil) + # Pass arguments to `delete_watchlist` 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 name of the watchlist to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param force [::Boolean] + # Optional. If set to true, any entities under this watchlist will also be + # deleted. (Otherwise, the request will only work if the watchlist has no + # entities.) + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new + # + # # Call the delete_watchlist method. + # result = client.delete_watchlist request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest + + # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.delete_watchlist 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 + + ## + # Configuration class for the EntityService REST API. + # + # This class represents the configuration for EntityService 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::Chronicle::V1::EntityService::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 + # # get_watchlist to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.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. + # * `: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 = "chronicle.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 EntityService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :get_watchlist + ## + # RPC-specific configuration for `list_watchlists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_watchlists + ## + # RPC-specific configuration for `create_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :create_watchlist + ## + # RPC-specific configuration for `update_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :update_watchlist + ## + # RPC-specific configuration for `delete_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_watchlist + + # @private + def initialize parent_rpcs = nil + get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist + @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config + list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists + @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config + create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist + @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config + update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist + @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config + delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist + @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb new file mode 100644 index 000000000000..526e1e685af9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb @@ -0,0 +1,388 @@ +# 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/chronicle/v1/entity_pb" + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + module Rest + ## + # REST service stub for the EntityService 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 get_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] + # 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::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # A result object deserialized from the server's reply + def get_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_watchlist_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_watchlist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] + # 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::Chronicle::V1::ListWatchlistsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListWatchlistsResponse] + # A result object deserialized from the server's reply + def list_watchlists request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_watchlists_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_watchlists", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] + # 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::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # A result object deserialized from the server's reply + def create_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_watchlist_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_watchlist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] + # 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::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # A result object deserialized from the server's reply + def update_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_watchlist_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_watchlist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] + # 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_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_watchlist_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_watchlist", + 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 + + ## + # @private + # + # GRPC transcoding helper method for the get_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_watchlists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] + # 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_watchlists_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/watchlists", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/watchlists", + body: "watchlist", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{watchlist.name}", + body: "watchlist", + matches: [ + ["watchlist.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb new file mode 100644 index 000000000000..c59e9b0b6f56 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/entity.proto for package 'Google.Cloud.Chronicle.V1' +# 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/chronicle/v1/entity_pb' + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + # EntityService contains apis for finding entities. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.EntityService' + + # Gets watchlist details for the given watchlist ID. + rpc :GetWatchlist, ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist + # Lists all watchlists for the given instance. + rpc :ListWatchlists, ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse + # Creates a watchlist for the given instance. + # Note that there can be at most 200 watchlists per instance. + rpc :CreateWatchlist, ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist + # Updates the watchlist for the given instance. + rpc :UpdateWatchlist, ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist + # Deletes the watchlist for the given instance. + rpc :DeleteWatchlist, ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb new file mode 100644 index 000000000000..3248928b99dd --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/featured_content_metadata.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/cloud/chronicle/v1/featured_content_metadata.proto\x12\x19google.cloud.chronicle.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x04\n\x17\x46\x65\x61turedContentMetadata\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcertified\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ncategories\x18\x08 \x03(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\x08verified\x18\n \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12^\n\x0bsource_type\x18\x0b \x01(\x0e\x32\x44.google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceTypeB\x03\xe0\x41\x03\"`\n\x11\x43ontentSourceType\x12#\n\x1f\x43ONTENT_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOOGLE\x10\x01\x12\r\n\tCOMMUNITY\x10\x02\x12\x0b\n\x07PARTNER\x10\x03\x42\x0b\n\t_verifiedB\xd3\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x1c\x46\x65\x61turedContentMetadataProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + FeaturedContentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FeaturedContentMetadata").msgclass + FeaturedContentMetadata::ContentSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb new file mode 100644 index 000000000000..bd3faf5f2172 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/featured_content_native_dashboard.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/chronicle/v1/featured_content_metadata_pb' +require 'google/cloud/chronicle/v1/native_dashboard_pb' + + +descriptor_data = "\nAgoogle/cloud/chronicle/v1/featured_content_native_dashboard.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x39google/cloud/chronicle/v1/featured_content_metadata.proto\x1a\x30google/cloud/chronicle/v1/native_dashboard.proto\"\xf5\x03\n\x1e\x46\x65\x61turedContentNativeDashboard\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Q\n\x10\x63ontent_metadata\x18\x02 \x01(\x0b\x32\x32.google.cloud.chronicle.v1.FeaturedContentMetadataB\x03\xe0\x41\x03\x12^\n\x11\x64\x61shboard_content\x18\x03 \x01(\x0b\x32>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueriesB\x03\xe0\x41\x01:\x8c\x02\xea\x41\x88\x02\n7chronicle.googleapis.com/FeaturedContentNativeDashboard\x12\x8b\x01projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}*\x1f\x66\x65\x61turedContentNativeDashboards2\x1e\x66\x65\x61turedContentNativeDashboard\"y\n(GetFeaturedContentNativeDashboardRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7chronicle.googleapis.com/FeaturedContentNativeDashboard\"\xc3\x01\n*ListFeaturedContentNativeDashboardsRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37\x63hronicle.googleapis.com/FeaturedContentNativeDashboard\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n+ListFeaturedContentNativeDashboardsResponse\x12\x65\n\"featured_content_native_dashboards\x18\x01 \x03(\x0b\x32\x39.google.cloud.chronicle.v1.FeaturedContentNativeDashboard\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe8\x01\n,InstallFeaturedContentNativeDashboardRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7chronicle.googleapis.com/FeaturedContentNativeDashboard\x12i\n!featured_content_native_dashboard\x18\x02 \x01(\x0b\x32\x39.google.cloud.chronicle.v1.FeaturedContentNativeDashboardB\x03\xe0\x41\x01\"{\n-InstallFeaturedContentNativeDashboardResponse\x12J\n\x10native_dashboard\x18\x01 \x01(\tB0\xe0\x41\x01\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard2\xbc\x08\n%FeaturedContentNativeDashboardService\x12\x8e\x02\n!GetFeaturedContentNativeDashboard\x12\x43.google.cloud.chronicle.v1.GetFeaturedContentNativeDashboardRequest\x1a\x39.google.cloud.chronicle.v1.FeaturedContentNativeDashboard\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\x12Z/v1/{name=projects/*/locations/*/instances/*/contentHub/featuredContentNativeDashboards/*}\x12\xa1\x02\n#ListFeaturedContentNativeDashboards\x12\x45.google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsRequest\x1a\x46.google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsResponse\"k\xda\x41\x06parent\x82\xd3\xe4\x93\x02\\\x12Z/v1/{parent=projects/*/locations/*/instances/*/contentHub}/featuredContentNativeDashboards\x12\xb0\x02\n%InstallFeaturedContentNativeDashboard\x12G.google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardRequest\x1aH.google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardResponse\"t\xda\x41\x04name\x82\xd3\xe4\x93\x02g\"b/v1/{name=projects/*/locations/*/instances/*/contentHub/featuredContentNativeDashboards/*}:install:\x01*\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xe4\x02\n\x1d\x63om.google.cloud.chronicle.v1B#FeaturedContentNativeDashboardProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1\xea\x41\x86\x01\n#chronicle.googleapis.com/ContentHub\x12Gprojects/{project}/locations/{location}/instances/{instance}/contentHub*\ncontentHub2\ncontentHubb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + FeaturedContentNativeDashboard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FeaturedContentNativeDashboard").msgclass + GetFeaturedContentNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetFeaturedContentNativeDashboardRequest").msgclass + ListFeaturedContentNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsRequest").msgclass + ListFeaturedContentNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsResponse").msgclass + InstallFeaturedContentNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardRequest").msgclass + InstallFeaturedContentNativeDashboardResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb new file mode 100644 index 000000000000..d9b60adfefbe --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb @@ -0,0 +1,56 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/client" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # This service provides functionality for managing + # FeaturedContentNativeDashboard. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + module FeaturedContentNativeDashboardService + end + end + end + end +end + +helper_path = ::File.join __dir__, "featured_content_native_dashboard_service", "helpers.rb" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb new file mode 100644 index 000000000000..5da633a058dc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb @@ -0,0 +1,717 @@ +# 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/chronicle/v1/featured_content_native_dashboard_pb" + +module Google + module Cloud + module Chronicle + module V1 + module FeaturedContentNativeDashboardService + ## + # Client for the FeaturedContentNativeDashboardService service. + # + # This service provides functionality for managing + # FeaturedContentNativeDashboard. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :featured_content_native_dashboard_service_stub + + ## + # Configure the FeaturedContentNativeDashboardService Client class. + # + # See {::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FeaturedContentNativeDashboardService clients + # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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", "Chronicle", "V1"] + 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.get_featured_content_native_dashboard.timeout = 60.0 + default_config.rpcs.get_featured_content_native_dashboard.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_featured_content_native_dashboards.timeout = 60.0 + default_config.rpcs.list_featured_content_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 + @featured_content_native_dashboard_service_stub.universe_domain + end + + ## + # Create a new FeaturedContentNativeDashboardService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FeaturedContentNativeDashboardService 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/chronicle/v1/featured_content_native_dashboard_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 + + @featured_content_native_dashboard_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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 + ) + + @featured_content_native_dashboard_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @featured_content_native_dashboard_service_stub.logger + end + + # Service calls + + ## + # Get a native dashboard featured content. + # + # @overload get_featured_content_native_dashboard(request, options = nil) + # Pass arguments to `get_featured_content_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, ::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_featured_content_native_dashboard(name: nil) + # Pass arguments to `get_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to + # retrieve. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new + # + # # Call the get_featured_content_native_dashboard method. + # result = client.get_featured_content_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard. + # p result + # + def get_featured_content_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest + + # 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_featured_content_native_dashboard.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::Chronicle::V1::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_featured_content_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_featured_content_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.call_rpc :get_featured_content_native_dashboard, 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 + + ## + # List all native dashboards featured content. + # + # @overload list_featured_content_native_dashboards(request, options = nil) + # Pass arguments to `list_featured_content_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, ::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_featured_content_native_dashboards(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_featured_content_native_dashboards` 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 parent, which owns this collection of + # FeaturedContentNativeDashboards. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub + # @param page_size [::Integer] + # Optional. The maximum number of FeaturedContentNativeDashboards to return. + # The service may return fewer than this value. If unspecified, at most 100 + # FeaturedContentNativeDashboards will be returned. The maximum value is 100; + # values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListFeaturedContentNativeDashboards` must match the call that provided the + # page token. + # @param filter [::String] + # Optional. The filter to apply to list the FeaturedContentNativeDashboards. + # + # The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. + # + # Supported fields for filtering: + # + # * `name`: The resource name of the featured content. + # * `content_metadata.description`: The description of the featured + # content. + # + # When a literal value is provided without a field, it will perform a + # substring search across both `name` and `content_metadata.description`. + # + # Examples: + # + # * `"test"`: Matches featured content where either the name or description + # contains "test" as a substring. + # * `name="test"`: Matches featured content where the name contains "test". + # * `content_metadata.description="test"`: Matches featured content where + # the description contains "test". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new + # + # # Call the list_featured_content_native_dashboards method. + # result = client.list_featured_content_native_dashboards 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::Chronicle::V1::FeaturedContentNativeDashboard. + # p item + # end + # + def list_featured_content_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest + + # 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_featured_content_native_dashboards.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::Chronicle::V1::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_featured_content_native_dashboards.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_featured_content_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.call_rpc :list_featured_content_native_dashboards, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @featured_content_native_dashboard_service_stub, :list_featured_content_native_dashboards, 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 + + ## + # Install a native dashboard featured content. + # + # @overload install_featured_content_native_dashboard(request, options = nil) + # Pass arguments to `install_featured_content_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, ::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 install_featured_content_native_dashboard(name: nil, featured_content_native_dashboard: nil) + # Pass arguments to `install_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to + # install. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # @param featured_content_native_dashboard [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard, ::Hash] + # Optional. The FeaturedContentNativeDashboard to install. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new + # + # # Call the install_featured_content_native_dashboard method. + # result = client.install_featured_content_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse. + # p result + # + def install_featured_content_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest + + # 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.install_featured_content_native_dashboard.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::Chronicle::V1::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.install_featured_content_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.install_featured_content_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.call_rpc :install_featured_content_native_dashboard, 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 + + ## + # Configuration class for the FeaturedContentNativeDashboardService API. + # + # This class represents the configuration for FeaturedContentNativeDashboardService, + # 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 + # # get_featured_content_native_dashboard to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_featured_content_native_dashboard.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_featured_content_native_dashboard.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::Chronicle::V1::FeaturedContentNativeDashboardService::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. + # * `: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 = "chronicle.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 FeaturedContentNativeDashboardService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_featured_content_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :get_featured_content_native_dashboard + ## + # RPC-specific configuration for `list_featured_content_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :list_featured_content_native_dashboards + ## + # RPC-specific configuration for `install_featured_content_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :install_featured_content_native_dashboard + + # @private + def initialize parent_rpcs = nil + get_featured_content_native_dashboard_config = parent_rpcs.get_featured_content_native_dashboard if parent_rpcs.respond_to? :get_featured_content_native_dashboard + @get_featured_content_native_dashboard = ::Gapic::Config::Method.new get_featured_content_native_dashboard_config + list_featured_content_native_dashboards_config = parent_rpcs.list_featured_content_native_dashboards if parent_rpcs.respond_to? :list_featured_content_native_dashboards + @list_featured_content_native_dashboards = ::Gapic::Config::Method.new list_featured_content_native_dashboards_config + install_featured_content_native_dashboard_config = parent_rpcs.install_featured_content_native_dashboard if parent_rpcs.respond_to? :install_featured_content_native_dashboard + @install_featured_content_native_dashboard = ::Gapic::Config::Method.new install_featured_content_native_dashboard_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb new file mode 100644 index 000000000000..2989f4bffb1d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module FeaturedContentNativeDashboardService + # Credentials for the FeaturedContentNativeDashboardService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb new file mode 100644 index 000000000000..a71c8d10fcf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb @@ -0,0 +1,136 @@ +# 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 Chronicle + module V1 + module FeaturedContentNativeDashboardService + # Path helper methods for the FeaturedContentNativeDashboardService API. + module Paths + ## + # Create a fully-qualified ContentHub resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/contentHub` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def content_hub_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/contentHub" + end + + ## + # Create a fully-qualified DashboardChart resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param chart [String] + # + # @return [::String] + def dashboard_chart_path project:, location:, instance:, chart: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" + end + + ## + # Create a fully-qualified DashboardQuery resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param query [String] + # + # @return [::String] + def dashboard_query_path project:, location:, instance:, query: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardQueries/#{query}" + end + + ## + # Create a fully-qualified FeaturedContentNativeDashboard resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param featured_content_native_dashboard [String] + # + # @return [::String] + def featured_content_native_dashboard_path project:, location:, instance:, featured_content_native_dashboard: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/contentHub/featuredContentNativeDashboards/#{featured_content_native_dashboard}" + end + + ## + # Create a fully-qualified NativeDashboard resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param dashboard [String] + # + # @return [::String] + def native_dashboard_path project:, location:, instance:, dashboard: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/nativeDashboards/#{dashboard}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb new file mode 100644 index 000000000000..f3fc177c90e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb @@ -0,0 +1,53 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # This service provides functionality for managing + # FeaturedContentNativeDashboard. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + module FeaturedContentNativeDashboardService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb new file mode 100644 index 000000000000..77ac512963a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb @@ -0,0 +1,653 @@ +# 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/chronicle/v1/featured_content_native_dashboard_pb" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module FeaturedContentNativeDashboardService + module Rest + ## + # REST client for the FeaturedContentNativeDashboardService service. + # + # This service provides functionality for managing + # FeaturedContentNativeDashboard. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :featured_content_native_dashboard_service_stub + + ## + # Configure the FeaturedContentNativeDashboardService Client class. + # + # See {::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FeaturedContentNativeDashboardService clients + # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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", "Chronicle", "V1"] + 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.get_featured_content_native_dashboard.timeout = 60.0 + default_config.rpcs.get_featured_content_native_dashboard.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_featured_content_native_dashboards.timeout = 60.0 + default_config.rpcs.list_featured_content_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 + @featured_content_native_dashboard_service_stub.universe_domain + end + + ## + # Create a new FeaturedContentNativeDashboardService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FeaturedContentNativeDashboardService 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 + + @featured_content_native_dashboard_service_stub = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @featured_content_native_dashboard_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @featured_content_native_dashboard_service_stub.logger + end + + # Service calls + + ## + # Get a native dashboard featured content. + # + # @overload get_featured_content_native_dashboard(request, options = nil) + # Pass arguments to `get_featured_content_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, ::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_featured_content_native_dashboard(name: nil) + # Pass arguments to `get_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to + # retrieve. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new + # + # # Call the get_featured_content_native_dashboard method. + # result = client.get_featured_content_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard. + # p result + # + def get_featured_content_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest + + # 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_featured_content_native_dashboard.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::Chronicle::V1::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_featured_content_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_featured_content_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.get_featured_content_native_dashboard 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 + + ## + # List all native dashboards featured content. + # + # @overload list_featured_content_native_dashboards(request, options = nil) + # Pass arguments to `list_featured_content_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, ::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_featured_content_native_dashboards(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_featured_content_native_dashboards` 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 parent, which owns this collection of + # FeaturedContentNativeDashboards. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub + # @param page_size [::Integer] + # Optional. The maximum number of FeaturedContentNativeDashboards to return. + # The service may return fewer than this value. If unspecified, at most 100 + # FeaturedContentNativeDashboards will be returned. The maximum value is 100; + # values above 100 will be coerced to 100. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListFeaturedContentNativeDashboards` must match the call that provided the + # page token. + # @param filter [::String] + # Optional. The filter to apply to list the FeaturedContentNativeDashboards. + # + # The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. + # + # Supported fields for filtering: + # + # * `name`: The resource name of the featured content. + # * `content_metadata.description`: The description of the featured + # content. + # + # When a literal value is provided without a field, it will perform a + # substring search across both `name` and `content_metadata.description`. + # + # Examples: + # + # * `"test"`: Matches featured content where either the name or description + # contains "test" as a substring. + # * `name="test"`: Matches featured content where the name contains "test". + # * `content_metadata.description="test"`: Matches featured content where + # the description contains "test". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new + # + # # Call the list_featured_content_native_dashboards method. + # result = client.list_featured_content_native_dashboards 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::Chronicle::V1::FeaturedContentNativeDashboard. + # p item + # end + # + def list_featured_content_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest + + # 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_featured_content_native_dashboards.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::Chronicle::V1::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_featured_content_native_dashboards.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_featured_content_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.list_featured_content_native_dashboards request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @featured_content_native_dashboard_service_stub, :list_featured_content_native_dashboards, "featured_content_native_dashboards", 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 + + ## + # Install a native dashboard featured content. + # + # @overload install_featured_content_native_dashboard(request, options = nil) + # Pass arguments to `install_featured_content_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, ::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 install_featured_content_native_dashboard(name: nil, featured_content_native_dashboard: nil) + # Pass arguments to `install_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to + # install. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # @param featured_content_native_dashboard [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard, ::Hash] + # Optional. The FeaturedContentNativeDashboard to install. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new + # + # # Call the install_featured_content_native_dashboard method. + # result = client.install_featured_content_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse. + # p result + # + def install_featured_content_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest + + # 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.install_featured_content_native_dashboard.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::Chronicle::V1::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.install_featured_content_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.install_featured_content_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @featured_content_native_dashboard_service_stub.install_featured_content_native_dashboard 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 + + ## + # Configuration class for the FeaturedContentNativeDashboardService REST API. + # + # This class represents the configuration for FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 + # # get_featured_content_native_dashboard to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_featured_content_native_dashboard.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_featured_content_native_dashboard.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. + # * `: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 = "chronicle.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 FeaturedContentNativeDashboardService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_featured_content_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :get_featured_content_native_dashboard + ## + # RPC-specific configuration for `list_featured_content_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :list_featured_content_native_dashboards + ## + # RPC-specific configuration for `install_featured_content_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :install_featured_content_native_dashboard + + # @private + def initialize parent_rpcs = nil + get_featured_content_native_dashboard_config = parent_rpcs.get_featured_content_native_dashboard if parent_rpcs.respond_to? :get_featured_content_native_dashboard + @get_featured_content_native_dashboard = ::Gapic::Config::Method.new get_featured_content_native_dashboard_config + list_featured_content_native_dashboards_config = parent_rpcs.list_featured_content_native_dashboards if parent_rpcs.respond_to? :list_featured_content_native_dashboards + @list_featured_content_native_dashboards = ::Gapic::Config::Method.new list_featured_content_native_dashboards_config + install_featured_content_native_dashboard_config = parent_rpcs.install_featured_content_native_dashboard if parent_rpcs.respond_to? :install_featured_content_native_dashboard + @install_featured_content_native_dashboard = ::Gapic::Config::Method.new install_featured_content_native_dashboard_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb new file mode 100644 index 000000000000..87f450115dc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb @@ -0,0 +1,265 @@ +# 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/chronicle/v1/featured_content_native_dashboard_pb" + +module Google + module Cloud + module Chronicle + module V1 + module FeaturedContentNativeDashboardService + module Rest + ## + # REST service stub for the FeaturedContentNativeDashboardService 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 get_featured_content_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest] + # 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::Chronicle::V1::FeaturedContentNativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # A result object deserialized from the server's reply + def get_featured_content_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_featured_content_native_dashboard_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_featured_content_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard.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_featured_content_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest] + # 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::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse] + # A result object deserialized from the server's reply + def list_featured_content_native_dashboards request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_featured_content_native_dashboards_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_featured_content_native_dashboards", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the install_featured_content_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest] + # 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::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] + # A result object deserialized from the server's reply + def install_featured_content_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_install_featured_content_native_dashboard_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: "install_featured_content_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse.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 get_featured_content_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest] + # 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_featured_content_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/contentHub/featuredContentNativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_featured_content_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest] + # 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_featured_content_native_dashboards_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/featuredContentNativeDashboards", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/contentHub/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the install_featured_content_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_install_featured_content_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:install", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/contentHub/featuredContentNativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb new file mode 100644 index 000000000000..8f949b5ddb61 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/featured_content_native_dashboard.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/featured_content_native_dashboard_pb' + +module Google + module Cloud + module Chronicle + module V1 + module FeaturedContentNativeDashboardService + # This service provides functionality for managing + # FeaturedContentNativeDashboard. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.FeaturedContentNativeDashboardService' + + # Get a native dashboard featured content. + rpc :GetFeaturedContentNativeDashboard, ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard + # List all native dashboards featured content. + rpc :ListFeaturedContentNativeDashboards, ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse + # Install a native dashboard featured content. + rpc :InstallFeaturedContentNativeDashboard, ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb new file mode 100644 index 000000000000..93db557b2ce9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/instance.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' + + +descriptor_data = "\n(google/cloud/chronicle/v1/instance.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x01\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:y\xea\x41v\n!chronicle.googleapis.com/Instance\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the InstanceService API. + # + # This class represents the configuration for InstanceService, + # 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::Chronicle::V1::InstanceService::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 + # # get_instance to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::InstanceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.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::Chronicle::V1::InstanceService::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. + # * `: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 = "chronicle.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 InstanceService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + + # @private + def initialize parent_rpcs = nil + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb new file mode 100644 index 000000000000..63fbe3b5b5fb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + module InstanceService + # Credentials for the InstanceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb new file mode 100644 index 000000000000..71d7213a0c6d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb @@ -0,0 +1,52 @@ +# 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 Chronicle + module V1 + module InstanceService + # Path helper methods for the InstanceService API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb new file mode 100644 index 000000000000..40b1913eead4 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/instance_service/credentials" +require "google/cloud/chronicle/v1/instance_service/paths" +require "google/cloud/chronicle/v1/instance_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # InstanceService provides the entry interface for the Chronicle API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/instance_service/rest" + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new + # + module InstanceService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/instance_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb new file mode 100644 index 000000000000..4b6f95ea6cbb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb @@ -0,0 +1,431 @@ +# 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/chronicle/v1/instance_pb" +require "google/cloud/chronicle/v1/instance_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module InstanceService + module Rest + ## + # REST client for the InstanceService service. + # + # InstanceService provides the entry interface for the Chronicle API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :instance_service_stub + + ## + # Configure the InstanceService Client class. + # + # See {::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InstanceService clients + # ::Google::Cloud::Chronicle::V1::InstanceService::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", "Chronicle", "V1"] + 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.get_instance.timeout = 60.0 + default_config.rpcs.get_instance.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InstanceService 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::Chronicle::V1::InstanceService::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 + @instance_service_stub.universe_domain + end + + ## + # Create a new InstanceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InstanceService 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 + + @instance_service_stub = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @instance_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @instance_service_stub.logger + end + + # Service calls + + ## + # Gets a Instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::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_instance(name: nil) + # Pass arguments to `get_instance` 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 name of the instance to retrieve. + # Format: + # `projects/{project_id}/locations/{location}/instances/{instance}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetInstanceRequest + + # 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_instance.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::Chronicle::V1::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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_service_stub.get_instance 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 + + ## + # Configuration class for the InstanceService REST API. + # + # This class represents the configuration for InstanceService 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::Chronicle::V1::InstanceService::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 + # # get_instance to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.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. + # * `: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 = "chronicle.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 InstanceService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + + # @private + def initialize parent_rpcs = nil + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb new file mode 100644 index 000000000000..54fc5b580ded --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb @@ -0,0 +1,142 @@ +# 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/chronicle/v1/instance_pb" + +module Google + module Cloud + module Chronicle + module V1 + module InstanceService + module Rest + ## + # REST service stub for the InstanceService 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 get_instance REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] + # 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::Chronicle::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Instance] + # A result object deserialized from the server's reply + def get_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_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_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Instance.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 get_instance REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb new file mode 100644 index 000000000000..3465f58ac427 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb @@ -0,0 +1,45 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/instance.proto for package 'Google.Cloud.Chronicle.V1' +# 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/chronicle/v1/instance_pb' + +module Google + module Cloud + module Chronicle + module V1 + module InstanceService + # InstanceService provides the entry interface for the Chronicle API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.InstanceService' + + # Gets a Instance. + rpc :GetInstance, ::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::Google::Cloud::Chronicle::V1::Instance + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb new file mode 100644 index 000000000000..d5d773013043 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/native_dashboard.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/chronicle/v1/dashboard_chart_pb' +require 'google/cloud/chronicle/v1/dashboard_query_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n0google/cloud/chronicle/v1/native_dashboard.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/chronicle/v1/dashboard_chart.proto\x1a/google/cloud/chronicle/v1/dashboard_query.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"u\n\x1d\x45xportNativeDashboardsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12\x12\n\x05names\x18\x02 \x03(\tB\x03\xe0\x41\x02\"{\n\x1e\x45xportNativeDashboardsResponse\x12J\n\x12inline_destination\x18\x01 \x01(\x0b\x32,.google.cloud.chronicle.v1.InlineDestinationH\x00\x42\r\n\x0b\x64\x65stination\"g\n\x11InlineDestination\x12R\n\ndashboards\x18\x01 \x03(\x0b\x32>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries\"\xfe\x01\n#NativeDashboardWithChartsAndQueries\x12\x42\n\tdashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x01\x12H\n\x10\x64\x61shboard_charts\x18\x02 \x03(\x0b\x32).google.cloud.chronicle.v1.DashboardChartB\x03\xe0\x41\x01\x12I\n\x11\x64\x61shboard_queries\x18\x03 \x03(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x01\"\xb5\x01\n\x1dImportNativeDashboardsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12R\n\x06source\x18\x02 \x01(\x0b\x32=.google.cloud.chronicle.v1.ImportNativeDashboardsInlineSourceB\x03\xe0\x41\x02\"}\n\"ImportNativeDashboardsInlineSource\x12W\n\ndashboards\x18\x01 \x03(\x0b\x32>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueriesB\x03\xe0\x41\x02\"e\n\x1eImportNativeDashboardsResponse\x12\x43\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.chronicle.v1.ImportExportStatusB\x03\xe0\x41\x03\"P\n\x12ImportExportStatus\x12\x11\n\tdashboard\x18\x01 \x01(\t\x12\'\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\"\x85\x06\n\x0fNativeDashboard\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12G\n\ndefinition\x18\x04 \x01(\x0b\x32..google.cloud.chronicle.v1.DashboardDefinitionB\x03\xe0\x41\x01\x12;\n\x04type\x18\x05 \x01(\x0e\x32(.google.cloud.chronicle.v1.DashboardTypeB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0e\x63reate_user_id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0eupdate_user_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12N\n\x13\x64\x61shboard_user_data\x18\n \x01(\x0b\x32,.google.cloud.chronicle.v1.DashboardUserDataB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12?\n\x06\x61\x63\x63\x65ss\x18\x0c \x01(\x0e\x32*.google.cloud.chronicle.v1.DashboardAccessB\x03\xe0\x41\x03:\xac\x01\xea\x41\xa8\x01\n(chronicle.googleapis.com/NativeDashboard\x12Yprojects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}*\x10nativeDashboards2\x0fnativeDashboard\"\xab\x01\n\x1c\x43reateNativeDashboardRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12I\n\x10native_dashboard\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x02\"\x9e\x01\n\x19GetNativeDashboardRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12\x41\n\x04view\x18\x02 \x01(\x0e\x32..google.cloud.chronicle.v1.NativeDashboardViewB\x03\xe0\x41\x01\"\xd3\x01\n\x1bListNativeDashboardsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x04view\x18\x04 \x01(\x0e\x32..google.cloud.chronicle.v1.NativeDashboardViewB\x03\xe0\x41\x01\"~\n\x1cListNativeDashboardsResponse\x12\x45\n\x11native_dashboards\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9f\x01\n\x1cUpdateNativeDashboardRequest\x12I\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xac\x01\n\x1f\x44uplicateNativeDashboardRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12I\n\x10native_dashboard\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x02\"^\n\x1c\x44\x65leteNativeDashboardRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\"\xc6\x02\n\x0f\x41\x64\x64\x43hartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12G\n\x0f\x64\x61shboard_query\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x01\x12G\n\x0f\x64\x61shboard_chart\x18\x03 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChartB\x03\xe0\x41\x02\x12\x61\n\x0c\x63hart_layout\x18\x04 \x01(\x0b\x32\x46.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayoutB\x03\xe0\x41\x02\"\x9c\x01\n\x10\x41\x64\x64\x43hartResponse\x12\x44\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x42\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChart\"\xe4\x02\n\x10\x45\x64itChartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12G\n\x0f\x64\x61shboard_query\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x01\x12G\n\x0f\x64\x61shboard_chart\x18\x03 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChartB\x03\xe0\x41\x01\x12\x32\n\tedit_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12J\n\x11language_features\x18\x05 \x03(\x0e\x32*.google.cloud.chronicle.v1.LanguageFeatureB\x03\xe0\x41\x01\"\x9d\x01\n\x11\x45\x64itChartResponse\x12\x44\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x42\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChart\"\x9e\x01\n\x12RemoveChartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12H\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"\xa1\x01\n\x15\x44uplicateChartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12H\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"\xa2\x01\n\x16\x44uplicateChartResponse\x12\x44\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x42\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChart\"\\\n\x11\x44\x61shboardUserData\x12\x34\n\x10last_viewed_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\tis_pinned\x18\x02 \x01(\x08\"\xf3\x03\n\x13\x44\x61shboardDefinition\x12;\n\x07\x66ilters\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DashboardFilter\x12\x13\n\x0b\x66ingerprint\x18\x02 \x01(\t\x12J\n\x06\x63harts\x18\x04 \x03(\x0b\x32:.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig\x1a\xbd\x02\n\x0b\x43hartConfig\x12H\n\x0f\x64\x61shboard_chart\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\x12\\\n\x0c\x63hart_layout\x18\x02 \x01(\x0b\x32\x46.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout\x12\x13\n\x0b\x66ilters_ids\x18\x04 \x03(\t\x1aq\n\x0b\x43hartLayout\x12\x14\n\x07start_x\x18\t \x01(\x05H\x00\x88\x01\x01\x12\x0e\n\x06span_x\x18\n \x01(\x05\x12\x14\n\x07start_y\x18\x0b \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06span_y\x18\x0c \x01(\x05\x42\n\n\x08_start_xB\n\n\x08_start_y*r\n\rDashboardType\x12\x1e\n\x1a\x44\x41SHBOARD_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43URATED\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\x12\n\n\x06PUBLIC\x10\x03\x12\n\n\x06\x43USTOM\x10\x04\x12\x0f\n\x0bMARKETPLACE\x10\x05*`\n\x0f\x44\x61shboardAccess\x12 \n\x1c\x44\x41SHBOARD_ACCESS_UNSPECIFIED\x10\x00\x12\x15\n\x11\x44\x41SHBOARD_PRIVATE\x10\x01\x12\x14\n\x10\x44\x41SHBOARD_PUBLIC\x10\x02*}\n\x13NativeDashboardView\x12%\n!NATIVE_DASHBOARD_VIEW_UNSPECIFIED\x10\x00\x12\x1f\n\x1bNATIVE_DASHBOARD_VIEW_BASIC\x10\x01\x12\x1e\n\x1aNATIVE_DASHBOARD_VIEW_FULL\x10\x02\x32\x86\x17\n\x16NativeDashboardService\x12\xf2\x01\n\x15\x43reateNativeDashboard\x12\x37.google.cloud.chronicle.v1.CreateNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"t\xda\x41\x17parent,native_dashboard\x82\xd3\xe4\x93\x02T\"@/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:\x10native_dashboard\x12\xc7\x01\n\x12GetNativeDashboard\x12\x34.google.cloud.chronicle.v1.GetNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}\x12\xda\x01\n\x14ListNativeDashboards\x12\x36.google.cloud.chronicle.v1.ListNativeDashboardsRequest\x1a\x37.google.cloud.chronicle.v1.ListNativeDashboardsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards\x12\x89\x02\n\x15UpdateNativeDashboard\x12\x37.google.cloud.chronicle.v1.UpdateNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"\x8a\x01\xda\x41\x1cnative_dashboard,update_mask\x82\xd3\xe4\x93\x02\x65\x32Q/v1/{native_dashboard.name=projects/*/locations/*/instances/*/nativeDashboards/*}:\x10native_dashboard\x12\xf2\x01\n\x18\x44uplicateNativeDashboard\x12:.google.cloud.chronicle.v1.DuplicateNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"n\xda\x41\x16name, native_dashboard\x82\xd3\xe4\x93\x02O\"J/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:duplicate:\x01*\x12\xb9\x01\n\x15\x44\x65leteNativeDashboard\x12\x37.google.cloud.chronicle.v1.DeleteNativeDashboardRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}\x12\xe2\x01\n\x08\x41\x64\x64\x43hart\x12*.google.cloud.chronicle.v1.AddChartRequest\x1a+.google.cloud.chronicle.v1.AddChartResponse\"}\xda\x41&name, dashboard_query, dashboard_chart\x82\xd3\xe4\x93\x02N\"I/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:addChart:\x01*\x12\xc8\x01\n\x0bRemoveChart\x12-.google.cloud.chronicle.v1.RemoveChartRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"^\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:removeChart:\x01*\x12\xf2\x01\n\tEditChart\x12+.google.cloud.chronicle.v1.EditChartRequest\x1a,.google.cloud.chronicle.v1.EditChartResponse\"\x89\x01\xda\x41\x31name, dashboard_query, dashboard_chart, edit_mask\x82\xd3\xe4\x93\x02O\"J/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:editChart:\x01*\x12\xd8\x01\n\x0e\x44uplicateChart\x12\x30.google.cloud.chronicle.v1.DuplicateChartRequest\x1a\x31.google.cloud.chronicle.v1.DuplicateChartResponse\"a\xda\x41\x04name\x82\xd3\xe4\x93\x02T\"O/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:duplicateChart:\x01*\x12\xf1\x01\n\x16\x45xportNativeDashboards\x12\x38.google.cloud.chronicle.v1.ExportNativeDashboardsRequest\x1a\x39.google.cloud.chronicle.v1.ExportNativeDashboardsResponse\"b\xda\x41\rparent, names\x82\xd3\xe4\x93\x02L\"G/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:export:\x01*\x12\xf1\x01\n\x16ImportNativeDashboards\x12\x38.google.cloud.chronicle.v1.ImportNativeDashboardsRequest\x1a\x39.google.cloud.chronicle.v1.ImportNativeDashboardsResponse\"b\xda\x41\rparent,source\x82\xd3\xe4\x93\x02L\"G/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:import:\x01*\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xcb\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x14NativeDashboardProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + ExportNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExportNativeDashboardsRequest").msgclass + ExportNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExportNativeDashboardsResponse").msgclass + InlineDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InlineDestination").msgclass + NativeDashboardWithChartsAndQueries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries").msgclass + ImportNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportNativeDashboardsRequest").msgclass + ImportNativeDashboardsInlineSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportNativeDashboardsInlineSource").msgclass + ImportNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportNativeDashboardsResponse").msgclass + ImportExportStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportExportStatus").msgclass + NativeDashboard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.NativeDashboard").msgclass + CreateNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateNativeDashboardRequest").msgclass + GetNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetNativeDashboardRequest").msgclass + ListNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListNativeDashboardsRequest").msgclass + ListNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListNativeDashboardsResponse").msgclass + UpdateNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateNativeDashboardRequest").msgclass + DuplicateNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DuplicateNativeDashboardRequest").msgclass + DeleteNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteNativeDashboardRequest").msgclass + AddChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AddChartRequest").msgclass + AddChartResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AddChartResponse").msgclass + EditChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.EditChartRequest").msgclass + EditChartResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.EditChartResponse").msgclass + RemoveChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RemoveChartRequest").msgclass + DuplicateChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DuplicateChartRequest").msgclass + DuplicateChartResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DuplicateChartResponse").msgclass + DashboardUserData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardUserData").msgclass + DashboardDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardDefinition").msgclass + DashboardDefinition::ChartConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardDefinition.ChartConfig").msgclass + DashboardDefinition::ChartConfig::ChartLayout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout").msgclass + DashboardType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardType").enummodule + DashboardAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardAccess").enummodule + NativeDashboardView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.NativeDashboardView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb new file mode 100644 index 000000000000..f3a0d86312bc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/native_dashboard_service/credentials" +require "google/cloud/chronicle/v1/native_dashboard_service/paths" +require "google/cloud/chronicle/v1/native_dashboard_service/client" +require "google/cloud/chronicle/v1/native_dashboard_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing native dashboards. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/native_dashboard_service" + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/native_dashboard_service/rest" + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + module NativeDashboardService + end + end + end + end +end + +helper_path = ::File.join __dir__, "native_dashboard_service", "helpers.rb" +require "google/cloud/chronicle/v1/native_dashboard_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb new file mode 100644 index 000000000000..4c00e3fd8a9d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb @@ -0,0 +1,1611 @@ +# 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/chronicle/v1/native_dashboard_pb" + +module Google + module Cloud + module Chronicle + module V1 + module NativeDashboardService + ## + # Client for the NativeDashboardService service. + # + # A service providing functionality for managing native dashboards. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :native_dashboard_service_stub + + ## + # Configure the NativeDashboardService Client class. + # + # See {::Google::Cloud::Chronicle::V1::NativeDashboardService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NativeDashboardService clients + # ::Google::Cloud::Chronicle::V1::NativeDashboardService::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", "Chronicle", "V1"] + 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_native_dashboard.timeout = 60.0 + + default_config.rpcs.get_native_dashboard.timeout = 60.0 + default_config.rpcs.get_native_dashboard.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_native_dashboards.timeout = 60.0 + default_config.rpcs.list_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_native_dashboard.timeout = 60.0 + + default_config.rpcs.duplicate_native_dashboard.timeout = 60.0 + + default_config.rpcs.delete_native_dashboard.timeout = 60.0 + + default_config.rpcs.add_chart.timeout = 60.0 + + default_config.rpcs.remove_chart.timeout = 60.0 + + default_config.rpcs.edit_chart.timeout = 60.0 + + default_config.rpcs.duplicate_chart.timeout = 60.0 + + default_config.rpcs.export_native_dashboards.timeout = 60.0 + default_config.rpcs.export_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.import_native_dashboards.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::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 + @native_dashboard_service_stub.universe_domain + end + + ## + # Create a new NativeDashboardService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NativeDashboardService 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/chronicle/v1/native_dashboard_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 + + @native_dashboard_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::NativeDashboardService::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 + ) + + @native_dashboard_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @native_dashboard_service_stub.logger + end + + # Service calls + + ## + # Create a dashboard. + # + # @overload create_native_dashboard(request, options = nil) + # Pass arguments to `create_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, ::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_native_dashboard(parent: nil, native_dashboard: nil) + # Pass arguments to `create_native_dashboard` 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 parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. The dashboard to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new + # + # # Call the create_native_dashboard method. + # result = client.create_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def create_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :create_native_dashboard, 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 + + ## + # Get a dashboard. + # + # @overload get_native_dashboard(request, options = nil) + # Pass arguments to `get_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, ::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_native_dashboard(name: nil, view: nil) + # Pass arguments to `get_native_dashboard` 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 dashboard name to fetch. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new + # + # # Call the get_native_dashboard method. + # result = client.get_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def get_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :get_native_dashboard, 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 + + ## + # List all dashboards. + # + # @overload list_native_dashboards(request, options = nil) + # Pass arguments to `list_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, ::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_native_dashboards(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_native_dashboards` 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 parent owning this dashboard collection. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param page_size [::Integer] + # Optional. The maximum number of dashboards to return. The service may + # return fewer than this value. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDashboards` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDashboards` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new + # + # # Call the list_native_dashboards method. + # result = client.list_native_dashboards 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::Chronicle::V1::NativeDashboard. + # p item + # end + # + def list_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :list_native_dashboards, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @native_dashboard_service_stub, :list_native_dashboards, 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 + + ## + # Update a dashboard. + # + # @overload update_native_dashboard(request, options = nil) + # Pass arguments to `update_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, ::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_native_dashboard(native_dashboard: nil, update_mask: nil) + # Pass arguments to `update_native_dashboard` 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 native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. The dashboard to update. + # + # The dashboard's `name` field is used to identify the dashboard to update. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. LINT.IfChange(update_mask_values) + # The list of fields to update. + # Supported paths are - + # display_name + # description + # definition.filters + # definition.charts + # type + # access + # dashboard_user_data.is_pinned + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new + # + # # Call the update_native_dashboard method. + # result = client.update_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def update_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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.native_dashboard&.name + header_params["native_dashboard.name"] = request.native_dashboard.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_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :update_native_dashboard, 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 + + ## + # Duplicate a dashboard. + # + # @overload duplicate_native_dashboard(request, options = nil) + # Pass arguments to `duplicate_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, ::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 duplicate_native_dashboard(name: nil, native_dashboard: nil) + # Pass arguments to `duplicate_native_dashboard` 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 dashboard name to duplicate. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. Any fields that need modification can be passed through this like + # name, description etc. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new + # + # # Call the duplicate_native_dashboard method. + # result = client.duplicate_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def duplicate_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest + + # 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.duplicate_native_dashboard.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::Chronicle::V1::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.duplicate_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.duplicate_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :duplicate_native_dashboard, 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 + + ## + # Delete a dashboard. + # + # @overload delete_native_dashboard(request, options = nil) + # Pass arguments to `delete_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, ::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_native_dashboard(name: nil) + # Pass arguments to `delete_native_dashboard` 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 dashboard name to delete. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new + # + # # Call the delete_native_dashboard method. + # result = client.delete_native_dashboard request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :delete_native_dashboard, 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 + + ## + # Add chart in a dashboard. + # + # @overload add_chart(request, options = nil) + # Pass arguments to `add_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::AddChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::AddChartRequest, ::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 add_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, chart_layout: nil) + # Pass arguments to `add_chart` 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 dashboard name to add chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Optional. Query used to create the chart. + # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] + # Required. Chart to be added to the dashboard. + # @param chart_layout [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout, ::Hash] + # Required. ChartLayout for newly added chart. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::AddChartResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::AddChartResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::AddChartRequest.new + # + # # Call the add_chart method. + # result = client.add_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::AddChartResponse. + # p result + # + def add_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::AddChartRequest + + # 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.add_chart.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::Chronicle::V1::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.add_chart.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :add_chart, 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 + + ## + # Remove chart from a dashboard. + # + # @overload remove_chart(request, options = nil) + # Pass arguments to `remove_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::RemoveChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::RemoveChartRequest, ::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 remove_chart(name: nil, dashboard_chart: nil) + # Pass arguments to `remove_chart` 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 dashboard name to remove chart from. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_chart [::String] + # Required. The dashboard chart name to remove. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::RemoveChartRequest.new + # + # # Call the remove_chart method. + # result = client.remove_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def remove_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::RemoveChartRequest + + # 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.remove_chart.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::Chronicle::V1::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.remove_chart.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :remove_chart, 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 + + ## + # Edit chart in a dashboard. + # + # @overload edit_chart(request, options = nil) + # Pass arguments to `edit_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::EditChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::EditChartRequest, ::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 edit_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, edit_mask: nil, language_features: nil) + # Pass arguments to `edit_chart` 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 dashboard name to edit chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Optional. Query for the edited chart. + # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] + # Optional. Edited chart. + # @param edit_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to edit for chart and query. + # Supported paths in chart are - + # dashboard_chart.display_name + # dashboard_chart.description + # dashboard_chart.chart_datasource.data_sources + # dashboard_chart.visualization + # dashboard_chart.visualization.button + # dashboard_chart.visualization.markdown + # dashboard_chart.drill_down_config + # Supported paths in query are - + # dashboard_query.query + # dashboard_query.input + # @param language_features [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] + # Optional. Language Features present in the query. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::EditChartResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::EditChartResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::EditChartRequest.new + # + # # Call the edit_chart method. + # result = client.edit_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::EditChartResponse. + # p result + # + def edit_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::EditChartRequest + + # 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.edit_chart.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::Chronicle::V1::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.edit_chart.timeout, + metadata: metadata, + retry_policy: @config.rpcs.edit_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :edit_chart, 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 + + ## + # Duplicate chart in a dashboard. + # + # @overload duplicate_chart(request, options = nil) + # Pass arguments to `duplicate_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DuplicateChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DuplicateChartRequest, ::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 duplicate_chart(name: nil, dashboard_chart: nil) + # Pass arguments to `duplicate_chart` 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 dashboard name that involves chart duplication. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_chart [::String] + # Required. The dashboard chart name to duplicate. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DuplicateChartRequest.new + # + # # Call the duplicate_chart method. + # result = client.duplicate_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DuplicateChartResponse. + # p result + # + def duplicate_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateChartRequest + + # 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.duplicate_chart.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::Chronicle::V1::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.duplicate_chart.timeout, + metadata: metadata, + retry_policy: @config.rpcs.duplicate_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :duplicate_chart, 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 + + ## + # Exports the dashboards. + # + # @overload export_native_dashboards(request, options = nil) + # Pass arguments to `export_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, names: nil) + # Pass arguments to `export_native_dashboards` 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 parent resource that the dashboards to be exported belong to. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param names [::Array<::String>] + # Required. The resource names of the dashboards to export. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new + # + # # Call the export_native_dashboards method. + # result = client.export_native_dashboards request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse. + # p result + # + def export_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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.export_native_dashboards.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :export_native_dashboards, 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 + + ## + # Imports the dashboards. + # + # @overload import_native_dashboards(request, options = nil) + # Pass arguments to `import_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, source: nil) + # Pass arguments to `import_native_dashboards` 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 parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param source [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource, ::Hash] + # Required. The data will imported from this proto. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new + # + # # Call the import_native_dashboards method. + # result = client.import_native_dashboards request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse. + # p result + # + def import_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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.import_native_dashboards.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.call_rpc :import_native_dashboards, 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 + + ## + # Configuration class for the NativeDashboardService API. + # + # This class represents the configuration for NativeDashboardService, + # 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::Chronicle::V1::NativeDashboardService::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_native_dashboard to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_native_dashboard.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_native_dashboard.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::Chronicle::V1::NativeDashboardService::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. + # * `: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 = "chronicle.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 NativeDashboardService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :create_native_dashboard + ## + # RPC-specific configuration for `get_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :get_native_dashboard + ## + # RPC-specific configuration for `list_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :list_native_dashboards + ## + # RPC-specific configuration for `update_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :update_native_dashboard + ## + # RPC-specific configuration for `duplicate_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :duplicate_native_dashboard + ## + # RPC-specific configuration for `delete_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_native_dashboard + ## + # RPC-specific configuration for `add_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :add_chart + ## + # RPC-specific configuration for `remove_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_chart + ## + # RPC-specific configuration for `edit_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :edit_chart + ## + # RPC-specific configuration for `duplicate_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :duplicate_chart + ## + # RPC-specific configuration for `export_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :export_native_dashboards + ## + # RPC-specific configuration for `import_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :import_native_dashboards + + # @private + def initialize parent_rpcs = nil + create_native_dashboard_config = parent_rpcs.create_native_dashboard if parent_rpcs.respond_to? :create_native_dashboard + @create_native_dashboard = ::Gapic::Config::Method.new create_native_dashboard_config + get_native_dashboard_config = parent_rpcs.get_native_dashboard if parent_rpcs.respond_to? :get_native_dashboard + @get_native_dashboard = ::Gapic::Config::Method.new get_native_dashboard_config + list_native_dashboards_config = parent_rpcs.list_native_dashboards if parent_rpcs.respond_to? :list_native_dashboards + @list_native_dashboards = ::Gapic::Config::Method.new list_native_dashboards_config + update_native_dashboard_config = parent_rpcs.update_native_dashboard if parent_rpcs.respond_to? :update_native_dashboard + @update_native_dashboard = ::Gapic::Config::Method.new update_native_dashboard_config + duplicate_native_dashboard_config = parent_rpcs.duplicate_native_dashboard if parent_rpcs.respond_to? :duplicate_native_dashboard + @duplicate_native_dashboard = ::Gapic::Config::Method.new duplicate_native_dashboard_config + delete_native_dashboard_config = parent_rpcs.delete_native_dashboard if parent_rpcs.respond_to? :delete_native_dashboard + @delete_native_dashboard = ::Gapic::Config::Method.new delete_native_dashboard_config + add_chart_config = parent_rpcs.add_chart if parent_rpcs.respond_to? :add_chart + @add_chart = ::Gapic::Config::Method.new add_chart_config + remove_chart_config = parent_rpcs.remove_chart if parent_rpcs.respond_to? :remove_chart + @remove_chart = ::Gapic::Config::Method.new remove_chart_config + edit_chart_config = parent_rpcs.edit_chart if parent_rpcs.respond_to? :edit_chart + @edit_chart = ::Gapic::Config::Method.new edit_chart_config + duplicate_chart_config = parent_rpcs.duplicate_chart if parent_rpcs.respond_to? :duplicate_chart + @duplicate_chart = ::Gapic::Config::Method.new duplicate_chart_config + export_native_dashboards_config = parent_rpcs.export_native_dashboards if parent_rpcs.respond_to? :export_native_dashboards + @export_native_dashboards = ::Gapic::Config::Method.new export_native_dashboards_config + import_native_dashboards_config = parent_rpcs.import_native_dashboards if parent_rpcs.respond_to? :import_native_dashboards + @import_native_dashboards = ::Gapic::Config::Method.new import_native_dashboards_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb new file mode 100644 index 000000000000..ac3f7512afa5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb @@ -0,0 +1,49 @@ +# 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 Chronicle + module V1 + module NativeDashboardService + # Credentials for the NativeDashboardService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/chronicle", + "https://www.googleapis.com/auth/chronicle.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb new file mode 100644 index 000000000000..0b8f9b39f7ea --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb @@ -0,0 +1,115 @@ +# 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 Chronicle + module V1 + module NativeDashboardService + # Path helper methods for the NativeDashboardService API. + module Paths + ## + # Create a fully-qualified DashboardChart resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param chart [String] + # + # @return [::String] + def dashboard_chart_path project:, location:, instance:, chart: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" + end + + ## + # Create a fully-qualified DashboardQuery resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param query [String] + # + # @return [::String] + def dashboard_query_path project:, location:, instance:, query: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardQueries/#{query}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified NativeDashboard resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param dashboard [String] + # + # @return [::String] + def native_dashboard_path project:, location:, instance:, dashboard: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/nativeDashboards/#{dashboard}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb new file mode 100644 index 000000000000..2a050c29ca53 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/native_dashboard_service/credentials" +require "google/cloud/chronicle/v1/native_dashboard_service/paths" +require "google/cloud/chronicle/v1/native_dashboard_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # A service providing functionality for managing native dashboards. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/native_dashboard_service/rest" + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + module NativeDashboardService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/native_dashboard_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb new file mode 100644 index 000000000000..0445e075d588 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb @@ -0,0 +1,1484 @@ +# 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/chronicle/v1/native_dashboard_pb" +require "google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module NativeDashboardService + module Rest + ## + # REST client for the NativeDashboardService service. + # + # A service providing functionality for managing native dashboards. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :native_dashboard_service_stub + + ## + # Configure the NativeDashboardService Client class. + # + # See {::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all NativeDashboardService clients + # ::Google::Cloud::Chronicle::V1::NativeDashboardService::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", "Chronicle", "V1"] + 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_native_dashboard.timeout = 60.0 + + default_config.rpcs.get_native_dashboard.timeout = 60.0 + default_config.rpcs.get_native_dashboard.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_native_dashboards.timeout = 60.0 + default_config.rpcs.list_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_native_dashboard.timeout = 60.0 + + default_config.rpcs.duplicate_native_dashboard.timeout = 60.0 + + default_config.rpcs.delete_native_dashboard.timeout = 60.0 + + default_config.rpcs.add_chart.timeout = 60.0 + + default_config.rpcs.remove_chart.timeout = 60.0 + + default_config.rpcs.edit_chart.timeout = 60.0 + + default_config.rpcs.duplicate_chart.timeout = 60.0 + + default_config.rpcs.export_native_dashboards.timeout = 60.0 + default_config.rpcs.export_native_dashboards.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.import_native_dashboards.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::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 + @native_dashboard_service_stub.universe_domain + end + + ## + # Create a new NativeDashboardService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the NativeDashboardService 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 + + @native_dashboard_service_stub = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @native_dashboard_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @native_dashboard_service_stub.logger + end + + # Service calls + + ## + # Create a dashboard. + # + # @overload create_native_dashboard(request, options = nil) + # Pass arguments to `create_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, ::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_native_dashboard(parent: nil, native_dashboard: nil) + # Pass arguments to `create_native_dashboard` 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 parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. The dashboard to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new + # + # # Call the create_native_dashboard method. + # result = client.create_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def create_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.create_native_dashboard 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 + + ## + # Get a dashboard. + # + # @overload get_native_dashboard(request, options = nil) + # Pass arguments to `get_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, ::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_native_dashboard(name: nil, view: nil) + # Pass arguments to `get_native_dashboard` 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 dashboard name to fetch. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new + # + # # Call the get_native_dashboard method. + # result = client.get_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def get_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.get_native_dashboard 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 + + ## + # List all dashboards. + # + # @overload list_native_dashboards(request, options = nil) + # Pass arguments to `list_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, ::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_native_dashboards(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_native_dashboards` 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 parent owning this dashboard collection. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param page_size [::Integer] + # Optional. The maximum number of dashboards to return. The service may + # return fewer than this value. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDashboards` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDashboards` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new + # + # # Call the list_native_dashboards method. + # result = client.list_native_dashboards 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::Chronicle::V1::NativeDashboard. + # p item + # end + # + def list_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.list_native_dashboards request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @native_dashboard_service_stub, :list_native_dashboards, "native_dashboards", 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 + + ## + # Update a dashboard. + # + # @overload update_native_dashboard(request, options = nil) + # Pass arguments to `update_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, ::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_native_dashboard(native_dashboard: nil, update_mask: nil) + # Pass arguments to `update_native_dashboard` 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 native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. The dashboard to update. + # + # The dashboard's `name` field is used to identify the dashboard to update. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. LINT.IfChange(update_mask_values) + # The list of fields to update. + # Supported paths are - + # display_name + # description + # definition.filters + # definition.charts + # type + # access + # dashboard_user_data.is_pinned + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new + # + # # Call the update_native_dashboard method. + # result = client.update_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def update_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.update_native_dashboard 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 + + ## + # Duplicate a dashboard. + # + # @overload duplicate_native_dashboard(request, options = nil) + # Pass arguments to `duplicate_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, ::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 duplicate_native_dashboard(name: nil, native_dashboard: nil) + # Pass arguments to `duplicate_native_dashboard` 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 dashboard name to duplicate. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] + # Required. Any fields that need modification can be passed through this like + # name, description etc. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new + # + # # Call the duplicate_native_dashboard method. + # result = client.duplicate_native_dashboard request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def duplicate_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest + + # 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.duplicate_native_dashboard.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::Chronicle::V1::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.duplicate_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.duplicate_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.duplicate_native_dashboard 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 + + ## + # Delete a dashboard. + # + # @overload delete_native_dashboard(request, options = nil) + # Pass arguments to `delete_native_dashboard` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, ::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_native_dashboard(name: nil) + # Pass arguments to `delete_native_dashboard` 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 dashboard name to delete. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new + # + # # Call the delete_native_dashboard method. + # result = client.delete_native_dashboard request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_native_dashboard request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest + + # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_native_dashboard.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.delete_native_dashboard 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 + + ## + # Add chart in a dashboard. + # + # @overload add_chart(request, options = nil) + # Pass arguments to `add_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::AddChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::AddChartRequest, ::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 add_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, chart_layout: nil) + # Pass arguments to `add_chart` 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 dashboard name to add chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Optional. Query used to create the chart. + # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] + # Required. Chart to be added to the dashboard. + # @param chart_layout [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout, ::Hash] + # Required. ChartLayout for newly added chart. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::AddChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::AddChartResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::AddChartRequest.new + # + # # Call the add_chart method. + # result = client.add_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::AddChartResponse. + # p result + # + def add_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::AddChartRequest + + # 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.add_chart.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::Chronicle::V1::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.add_chart.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.add_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.add_chart 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 + + ## + # Remove chart from a dashboard. + # + # @overload remove_chart(request, options = nil) + # Pass arguments to `remove_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::RemoveChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::RemoveChartRequest, ::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 remove_chart(name: nil, dashboard_chart: nil) + # Pass arguments to `remove_chart` 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 dashboard name to remove chart from. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_chart [::String] + # Required. The dashboard chart name to remove. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::RemoveChartRequest.new + # + # # Call the remove_chart method. + # result = client.remove_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + # p result + # + def remove_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::RemoveChartRequest + + # 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.remove_chart.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::Chronicle::V1::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.remove_chart.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.remove_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.remove_chart 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 + + ## + # Edit chart in a dashboard. + # + # @overload edit_chart(request, options = nil) + # Pass arguments to `edit_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::EditChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::EditChartRequest, ::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 edit_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, edit_mask: nil, language_features: nil) + # Pass arguments to `edit_chart` 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 dashboard name to edit chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] + # Optional. Query for the edited chart. + # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] + # Optional. Edited chart. + # @param edit_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to edit for chart and query. + # Supported paths in chart are - + # dashboard_chart.display_name + # dashboard_chart.description + # dashboard_chart.chart_datasource.data_sources + # dashboard_chart.visualization + # dashboard_chart.visualization.button + # dashboard_chart.visualization.markdown + # dashboard_chart.drill_down_config + # Supported paths in query are - + # dashboard_query.query + # dashboard_query.input + # @param language_features [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] + # Optional. Language Features present in the query. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::EditChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::EditChartResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::EditChartRequest.new + # + # # Call the edit_chart method. + # result = client.edit_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::EditChartResponse. + # p result + # + def edit_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::EditChartRequest + + # 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.edit_chart.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::Chronicle::V1::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.edit_chart.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.edit_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.edit_chart 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 + + ## + # Duplicate chart in a dashboard. + # + # @overload duplicate_chart(request, options = nil) + # Pass arguments to `duplicate_chart` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DuplicateChartRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DuplicateChartRequest, ::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 duplicate_chart(name: nil, dashboard_chart: nil) + # Pass arguments to `duplicate_chart` 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 dashboard name that involves chart duplication. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @param dashboard_chart [::String] + # Required. The dashboard chart name to duplicate. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DuplicateChartRequest.new + # + # # Call the duplicate_chart method. + # result = client.duplicate_chart request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DuplicateChartResponse. + # p result + # + def duplicate_chart request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateChartRequest + + # 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.duplicate_chart.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::Chronicle::V1::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.duplicate_chart.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.duplicate_chart.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.duplicate_chart 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 + + ## + # Exports the dashboards. + # + # @overload export_native_dashboards(request, options = nil) + # Pass arguments to `export_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, names: nil) + # Pass arguments to `export_native_dashboards` 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 parent resource that the dashboards to be exported belong to. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param names [::Array<::String>] + # Required. The resource names of the dashboards to export. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new + # + # # Call the export_native_dashboards method. + # result = client.export_native_dashboards request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse. + # p result + # + def export_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.export_native_dashboards 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 + + ## + # Imports the dashboards. + # + # @overload import_native_dashboards(request, options = nil) + # Pass arguments to `import_native_dashboards` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, source: nil) + # Pass arguments to `import_native_dashboards` 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 parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @param source [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource, ::Hash] + # Required. The data will imported from this proto. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new + # + # # Call the import_native_dashboards method. + # result = client.import_native_dashboards request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse. + # p result + # + def import_native_dashboards request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest + + # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_native_dashboards.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @native_dashboard_service_stub.import_native_dashboards 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 + + ## + # Configuration class for the NativeDashboardService REST API. + # + # This class represents the configuration for NativeDashboardService 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::Chronicle::V1::NativeDashboardService::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_native_dashboard to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_native_dashboard.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_native_dashboard.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. + # * `: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 = "chronicle.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 NativeDashboardService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :create_native_dashboard + ## + # RPC-specific configuration for `get_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :get_native_dashboard + ## + # RPC-specific configuration for `list_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :list_native_dashboards + ## + # RPC-specific configuration for `update_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :update_native_dashboard + ## + # RPC-specific configuration for `duplicate_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :duplicate_native_dashboard + ## + # RPC-specific configuration for `delete_native_dashboard` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_native_dashboard + ## + # RPC-specific configuration for `add_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :add_chart + ## + # RPC-specific configuration for `remove_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_chart + ## + # RPC-specific configuration for `edit_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :edit_chart + ## + # RPC-specific configuration for `duplicate_chart` + # @return [::Gapic::Config::Method] + # + attr_reader :duplicate_chart + ## + # RPC-specific configuration for `export_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :export_native_dashboards + ## + # RPC-specific configuration for `import_native_dashboards` + # @return [::Gapic::Config::Method] + # + attr_reader :import_native_dashboards + + # @private + def initialize parent_rpcs = nil + create_native_dashboard_config = parent_rpcs.create_native_dashboard if parent_rpcs.respond_to? :create_native_dashboard + @create_native_dashboard = ::Gapic::Config::Method.new create_native_dashboard_config + get_native_dashboard_config = parent_rpcs.get_native_dashboard if parent_rpcs.respond_to? :get_native_dashboard + @get_native_dashboard = ::Gapic::Config::Method.new get_native_dashboard_config + list_native_dashboards_config = parent_rpcs.list_native_dashboards if parent_rpcs.respond_to? :list_native_dashboards + @list_native_dashboards = ::Gapic::Config::Method.new list_native_dashboards_config + update_native_dashboard_config = parent_rpcs.update_native_dashboard if parent_rpcs.respond_to? :update_native_dashboard + @update_native_dashboard = ::Gapic::Config::Method.new update_native_dashboard_config + duplicate_native_dashboard_config = parent_rpcs.duplicate_native_dashboard if parent_rpcs.respond_to? :duplicate_native_dashboard + @duplicate_native_dashboard = ::Gapic::Config::Method.new duplicate_native_dashboard_config + delete_native_dashboard_config = parent_rpcs.delete_native_dashboard if parent_rpcs.respond_to? :delete_native_dashboard + @delete_native_dashboard = ::Gapic::Config::Method.new delete_native_dashboard_config + add_chart_config = parent_rpcs.add_chart if parent_rpcs.respond_to? :add_chart + @add_chart = ::Gapic::Config::Method.new add_chart_config + remove_chart_config = parent_rpcs.remove_chart if parent_rpcs.respond_to? :remove_chart + @remove_chart = ::Gapic::Config::Method.new remove_chart_config + edit_chart_config = parent_rpcs.edit_chart if parent_rpcs.respond_to? :edit_chart + @edit_chart = ::Gapic::Config::Method.new edit_chart_config + duplicate_chart_config = parent_rpcs.duplicate_chart if parent_rpcs.respond_to? :duplicate_chart + @duplicate_chart = ::Gapic::Config::Method.new duplicate_chart_config + export_native_dashboards_config = parent_rpcs.export_native_dashboards if parent_rpcs.respond_to? :export_native_dashboards + @export_native_dashboards = ::Gapic::Config::Method.new export_native_dashboards_config + import_native_dashboards_config = parent_rpcs.import_native_dashboards if parent_rpcs.respond_to? :import_native_dashboards + @import_native_dashboards = ::Gapic::Config::Method.new import_native_dashboards_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb new file mode 100644 index 000000000000..86cf453f442d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb @@ -0,0 +1,822 @@ +# 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/chronicle/v1/native_dashboard_pb" + +module Google + module Cloud + module Chronicle + module V1 + module NativeDashboardService + module Rest + ## + # REST service stub for the NativeDashboardService 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_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest] + # 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::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # A result object deserialized from the server's reply + def create_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_native_dashboard_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_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::NativeDashboard.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_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest] + # 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::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # A result object deserialized from the server's reply + def get_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_native_dashboard_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_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::NativeDashboard.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_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest] + # 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::Chronicle::V1::ListNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse] + # A result object deserialized from the server's reply + def list_native_dashboards request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_native_dashboards_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_native_dashboards", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse.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_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest] + # 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::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # A result object deserialized from the server's reply + def update_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_native_dashboard_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_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::NativeDashboard.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the duplicate_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest] + # 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::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # A result object deserialized from the server's reply + def duplicate_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_duplicate_native_dashboard_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: "duplicate_native_dashboard", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::NativeDashboard.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_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest] + # 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_native_dashboard request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_native_dashboard_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_native_dashboard", + 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 add_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::AddChartRequest] + # 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::Chronicle::V1::AddChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::AddChartResponse] + # A result object deserialized from the server's reply + def add_chart request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_add_chart_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: "add_chart", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::AddChartResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the remove_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::RemoveChartRequest] + # 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::Chronicle::V1::NativeDashboard] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # A result object deserialized from the server's reply + def remove_chart request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_remove_chart_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: "remove_chart", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::NativeDashboard.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the edit_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::EditChartRequest] + # 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::Chronicle::V1::EditChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::EditChartResponse] + # A result object deserialized from the server's reply + def edit_chart request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_edit_chart_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: "edit_chart", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::EditChartResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the duplicate_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateChartRequest] + # 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::Chronicle::V1::DuplicateChartResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] + # A result object deserialized from the server's reply + def duplicate_chart request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_duplicate_chart_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: "duplicate_chart", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DuplicateChartResponse.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_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest] + # 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::Chronicle::V1::ExportNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] + # A result object deserialized from the server's reply + def export_native_dashboards request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_native_dashboards_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_native_dashboards", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse.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_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest] + # 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::Chronicle::V1::ImportNativeDashboardsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] + # A result object deserialized from the server's reply + def import_native_dashboards request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_native_dashboards_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_native_dashboards", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse.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_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest] + # 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_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/nativeDashboards", + body: "native_dashboard", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest] + # 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_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest] + # 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_native_dashboards_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/nativeDashboards", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest] + # 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_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{native_dashboard.name}", + body: "native_dashboard", + matches: [ + ["native_dashboard.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the duplicate_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_duplicate_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:duplicate", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_native_dashboard REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest] + # 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_native_dashboard_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the add_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::AddChartRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_add_chart_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:addChart", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the remove_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::RemoveChartRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_remove_chart_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:removeChart", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the edit_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::EditChartRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_edit_chart_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:editChart", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the duplicate_chart REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateChartRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_duplicate_chart_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:duplicateChart", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest] + # 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_native_dashboards_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/nativeDashboards:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_native_dashboards REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest] + # 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_native_dashboards_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/nativeDashboards:import", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb new file mode 100644 index 000000000000..c0256a88d967 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb @@ -0,0 +1,67 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/native_dashboard.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# 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 +# +# 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/chronicle/v1/native_dashboard_pb' + +module Google + module Cloud + module Chronicle + module V1 + module NativeDashboardService + # A service providing functionality for managing native dashboards. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.NativeDashboardService' + + # Create a dashboard. + rpc :CreateNativeDashboard, ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard + # Get a dashboard. + rpc :GetNativeDashboard, ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard + # List all dashboards. + rpc :ListNativeDashboards, ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse + # Update a dashboard. + rpc :UpdateNativeDashboard, ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard + # Duplicate a dashboard. + rpc :DuplicateNativeDashboard, ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard + # Delete a dashboard. + rpc :DeleteNativeDashboard, ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, ::Google::Protobuf::Empty + # Add chart in a dashboard. + rpc :AddChart, ::Google::Cloud::Chronicle::V1::AddChartRequest, ::Google::Cloud::Chronicle::V1::AddChartResponse + # Remove chart from a dashboard. + rpc :RemoveChart, ::Google::Cloud::Chronicle::V1::RemoveChartRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard + # Edit chart in a dashboard. + rpc :EditChart, ::Google::Cloud::Chronicle::V1::EditChartRequest, ::Google::Cloud::Chronicle::V1::EditChartResponse + # Duplicate chart in a dashboard. + rpc :DuplicateChart, ::Google::Cloud::Chronicle::V1::DuplicateChartRequest, ::Google::Cloud::Chronicle::V1::DuplicateChartResponse + # Exports the dashboards. + rpc :ExportNativeDashboards, ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse + # Imports the dashboards. + rpc :ImportNativeDashboards, ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb new file mode 100644 index 000000000000..7cd0fc43edd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/reference_list.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/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/chronicle/v1/reference_list.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"]\n\tScopeInfo\x12P\n\x14reference_list_scope\x18\x02 \x01(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListScopeB\x03\xe0\x41\x02\".\n\x12ReferenceListScope\x12\x18\n\x0bscope_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x93\x01\n\x17GetReferenceListRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12:\n\x04view\x18\x02 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"\xbe\x01\n\x19ListReferenceListsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12:\n\x04view\x18\x04 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"x\n\x1aListReferenceListsResponse\x12\x41\n\x0freference_lists\x18\x01 \x03(\x0b\x32(.google.cloud.chronicle.v1.ReferenceList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1a\x43reateReferenceListRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x45\n\x0ereference_list\x18\x02 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12\x1e\n\x11reference_list_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1aUpdateReferenceListRequest\x12\x45\n\x0ereference_list\x18\x01 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xaa\x04\n\rReferenceList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07\x65ntries\x18\x05 \x03(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xe0\x41\x02\x12\x12\n\x05rules\x18\x06 \x03(\tB\x03\xe0\x41\x03\x12L\n\x0bsyntax_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xe0\x41\x02\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x38\n\nscope_info\x18\x0b \x01(\x0b\x32$.google.cloud.chronicle.v1.ScopeInfo:\x8a\x01\xea\x41\x86\x01\n&chronicle.googleapis.com/ReferenceList\x12\\projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}\"(\n\x12ReferenceListEntry\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02*\xc2\x01\n\x17ReferenceListSyntaxType\x12*\n&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\x10\x00\x12\x30\n,REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\x10\x01\x12$\n REFERENCE_LIST_SYNTAX_TYPE_REGEX\x10\x02\x12#\n\x1fREFERENCE_LIST_SYNTAX_TYPE_CIDR\x10\x03*u\n\x11ReferenceListView\x12#\n\x1fREFERENCE_LIST_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19REFERENCE_LIST_VIEW_BASIC\x10\x01\x12\x1c\n\x18REFERENCE_LIST_VIEW_FULL\x10\x02\x32\xf5\x07\n\x14ReferenceListService\x12\xbf\x01\n\x10GetReferenceList\x12\x32.google.cloud.chronicle.v1.GetReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\x12\xd2\x01\n\x12ListReferenceLists\x12\x34.google.cloud.chronicle.v1.ListReferenceListsRequest\x1a\x35.google.cloud.chronicle.v1.ListReferenceListsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/referenceLists\x12\xf9\x01\n\x13\x43reateReferenceList\x12\x35.google.cloud.chronicle.v1.CreateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x80\x01\xda\x41\'parent,reference_list,reference_list_id\x82\xd3\xe4\x93\x02P\">/v1/{parent=projects/*/locations/*/instances/*}/referenceLists:\x0ereference_list\x12\xfb\x01\n\x13UpdateReferenceList\x12\x35.google.cloud.chronicle.v1.UpdateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x82\x01\xda\x41\x1areference_list,update_mask\x82\xd3\xe4\x93\x02_2M/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}:\x0ereference_list\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc9\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x12ReferenceListProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + ScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ScopeInfo").msgclass + ReferenceListScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListScope").msgclass + GetReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetReferenceListRequest").msgclass + ListReferenceListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsRequest").msgclass + ListReferenceListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsResponse").msgclass + CreateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateReferenceListRequest").msgclass + UpdateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateReferenceListRequest").msgclass + ReferenceList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceList").msgclass + ReferenceListEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListEntry").msgclass + ReferenceListSyntaxType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListSyntaxType").enummodule + ReferenceListView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb new file mode 100644 index 000000000000..e88bb3a15142 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/reference_list_service/credentials" +require "google/cloud/chronicle/v1/reference_list_service/paths" +require "google/cloud/chronicle/v1/reference_list_service/client" +require "google/cloud/chronicle/v1/reference_list_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # ReferenceListService provides an interface for managing reference lists. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/reference_list_service" + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/reference_list_service/rest" + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + module ReferenceListService + end + end + end + end +end + +helper_path = ::File.join __dir__, "reference_list_service", "helpers.rb" +require "google/cloud/chronicle/v1/reference_list_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb new file mode 100644 index 000000000000..7472a7315b5a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb @@ -0,0 +1,809 @@ +# 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/chronicle/v1/reference_list_pb" + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + ## + # Client for the ReferenceListService service. + # + # ReferenceListService provides an interface for managing reference lists. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reference_list_service_stub + + ## + # Configure the ReferenceListService Client class. + # + # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReferenceListService clients + # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] + 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.get_reference_list.timeout = 60.0 + default_config.rpcs.get_reference_list.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_reference_lists.timeout = 60.0 + default_config.rpcs.list_reference_lists.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_reference_list.timeout = 60.0 + + default_config.rpcs.update_reference_list.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 + @reference_list_service_stub.universe_domain + end + + ## + # Create a new ReferenceListService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReferenceListService 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/chronicle/v1/reference_list_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 + + @reference_list_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::ReferenceListService::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 + ) + + @reference_list_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reference_list_service_stub.logger + end + + # Service calls + + ## + # Gets a single reference list. + # + # @overload get_reference_list(request, options = nil) + # Pass arguments to `get_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::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_reference_list(name: nil, view: nil) + # Pass arguments to `get_reference_list` 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 reference list to retrieve. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of the ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_FULL. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new + # + # # Call the get_reference_list method. + # result = client.get_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def get_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :get_reference_list, 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 a collection of reference lists. + # + # @overload list_reference_lists(request, options = nil) + # Pass arguments to `list_reference_lists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_reference_lists` 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 parent, which owns this collection of reference lists. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of reference lists to return. + # The service may return fewer than this value. + # If unspecified, at most 100 reference lists will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListReferenceLists` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListReferenceLists` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of each ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new + # + # # Call the list_reference_lists method. + # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. + # p item + # end + # + def list_reference_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest + + # 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_reference_lists.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::Chronicle::V1::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_reference_lists.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reference_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :list_reference_lists, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, 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 + + ## + # Creates a new reference list. + # + # @overload create_reference_list(request, options = nil) + # Pass arguments to `create_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) + # Pass arguments to `create_reference_list` 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 parent resource where this reference list will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to create. + # @param reference_list_id [::String] + # Required. The ID to use for the reference list. This is also the display + # name for the reference list. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Has length less than 256. + # - Must be unique. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new + # + # # Call the create_reference_list method. + # result = client.create_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def create_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :create_reference_list, 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 + + ## + # Updates an existing reference list. + # + # @overload update_reference_list(request, options = nil) + # Pass arguments to `update_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::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_reference_list(reference_list: nil, update_mask: nil) + # Pass arguments to `update_reference_list` 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 reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to update. + # + # The reference list's `name` field is used to identify the reference list to + # update. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # When no field mask is supplied, all non-empty fields will be updated. + # A field mask of "*" will update all fields, whether empty or not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new + # + # # Call the update_reference_list method. + # result = client.update_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def update_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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.reference_list&.name + header_params["reference_list.name"] = request.reference_list.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_reference_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :update_reference_list, 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 + + ## + # Configuration class for the ReferenceListService API. + # + # This class represents the configuration for ReferenceListService, + # 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::Chronicle::V1::ReferenceListService::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 + # # get_reference_list to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.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::Chronicle::V1::ReferenceListService::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. + # * `: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 = "chronicle.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 ReferenceListService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reference_list + ## + # RPC-specific configuration for `list_reference_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reference_lists + ## + # RPC-specific configuration for `create_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reference_list + ## + # RPC-specific configuration for `update_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :update_reference_list + + # @private + def initialize parent_rpcs = nil + get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list + @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config + list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists + @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config + create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list + @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config + update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list + @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb new file mode 100644 index 000000000000..bc9bb656539c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + module ReferenceListService + # Credentials for the ReferenceListService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb new file mode 100644 index 000000000000..0655f1b591bb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb @@ -0,0 +1,73 @@ +# 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 Chronicle + module V1 + module ReferenceListService + # Path helper methods for the ReferenceListService API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified ReferenceList resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param reference_list [String] + # + # @return [::String] + def reference_list_path project:, location:, instance:, reference_list: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb new file mode 100644 index 000000000000..72c3da5feecc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb @@ -0,0 +1,52 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/reference_list_service/credentials" +require "google/cloud/chronicle/v1/reference_list_service/paths" +require "google/cloud/chronicle/v1/reference_list_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # ReferenceListService provides an interface for managing reference lists. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/reference_list_service/rest" + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + module ReferenceListService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/reference_list_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb new file mode 100644 index 000000000000..31d0d82a8c4c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb @@ -0,0 +1,738 @@ +# 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/chronicle/v1/reference_list_pb" +require "google/cloud/chronicle/v1/reference_list_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + module Rest + ## + # REST client for the ReferenceListService service. + # + # ReferenceListService provides an interface for managing reference lists. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reference_list_service_stub + + ## + # Configure the ReferenceListService Client class. + # + # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReferenceListService clients + # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] + 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.get_reference_list.timeout = 60.0 + default_config.rpcs.get_reference_list.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_reference_lists.timeout = 60.0 + default_config.rpcs.list_reference_lists.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_reference_list.timeout = 60.0 + + default_config.rpcs.update_reference_list.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 + @reference_list_service_stub.universe_domain + end + + ## + # Create a new ReferenceListService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReferenceListService 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 + + @reference_list_service_stub = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @reference_list_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reference_list_service_stub.logger + end + + # Service calls + + ## + # Gets a single reference list. + # + # @overload get_reference_list(request, options = nil) + # Pass arguments to `get_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::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_reference_list(name: nil, view: nil) + # Pass arguments to `get_reference_list` 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 reference list to retrieve. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of the ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_FULL. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new + # + # # Call the get_reference_list method. + # result = client.get_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def get_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.get_reference_list 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 a collection of reference lists. + # + # @overload list_reference_lists(request, options = nil) + # Pass arguments to `list_reference_lists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_reference_lists` 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 parent, which owns this collection of reference lists. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of reference lists to return. + # The service may return fewer than this value. + # If unspecified, at most 100 reference lists will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListReferenceLists` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListReferenceLists` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of each ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new + # + # # Call the list_reference_lists method. + # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. + # p item + # end + # + def list_reference_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest + + # 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_reference_lists.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::Chronicle::V1::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_reference_lists.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reference_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.list_reference_lists request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, "reference_lists", 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 + + ## + # Creates a new reference list. + # + # @overload create_reference_list(request, options = nil) + # Pass arguments to `create_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) + # Pass arguments to `create_reference_list` 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 parent resource where this reference list will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to create. + # @param reference_list_id [::String] + # Required. The ID to use for the reference list. This is also the display + # name for the reference list. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Has length less than 256. + # - Must be unique. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new + # + # # Call the create_reference_list method. + # result = client.create_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def create_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.create_reference_list 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 + + ## + # Updates an existing reference list. + # + # @overload update_reference_list(request, options = nil) + # Pass arguments to `update_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::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_reference_list(reference_list: nil, update_mask: nil) + # Pass arguments to `update_reference_list` 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 reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to update. + # + # The reference list's `name` field is used to identify the reference list to + # update. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # When no field mask is supplied, all non-empty fields will be updated. + # A field mask of "*" will update all fields, whether empty or not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new + # + # # Call the update_reference_list method. + # result = client.update_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def update_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest + + # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.update_reference_list 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 + + ## + # Configuration class for the ReferenceListService REST API. + # + # This class represents the configuration for ReferenceListService 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::Chronicle::V1::ReferenceListService::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 + # # get_reference_list to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.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. + # * `: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 = "chronicle.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 ReferenceListService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reference_list + ## + # RPC-specific configuration for `list_reference_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reference_lists + ## + # RPC-specific configuration for `create_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reference_list + ## + # RPC-specific configuration for `update_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :update_reference_list + + # @private + def initialize parent_rpcs = nil + get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list + @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config + list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists + @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config + create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list + @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config + update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list + @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb new file mode 100644 index 000000000000..718ce68bd0d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb @@ -0,0 +1,327 @@ +# 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/chronicle/v1/reference_list_pb" + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + module Rest + ## + # REST service stub for the ReferenceListService 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 get_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] + # 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::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # A result object deserialized from the server's reply + def get_reference_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_reference_list_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_reference_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_lists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] + # 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::Chronicle::V1::ListReferenceListsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListReferenceListsResponse] + # A result object deserialized from the server's reply + def list_reference_lists request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reference_lists_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_reference_lists", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] + # 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::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # A result object deserialized from the server's reply + def create_reference_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_reference_list_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_reference_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] + # 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::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # A result object deserialized from the server's reply + def update_reference_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_reference_list_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_reference_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ReferenceList.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 get_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] + # 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_reference_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reference_lists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] + # 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_reference_lists_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/referenceLists", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] + # 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_reference_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/referenceLists", + body: "reference_list", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] + # 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_reference_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{reference_list.name}", + body: "reference_list", + matches: [ + ["reference_list.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb new file mode 100644 index 000000000000..aa0cb32e7359 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/reference_list.proto for package 'Google.Cloud.Chronicle.V1' +# 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/chronicle/v1/reference_list_pb' + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + # ReferenceListService provides an interface for managing reference lists. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.ReferenceListService' + + # Gets a single reference list. + rpc :GetReferenceList, ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList + # Lists a collection of reference lists. + rpc :ListReferenceLists, ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse + # Creates a new reference list. + rpc :CreateReferenceList, ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList + # Updates an existing reference list. + rpc :UpdateReferenceList, ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb new file mode 100644 index 000000000000..12e0531e651f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb @@ -0,0 +1,47 @@ +# 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/chronicle/v1/big_query_export_service/rest" +require "google/cloud/chronicle/v1/dashboard_query_service/rest" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest" +require "google/cloud/chronicle/v1/data_access_control_service/rest" +require "google/cloud/chronicle/v1/data_table_service/rest" +require "google/cloud/chronicle/v1/entity_service/rest" +require "google/cloud/chronicle/v1/native_dashboard_service/rest" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" +require "google/cloud/chronicle/v1/instance_service/rest" +require "google/cloud/chronicle/v1/reference_list_service/rest" +require "google/cloud/chronicle/v1/rule_service/rest" +require "google/cloud/chronicle/v1/version" + +module Google + module Cloud + module Chronicle + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/chronicle/v1/rest" + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb new file mode 100644 index 000000000000..e4b4236afdf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/rule.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/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n$google/cloud/chronicle/v1/rule.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\x91\t\n\x04Rule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04text\x18\x04 \x01(\t\x12\x13\n\x06\x61uthor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12:\n\x08severity\x18\x06 \x01(\x0b\x32#.google.cloud.chronicle.v1.SeverityB\x03\xe0\x41\x03\x12\x44\n\x08metadata\x18\x07 \x03(\x0b\x32-.google.cloud.chronicle.v1.Rule.MetadataEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x11\x63ompilation_state\x18\n \x01(\x0e\x32\x30.google.cloud.chronicle.v1.Rule.CompilationStateB\x03\xe0\x41\x03\x12\x36\n\x04type\x18\x0c \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleTypeB\x03\xe0\x41\x03\x12G\n\x0freference_lists\x18\r \x03(\tB.\xe0\x41\x03\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12M\n\x17\x61llowed_run_frequencies\x18\x0e \x03(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequencyB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0f \x01(\t\x12<\n\x05scope\x18\x10 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12V\n\x17\x63ompilation_diagnostics\x18\x11 \x03(\x0b\x32\x30.google.cloud.chronicle.v1.CompilationDiagnosticB\x03\xe0\x41\x03\x12.\n!near_real_time_live_rule_eligible\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0binputs_used\x18\x14 \x01(\x0b\x32%.google.cloud.chronicle.v1.InputsUsedB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"P\n\x10\x43ompilationState\x12!\n\x1d\x43OMPILATION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02:m\xea\x41j\n\x1d\x63hronicle.googleapis.com/Rule\x12Iprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}\"\xcb\x05\n\x0eRuleDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x12\x10\n\x08\x61lerting\x18\x03 \x01(\x08\x12\x10\n\x08\x61rchived\x18\x04 \x01(\x08\x12\x35\n\x0c\x61rchive_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\rrun_frequency\x18\x06 \x01(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequency\x12V\n\x0f\x65xecution_state\x18\x07 \x01(\x0e\x32\x38.google.cloud.chronicle.v1.RuleDeployment.ExecutionStateB\x03\xe0\x41\x03\x12=\n\x0eproducer_rules\x18\x08 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12=\n\x0e\x63onsumer_rules\x18\t \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x46\n\x1dlast_alert_status_change_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"W\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0b\n\x07LIMITED\x10\x02\x12\n\n\x06PAUSED\x10\x03:\x82\x01\xea\x41\x7f\n\'chronicle.googleapis.com/RuleDeployment\x12Tprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment\"\xc8\x03\n\tRetrohunt\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x10process_interval\x18\x02 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x36\n\x12\x65xecution_interval\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.cloud.chronicle.v1.Retrohunt.StateB\x03\xe0\x41\x03\x12 \n\x13progress_percentage\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\"P\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x8a\x01\xea\x41\x86\x01\n\"chronicle.googleapis.com/Retrohunt\x12`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}\"~\n\x11\x43reateRuleRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x32\n\x04rule\x18\x02 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\"x\n\x0eGetRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"\xb3\x01\n\x10ListRulesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\\\n\x11ListRulesResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x11UpdateRuleRequest\x12\x32\n\x04rule\x18\x01 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\\\n\x11\x44\x65leteRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa9\x01\n\x18ListRuleRevisionsRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"d\n\x19ListRuleRevisionsResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x01\n\x16\x43reateRetrohuntRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\x12<\n\tretrohunt\x18\x02 \x01(\x0b\x32$.google.cloud.chronicle.v1.RetrohuntB\x03\xe0\x41\x02\"O\n\x13GetRetrohuntRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Retrohunt\"\x8a\x01\n\x15ListRetrohuntsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"k\n\x16ListRetrohuntsResponse\x12\x38\n\nretrohunts\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.Retrohunt\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x18GetRuleDeploymentRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/RuleDeployment\"\x94\x01\n\x1aListRuleDeploymentsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/RuleDeployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"{\n\x1bListRuleDeploymentsResponse\x12\x43\n\x10rule_deployments\x18\x01 \x03(\x0b\x32).google.cloud.chronicle.v1.RuleDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9c\x01\n\x1bUpdateRuleDeploymentRequest\x12G\n\x0frule_deployment\x18\x01 \x01(\x0b\x32).google.cloud.chronicle.v1.RuleDeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"y\n\x13\x43ompilationPosition\x12\x17\n\nstart_line\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cstart_column\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_line\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nend_column\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\"\x96\x02\n\x15\x43ompilationDiagnostic\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x08position\x18\x02 \x01(\x0b\x32..google.cloud.chronicle.v1.CompilationPositionB\x03\xe0\x41\x03\x12P\n\x08severity\x18\x03 \x01(\x0e\x32\x39.google.cloud.chronicle.v1.CompilationDiagnostic.SeverityB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x05 \x01(\tB\x03\xe0\x41\x03\"<\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\" \n\x08Severity\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\"\x9a\x01\n\x11RetrohuntMetadata\x12\x35\n\tretrohunt\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x12\x65xecution_interval\x18\x02 \x01(\x0b\x32\x15.google.type.Interval\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x02\"Z\n\nInputsUsed\x12\x15\n\x08uses_udm\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0buses_entity\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0euses_detection\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01*N\n\x0cRunFrequency\x12\x1d\n\x19RUN_FREQUENCY_UNSPECIFIED\x10\x00\x12\x08\n\x04LIVE\x10\x01\x12\n\n\x06HOURLY\x10\x02\x12\t\n\x05\x44\x41ILY\x10\x03*H\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSINGLE_EVENT\x10\x01\x12\x0f\n\x0bMULTI_EVENT\x10\x02*V\n\x08RuleView\x12\x19\n\x15RULE_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\x1a\n\x16REVISION_METADATA_ONLY\x10\x03\x32\xa9\x13\n\x0bRuleService\x12\xae\x01\n\nCreateRule\x12,.google.cloud.chronicle.v1.CreateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"Q\xda\x41\x0bparent,rule\x82\xd3\xe4\x93\x02=\"5/v1/{parent=projects/*/locations/*/instances/*}/rules:\x04rule\x12\x9b\x01\n\x07GetRule\x12).google.cloud.chronicle.v1.GetRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xae\x01\n\tListRules\x12+.google.cloud.chronicle.v1.ListRulesRequest\x1a,.google.cloud.chronicle.v1.ListRulesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*/instances/*}/rules\x12\xb8\x01\n\nUpdateRule\x12,.google.cloud.chronicle.v1.UpdateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"[\xda\x41\x10rule,update_mask\x82\xd3\xe4\x93\x02\x42\x32:/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}:\x04rule\x12\x98\x01\n\nDeleteRule\x12,.google.cloud.chronicle.v1.DeleteRuleRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xd2\x01\n\x11ListRuleRevisions\x12\x33.google.cloud.chronicle.v1.ListRuleRevisionsRequest\x1a\x34.google.cloud.chronicle.v1.ListRuleRevisionsResponse\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{name=projects/*/locations/*/instances/*/rules/*}:listRevisions\x12\xef\x01\n\x0f\x43reateRetrohunt\x12\x31.google.cloud.chronicle.v1.CreateRetrohuntRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1e\n\tRetrohunt\x12\x11RetrohuntMetadata\xda\x41\x10parent,retrohunt\x82\xd3\xe4\x93\x02O\"B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts:\tretrohunt\x12\xb7\x01\n\x0cGetRetrohunt\x12..google.cloud.chronicle.v1.GetRetrohuntRequest\x1a$.google.cloud.chronicle.v1.Retrohunt\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}\x12\xca\x01\n\x0eListRetrohunts\x12\x30.google.cloud.chronicle.v1.ListRetrohuntsRequest\x1a\x31.google.cloud.chronicle.v1.ListRetrohuntsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts\x12\xc4\x01\n\x11GetRuleDeployment\x12\x33.google.cloud.chronicle.v1.GetRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}\x12\xda\x01\n\x13ListRuleDeployments\x12\x35.google.cloud.chronicle.v1.ListRuleDeploymentsRequest\x1a\x36.google.cloud.chronicle.v1.ListRuleDeploymentsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments\x12\x83\x02\n\x14UpdateRuleDeployment\x12\x36.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"\x87\x01\xda\x41\x1brule_deployment,update_mask\x82\xd3\xe4\x93\x02\x63\x32P/v1/{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}:\x0frule_deployment\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc0\x01\n\x1d\x63om.google.cloud.chronicle.v1B\tRuleProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule").msgclass + Rule::CompilationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule.CompilationState").enummodule + RuleDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment").msgclass + RuleDeployment::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment.ExecutionState").enummodule + Retrohunt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt").msgclass + Retrohunt::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt.State").enummodule + CreateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRuleRequest").msgclass + GetRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleRequest").msgclass + ListRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesRequest").msgclass + ListRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesResponse").msgclass + UpdateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleRequest").msgclass + DeleteRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteRuleRequest").msgclass + ListRuleRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsRequest").msgclass + ListRuleRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsResponse").msgclass + CreateRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRetrohuntRequest").msgclass + GetRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRetrohuntRequest").msgclass + ListRetrohuntsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsRequest").msgclass + ListRetrohuntsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsResponse").msgclass + GetRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleDeploymentRequest").msgclass + ListRuleDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsRequest").msgclass + ListRuleDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsResponse").msgclass + UpdateRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleDeploymentRequest").msgclass + CompilationPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationPosition").msgclass + CompilationDiagnostic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic").msgclass + CompilationDiagnostic::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic.Severity").enummodule + Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Severity").msgclass + RetrohuntMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RetrohuntMetadata").msgclass + InputsUsed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InputsUsed").msgclass + RunFrequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RunFrequency").enummodule + RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleType").enummodule + RuleView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb new file mode 100644 index 000000000000..e84fdd68ca88 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb @@ -0,0 +1,56 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/rule_service/credentials" +require "google/cloud/chronicle/v1/rule_service/paths" +require "google/cloud/chronicle/v1/rule_service/operations" +require "google/cloud/chronicle/v1/rule_service/client" +require "google/cloud/chronicle/v1/rule_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # RuleService provides interface for user-created rules. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/rule_service" + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/rule_service/rest" + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + module RuleService + end + end + end + end +end + +helper_path = ::File.join __dir__, "rule_service", "helpers.rb" +require "google/cloud/chronicle/v1/rule_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb new file mode 100644 index 000000000000..53a82998663a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb @@ -0,0 +1,1691 @@ +# 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/chronicle/v1/rule_pb" + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + ## + # Client for the RuleService service. + # + # RuleService provides interface for user-created rules. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :rule_service_stub + + ## + # Configure the RuleService Client class. + # + # See {::Google::Cloud::Chronicle::V1::RuleService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RuleService clients + # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] + 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_rule.timeout = 60.0 + + default_config.rpcs.get_rule.timeout = 60.0 + default_config.rpcs.get_rule.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rules.timeout = 600.0 + default_config.rpcs.list_rules.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule.timeout = 600.0 + + default_config.rpcs.delete_rule.timeout = 60.0 + + default_config.rpcs.list_rule_revisions.timeout = 600.0 + default_config.rpcs.list_rule_revisions.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_retrohunt.timeout = 600.0 + + default_config.rpcs.get_retrohunt.timeout = 60.0 + default_config.rpcs.get_retrohunt.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_retrohunts.timeout = 60.0 + default_config.rpcs.list_retrohunts.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_rule_deployment.timeout = 600.0 + default_config.rpcs.get_rule_deployment.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rule_deployments.timeout = 600.0 + default_config.rpcs.list_rule_deployments.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule_deployment.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RuleService 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::Chronicle::V1::RuleService::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 + @rule_service_stub.universe_domain + end + + ## + # Create a new RuleService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RuleService 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/chronicle/v1/rule_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 + + @rule_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::RuleService::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 + ) + + @rule_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::Chronicle::V1::RuleService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @rule_service_stub.logger + end + + # Service calls + + ## + # Creates a new Rule. + # + # @overload create_rule(request, options = nil) + # Pass arguments to `create_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::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_rule(parent: nil, rule: nil) + # Pass arguments to `create_rule` 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 parent resource where this rule will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new + # + # # Call the create_rule method. + # result = client.create_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def create_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :create_rule, 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 Rule. + # + # @overload get_rule(request, options = nil) + # Pass arguments to `get_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::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_rule(name: nil, view: nil) + # Pass arguments to `get_rule` 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 name of the rule to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the Rule being + # returned. If unspecified, defaults to FULL. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new + # + # # Call the get_rule method. + # result = client.get_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def get_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :get_rule, 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 Rules. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) + # Pass arguments to `list_rules` 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 parent, which owns this collection of rules. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of rules to return. The service may return fewer than + # this value. If unspecified, at most 100 rules will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRules` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRules` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # view indicates the scope of fields to populate for the Rule being returned. + # If unspecified, defaults to BASIC. + # @param filter [::String] + # Only the following filters are allowed: + # "reference_lists:\\{reference_list_name}" + # "data_tables:\\{data_table_name}" + # "display_name:\\{display_name}" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest + + # 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_rules.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::Chronicle::V1::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_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_rules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rules, 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 Rule. + # + # @overload update_rule(request, options = nil) + # Pass arguments to `update_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::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_rule(rule: nil, update_mask: nil) + # Pass arguments to `update_rule` 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 rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to update. + # + # The rule's `name` field is used to identify the rule to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new + # + # # Call the update_rule method. + # result = client.update_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def update_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest + + # 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_rule.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::Chronicle::V1::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.rule&.name + header_params["rule.name"] = request.rule.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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :update_rule, 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 Rule. + # + # @overload delete_rule(request, options = nil) + # Pass arguments to `delete_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::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_rule(name: nil, force: nil) + # Pass arguments to `delete_rule` 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 name of the rule to delete. A rule revision timestamp cannot + # be specified as part of the name, as deleting specific revisions is not + # supported. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param force [::Boolean] + # Optional. If set to true, any retrohunts and any detections associated with + # the rule will also be deleted. If set to false, the call will only succeed + # if the rule has no associated retrohunts, including completed retrohunts, + # and no associated detections. Regardless of this field's value, the rule + # deployment associated with this rule will also 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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new + # + # # Call the delete_rule method. + # result = client.delete_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :delete_rule, 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 all revisions of the rule. + # + # @overload list_rule_revisions(request, options = nil) + # Pass arguments to `list_rule_revisions` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_rule_revisions` 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 name of the rule to list revisions for. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of revisions to return per page. The service may return + # fewer than this value. If unspecified, at most 100 revisions will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # The page token, received from a previous `ListRuleRevisions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleRevisions` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the revision + # being returned. If unspecified, defaults to BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new + # + # # Call the list_rule_revisions method. + # result = client.list_rule_revisions 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rule_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest + + # 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_rule_revisions.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::Chronicle::V1::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_rule_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rule_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_rule_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, 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 + + ## + # Create a Retrohunt. + # + # @overload create_retrohunt(request, options = nil) + # Pass arguments to `create_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::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_retrohunt(parent: nil, retrohunt: nil) + # Pass arguments to `create_retrohunt` 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 parent of retrohunt, which is a rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] + # Required. The retrohunt 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/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new + # + # # Call the create_retrohunt method. + # result = client.create_retrohunt 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_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest + + # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :create_retrohunt, 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 + + ## + # Get a Retrohunt. + # + # @overload get_retrohunt(request, options = nil) + # Pass arguments to `get_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::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_retrohunt(name: nil) + # Pass arguments to `get_retrohunt` 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 name of the retrohunt to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Retrohunt] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new + # + # # Call the get_retrohunt method. + # result = client.get_retrohunt request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. + # p result + # + def get_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest + + # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :get_retrohunt, 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 + + ## + # List Retrohunts. + # + # @overload list_retrohunts(request, options = nil) + # Pass arguments to `list_retrohunts` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_retrohunts` 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 rule that the retrohunts belong to. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of retrohunt to return. The service may return fewer + # than this value. If unspecified, at most 100 retrohunts will be returned. + # The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRetrohunts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRetrohunts` must + # match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # state + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new + # + # # Call the list_retrohunts method. + # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. + # p item + # end + # + def list_retrohunts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest + + # 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_retrohunts.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::Chronicle::V1::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_retrohunts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_retrohunts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_retrohunts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_retrohunts, 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 + + ## + # Gets a RuleDeployment. + # + # @overload get_rule_deployment(request, options = nil) + # Pass arguments to `get_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::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_rule_deployment(name: nil) + # Pass arguments to `get_rule_deployment` 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 name of the rule deployment to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new + # + # # Call the get_rule_deployment method. + # result = client.get_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def get_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest + + # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :get_rule_deployment, 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 RuleDeployments across all Rules. + # + # @overload list_rule_deployments(request, options = nil) + # Pass arguments to `list_rule_deployments` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_rule_deployments` 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 collection of all parents which own all rule deployments. The + # "-" wildcard token must be used as the rule identifier in the resource + # path. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/-` + # @param page_size [::Integer] + # The maximum number of rule deployments to return. The service may return + # fewer than this value. If unspecified, at most 100 rule deployments will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRuleDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleDeployments` + # must match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # archived, name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new + # + # # Call the list_rule_deployments method. + # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. + # p item + # end + # + def list_rule_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest + + # 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_rule_deployments.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::Chronicle::V1::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_rule_deployments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rule_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_rule_deployments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, 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 RuleDeployment. + # Failures are not necessarily atomic. If there is a request to update + # multiple fields, and any update to a single field fails, an error will be + # returned, but other fields may remain successfully updated. + # + # @overload update_rule_deployment(request, options = nil) + # Pass arguments to `update_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::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_rule_deployment(rule_deployment: nil, update_mask: nil) + # Pass arguments to `update_rule_deployment` 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 rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] + # Required. The rule deployment to update. + # + # The rule deployment's `name` field is used to identify the rule deployment + # to update. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new + # + # # Call the update_rule_deployment method. + # result = client.update_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def update_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest + + # 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_rule_deployment.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::Chronicle::V1::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.rule_deployment&.name + header_params["rule_deployment.name"] = request.rule_deployment.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_rule_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :update_rule_deployment, 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 + + ## + # Configuration class for the RuleService API. + # + # This class represents the configuration for RuleService, + # 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::Chronicle::V1::RuleService::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_rule to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::RuleService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.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::Chronicle::V1::RuleService::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. + # * `: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 = "chronicle.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 RuleService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_rule + ## + # RPC-specific configuration for `get_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `update_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule + ## + # RPC-specific configuration for `delete_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_rule + ## + # RPC-specific configuration for `list_rule_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_revisions + ## + # RPC-specific configuration for `create_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :create_retrohunt + ## + # RPC-specific configuration for `get_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :get_retrohunt + ## + # RPC-specific configuration for `list_retrohunts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_retrohunts + ## + # RPC-specific configuration for `get_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule_deployment + ## + # RPC-specific configuration for `list_rule_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_deployments + ## + # RPC-specific configuration for `update_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule_deployment + + # @private + def initialize parent_rpcs = nil + create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule + @create_rule = ::Gapic::Config::Method.new create_rule_config + get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule + @get_rule = ::Gapic::Config::Method.new get_rule_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule + @update_rule = ::Gapic::Config::Method.new update_rule_config + delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule + @delete_rule = ::Gapic::Config::Method.new delete_rule_config + list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions + @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config + create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt + @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config + get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt + @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config + list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts + @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config + get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment + @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config + list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments + @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config + update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment + @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb new file mode 100644 index 000000000000..a66ae4c0ebf6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + module RuleService + # Credentials for the RuleService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb new file mode 100644 index 000000000000..162ec1fb3163 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb @@ -0,0 +1,841 @@ +# 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 Chronicle + module V1 + module RuleService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the RuleService 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 RuleService 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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + 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. + # * `: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 = "chronicle.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. + # * `: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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb new file mode 100644 index 000000000000..00b03a7b2d54 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb @@ -0,0 +1,159 @@ +# 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 Chronicle + module V1 + module RuleService + # Path helper methods for the RuleService API. + module Paths + ## + # Create a fully-qualified DataAccessScope resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_scope [String] + # + # @return [::String] + def data_access_scope_path project:, location:, instance:, data_access_scope: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified ReferenceList resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param reference_list [String] + # + # @return [::String] + def reference_list_path project:, location:, instance:, reference_list: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" + end + + ## + # Create a fully-qualified Retrohunt resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param rule [String] + # @param retrohunt [String] + # + # @return [::String] + def retrohunt_path project:, location:, instance:, rule:, retrohunt: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + raise ::ArgumentError, "rule cannot contain /" if rule.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/retrohunts/#{retrohunt}" + end + + ## + # Create a fully-qualified Rule resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param rule [String] + # + # @return [::String] + def rule_path project:, location:, instance:, rule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}" + end + + ## + # Create a fully-qualified RuleDeployment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param rule [String] + # + # @return [::String] + def rule_deployment_path project:, location:, instance:, rule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/deployment" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb new file mode 100644 index 000000000000..d27a86220664 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb @@ -0,0 +1,53 @@ +# 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/rule_service/credentials" +require "google/cloud/chronicle/v1/rule_service/paths" +require "google/cloud/chronicle/v1/rule_service/rest/operations" +require "google/cloud/chronicle/v1/rule_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # RuleService provides interface for user-created rules. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/rule_service/rest" + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + module RuleService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/rule_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb new file mode 100644 index 000000000000..e29466693f60 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb @@ -0,0 +1,1564 @@ +# 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + module Rest + ## + # REST client for the RuleService service. + # + # RuleService provides interface for user-created rules. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :rule_service_stub + + ## + # Configure the RuleService Client class. + # + # See {::Google::Cloud::Chronicle::V1::RuleService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RuleService clients + # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] + 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_rule.timeout = 60.0 + + default_config.rpcs.get_rule.timeout = 60.0 + default_config.rpcs.get_rule.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rules.timeout = 600.0 + default_config.rpcs.list_rules.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule.timeout = 600.0 + + default_config.rpcs.delete_rule.timeout = 60.0 + + default_config.rpcs.list_rule_revisions.timeout = 600.0 + default_config.rpcs.list_rule_revisions.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_retrohunt.timeout = 600.0 + + default_config.rpcs.get_retrohunt.timeout = 60.0 + default_config.rpcs.get_retrohunt.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_retrohunts.timeout = 60.0 + default_config.rpcs.list_retrohunts.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_rule_deployment.timeout = 600.0 + default_config.rpcs.get_rule_deployment.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rule_deployments.timeout = 600.0 + default_config.rpcs.list_rule_deployments.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule_deployment.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RuleService 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::Chronicle::V1::RuleService::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 + @rule_service_stub.universe_domain + end + + ## + # Create a new RuleService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RuleService 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::Chronicle::V1::RuleService::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 + + @rule_service_stub = ::Google::Cloud::Chronicle::V1::RuleService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @rule_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::Chronicle::V1::RuleService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @rule_service_stub.logger + end + + # Service calls + + ## + # Creates a new Rule. + # + # @overload create_rule(request, options = nil) + # Pass arguments to `create_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::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_rule(parent: nil, rule: nil) + # Pass arguments to `create_rule` 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 parent resource where this rule will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new + # + # # Call the create_rule method. + # result = client.create_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def create_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.create_rule 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 Rule. + # + # @overload get_rule(request, options = nil) + # Pass arguments to `get_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::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_rule(name: nil, view: nil) + # Pass arguments to `get_rule` 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 name of the rule to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the Rule being + # returned. If unspecified, defaults to FULL. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new + # + # # Call the get_rule method. + # result = client.get_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def get_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.get_rule 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 Rules. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) + # Pass arguments to `list_rules` 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 parent, which owns this collection of rules. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of rules to return. The service may return fewer than + # this value. If unspecified, at most 100 rules will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRules` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRules` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # view indicates the scope of fields to populate for the Rule being returned. + # If unspecified, defaults to BASIC. + # @param filter [::String] + # Only the following filters are allowed: + # "reference_lists:\\{reference_list_name}" + # "data_tables:\\{data_table_name}" + # "display_name:\\{display_name}" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest + + # 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_rules.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::Chronicle::V1::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_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_rules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rules, "rules", 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 Rule. + # + # @overload update_rule(request, options = nil) + # Pass arguments to `update_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::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_rule(rule: nil, update_mask: nil) + # Pass arguments to `update_rule` 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 rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to update. + # + # The rule's `name` field is used to identify the rule to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new + # + # # Call the update_rule method. + # result = client.update_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def update_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.update_rule 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 Rule. + # + # @overload delete_rule(request, options = nil) + # Pass arguments to `delete_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::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_rule(name: nil, force: nil) + # Pass arguments to `delete_rule` 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 name of the rule to delete. A rule revision timestamp cannot + # be specified as part of the name, as deleting specific revisions is not + # supported. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param force [::Boolean] + # Optional. If set to true, any retrohunts and any detections associated with + # the rule will also be deleted. If set to false, the call will only succeed + # if the rule has no associated retrohunts, including completed retrohunts, + # and no associated detections. Regardless of this field's value, the rule + # deployment associated with this rule will also 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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new + # + # # Call the delete_rule method. + # result = client.delete_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest + + # 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_rule.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::Chronicle::V1::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.delete_rule 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 all revisions of the rule. + # + # @overload list_rule_revisions(request, options = nil) + # Pass arguments to `list_rule_revisions` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_rule_revisions` 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 name of the rule to list revisions for. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of revisions to return per page. The service may return + # fewer than this value. If unspecified, at most 100 revisions will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # The page token, received from a previous `ListRuleRevisions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleRevisions` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the revision + # being returned. If unspecified, defaults to BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new + # + # # Call the list_rule_revisions method. + # result = client.list_rule_revisions 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rule_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest + + # 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_rule_revisions.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::Chronicle::V1::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_rule_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rule_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_rule_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, "rules", 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 + + ## + # Create a Retrohunt. + # + # @overload create_retrohunt(request, options = nil) + # Pass arguments to `create_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::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_retrohunt(parent: nil, retrohunt: nil) + # Pass arguments to `create_retrohunt` 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 parent of retrohunt, which is a rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] + # Required. The retrohunt 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/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new + # + # # Call the create_retrohunt method. + # result = client.create_retrohunt 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_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest + + # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.create_retrohunt 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 + + ## + # Get a Retrohunt. + # + # @overload get_retrohunt(request, options = nil) + # Pass arguments to `get_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::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_retrohunt(name: nil) + # Pass arguments to `get_retrohunt` 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 name of the retrohunt to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Retrohunt] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new + # + # # Call the get_retrohunt method. + # result = client.get_retrohunt request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. + # p result + # + def get_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest + + # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.get_retrohunt 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 + + ## + # List Retrohunts. + # + # @overload list_retrohunts(request, options = nil) + # Pass arguments to `list_retrohunts` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_retrohunts` 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 rule that the retrohunts belong to. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of retrohunt to return. The service may return fewer + # than this value. If unspecified, at most 100 retrohunts will be returned. + # The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRetrohunts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRetrohunts` must + # match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # state + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new + # + # # Call the list_retrohunts method. + # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. + # p item + # end + # + def list_retrohunts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest + + # 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_retrohunts.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::Chronicle::V1::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_retrohunts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_retrohunts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_retrohunts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_retrohunts, "retrohunts", 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 a RuleDeployment. + # + # @overload get_rule_deployment(request, options = nil) + # Pass arguments to `get_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::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_rule_deployment(name: nil) + # Pass arguments to `get_rule_deployment` 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 name of the rule deployment to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new + # + # # Call the get_rule_deployment method. + # result = client.get_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def get_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest + + # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.get_rule_deployment 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 RuleDeployments across all Rules. + # + # @overload list_rule_deployments(request, options = nil) + # Pass arguments to `list_rule_deployments` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_rule_deployments` 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 collection of all parents which own all rule deployments. The + # "-" wildcard token must be used as the rule identifier in the resource + # path. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/-` + # @param page_size [::Integer] + # The maximum number of rule deployments to return. The service may return + # fewer than this value. If unspecified, at most 100 rule deployments will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRuleDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleDeployments` + # must match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # archived, name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new + # + # # Call the list_rule_deployments method. + # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. + # p item + # end + # + def list_rule_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest + + # 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_rule_deployments.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::Chronicle::V1::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_rule_deployments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rule_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_rule_deployments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, "rule_deployments", 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 RuleDeployment. + # Failures are not necessarily atomic. If there is a request to update + # multiple fields, and any update to a single field fails, an error will be + # returned, but other fields may remain successfully updated. + # + # @overload update_rule_deployment(request, options = nil) + # Pass arguments to `update_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::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_rule_deployment(rule_deployment: nil, update_mask: nil) + # Pass arguments to `update_rule_deployment` 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 rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] + # Required. The rule deployment to update. + # + # The rule deployment's `name` field is used to identify the rule deployment + # to update. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new + # + # # Call the update_rule_deployment method. + # result = client.update_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def update_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest + + # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.update_rule_deployment 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 + + ## + # Configuration class for the RuleService REST API. + # + # This class represents the configuration for RuleService 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::Chronicle::V1::RuleService::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_rule to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.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. + # * `: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 = "chronicle.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 RuleService 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_rule + ## + # RPC-specific configuration for `get_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `update_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule + ## + # RPC-specific configuration for `delete_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_rule + ## + # RPC-specific configuration for `list_rule_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_revisions + ## + # RPC-specific configuration for `create_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :create_retrohunt + ## + # RPC-specific configuration for `get_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :get_retrohunt + ## + # RPC-specific configuration for `list_retrohunts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_retrohunts + ## + # RPC-specific configuration for `get_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule_deployment + ## + # RPC-specific configuration for `list_rule_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_deployments + ## + # RPC-specific configuration for `update_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule_deployment + + # @private + def initialize parent_rpcs = nil + create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule + @create_rule = ::Gapic::Config::Method.new create_rule_config + get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule + @get_rule = ::Gapic::Config::Method.new get_rule_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule + @update_rule = ::Gapic::Config::Method.new update_rule_config + delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule + @delete_rule = ::Gapic::Config::Method.new delete_rule_config + list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions + @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config + create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt + @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config + get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt + @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config + list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts + @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config + get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment + @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config + list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments + @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config + update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment + @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb new file mode 100644 index 000000000000..f989eba5c49e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb @@ -0,0 +1,925 @@ +# 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 Chronicle + module V1 + module RuleService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the RuleService 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 RuleService 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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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 + + ## + # 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. + # * `: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 = "chronicle.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. + # * `: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 + + # @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 + + 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 + + ## + # @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: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, 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: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/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: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/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: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb new file mode 100644 index 000000000000..021e04869cad --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb @@ -0,0 +1,817 @@ +# 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/chronicle/v1/rule_pb" + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + module Rest + ## + # REST service stub for the RuleService 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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] + # 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::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # A result object deserialized from the server's reply + def create_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_rule_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_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] + # 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::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # A result object deserialized from the server's reply + def get_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_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_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Rule.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_rules REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] + # 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::Chronicle::V1::ListRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRulesResponse] + # A result object deserialized from the server's reply + def list_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_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_rules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] + # 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::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # A result object deserialized from the server's reply + def update_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_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_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] + # 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_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_rule_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_rule", + 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 list_rule_revisions REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] + # 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::Chronicle::V1::ListRuleRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse] + # A result object deserialized from the server's reply + def list_rule_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_revisions_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_rule_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] + # 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_retrohunt request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_retrohunt_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_retrohunt", + 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_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] + # 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::Chronicle::V1::Retrohunt] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # A result object deserialized from the server's reply + def get_retrohunt request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_retrohunt_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_retrohunt", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunts REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] + # 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::Chronicle::V1::ListRetrohuntsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse] + # A result object deserialized from the server's reply + def list_retrohunts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_retrohunts_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_retrohunts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] + # 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::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # A result object deserialized from the server's reply + def get_rule_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_deployment_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_rule_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployments REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] + # 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::Chronicle::V1::ListRuleDeploymentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse] + # A result object deserialized from the server's reply + def list_rule_deployments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_deployments_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_rule_deployments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] + # 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::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # A result object deserialized from the server's reply + def update_rule_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_deployment_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_rule_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rules", + body: "rule", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rules REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] + # 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_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/rules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rule.name}", + body: "rule", + matches: [ + ["rule.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rule_revisions REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] + # 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_rule_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:listRevisions", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] + # 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_retrohunt_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/retrohunts", + body: "retrohunt", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] + # 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_retrohunt_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/retrohunts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_retrohunts REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] + # 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_retrohunts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/retrohunts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] + # 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_rule_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rule_deployments REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] + # 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_rule_deployments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] + # 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_rule_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rule_deployment.name}", + body: "rule_deployment", + matches: [ + ["rule_deployment.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb new file mode 100644 index 000000000000..a893fb504269 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb @@ -0,0 +1,70 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/rule.proto for package 'Google.Cloud.Chronicle.V1' +# 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/chronicle/v1/rule_pb' + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + # RuleService provides interface for user-created rules. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.RuleService' + + # Creates a new Rule. + rpc :CreateRule, ::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule + # Gets a Rule. + rpc :GetRule, ::Google::Cloud::Chronicle::V1::GetRuleRequest, ::Google::Cloud::Chronicle::V1::Rule + # Lists Rules. + rpc :ListRules, ::Google::Cloud::Chronicle::V1::ListRulesRequest, ::Google::Cloud::Chronicle::V1::ListRulesResponse + # Updates a Rule. + rpc :UpdateRule, ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule + # Deletes a Rule. + rpc :DeleteRule, ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::Google::Protobuf::Empty + # Lists all revisions of the rule. + rpc :ListRuleRevisions, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse + # Create a Retrohunt. + rpc :CreateRetrohunt, ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::Google::Longrunning::Operation + # Get a Retrohunt. + rpc :GetRetrohunt, ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::Google::Cloud::Chronicle::V1::Retrohunt + # List Retrohunts. + rpc :ListRetrohunts, ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse + # Gets a RuleDeployment. + rpc :GetRuleDeployment, ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment + # Lists RuleDeployments across all Rules. + rpc :ListRuleDeployments, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse + # Updates a RuleDeployment. + # Failures are not necessarily atomic. If there is a request to update + # multiple fields, and any update to a single field fails, an error will be + # returned, but other fields may remain successfully updated. + rpc :UpdateRuleDeployment, ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb new file mode 100644 index 000000000000..6224648b9b26 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb @@ -0,0 +1,28 @@ +# 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 Chronicle + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md new file mode 100644 index 000000000000..70a487ac4c0f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Chronicle V1 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/big_query_export.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/big_query_export.rb new file mode 100644 index 000000000000..3d7099af5b15 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/big_query_export.rb @@ -0,0 +1,142 @@ +# 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 Chronicle + module V1 + # This resource represents the BigQuery export configuration for a Chronicle + # instance which includes Google Cloud Platform resources like Cloud Storage + # buckets, BigQuery datasets etc and the export settings for each data source. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the BigQueryExport. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/bigQueryExport + # @!attribute [r] provisioned + # @return [::Boolean] + # Output only. Whether the BigQueryExport has been provisioned for the + # Chronicle instance. + # @!attribute [r] big_query_export_package + # @return [::Google::Cloud::Chronicle::V1::BigQueryExportPackage] + # Output only. The BigQueryExportPackage entitled for the Chronicle instance. + # @!attribute [rw] entity_graph_settings + # @return [::Google::Cloud::Chronicle::V1::DataSourceExportSettings] + # Optional. The export settings for the Entity Graph data source. + # @!attribute [rw] ioc_matches_settings + # @return [::Google::Cloud::Chronicle::V1::DataSourceExportSettings] + # Optional. The export settings for the IOC Matches data source. + # @!attribute [rw] rule_detections_settings + # @return [::Google::Cloud::Chronicle::V1::DataSourceExportSettings] + # Optional. The export settings for the Rule Detections data source. + # @!attribute [rw] udm_events_aggregates_settings + # @return [::Google::Cloud::Chronicle::V1::DataSourceExportSettings] + # Optional. The export settings for the UDM Events Aggregates data source. + # @!attribute [rw] udm_events_settings + # @return [::Google::Cloud::Chronicle::V1::DataSourceExportSettings] + # Optional. The export settings for the UDM Events data source. + class BigQueryExport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The export settings for a data source. + # @!attribute [rw] enabled + # @return [::Boolean] + # Required. Whether the data source is enabled for export. + # @!attribute [rw] retention_days + # @return [::Integer] + # Required. The retention period for the data source in days. + # @!attribute [r] latest_export_job_state + # @return [::Google::Cloud::Chronicle::V1::LatestExportJobState] + # Output only. The state of the latest data source export job. + # @!attribute [r] data_freshness_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The data freshness of the given export which represents the + # time bucket at which the latest event was exported. + # @!attribute [r] data_volume + # @return [::Integer] + # Output only. The stored data volume of all the exports. + class DataSourceExportSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message to fetch BigQuery Export configuration. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the BigqueryExport to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/bigQueryExport + class GetBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message to update BigQuery Export configuration. + # @!attribute [rw] big_query_export + # @return [::Google::Cloud::Chronicle::V1::BigQueryExport] + # Required. The BigQueryExport settings to update. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/bigQueryExport + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + class UpdateBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message to provision BigQuery Export configuration. + # @!attribute [rw] parent + # @return [::String] + # Required. The instance for which BigQuery export is being provisioned. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + class ProvisionBigQueryExportRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The BigQueryExportPackage entitled for the Chronicle instance. + module BigQueryExportPackage + # The BigQueryExportPackage is unspecified. + BIG_QUERY_EXPORT_PACKAGE_UNSPECIFIED = 0 + + # The BigQueryExportPackage is Bring Your Own BigQuery. + BIG_QUERY_EXPORT_PACKAGE_BYOBQ = 1 + + # The BigQueryExportPackage is Advanced BigQuery. + BIG_QUERY_EXPORT_PACKAGE_ADVANCED = 2 + end + + # The state of the latest data source export job. + module LatestExportJobState + # The latest export job state is unspecified. + LATEST_EXPORT_JOB_STATE_UNSPECIFIED = 0 + + # The latest export job state is successful. + LATEST_EXPORT_JOB_STATE_SUCCESS = 1 + + # The latest export job state is failed. + LATEST_EXPORT_JOB_STATE_FAILED = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb new file mode 100644 index 000000000000..068b7f8c9990 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb @@ -0,0 +1,923 @@ +# 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 Chronicle + module V1 + # DashboardChart resource. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the dashboardChart. + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name/Title of the dashboardChart visible to users. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the dashboardChart. + # @!attribute [r] native_dashboard + # @return [::String] + # Output only. NativeDashboard this chart belongs to. + # @!attribute [rw] tile_type + # @return [::Google::Cloud::Chronicle::V1::TileType] + # Optional. Type of tile i.e., visualization, button or text. + # @!attribute [rw] chart_datasource + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::ChartDatasource] + # Optional. Query and datasource used in the chart. Should be empty for + # Button Tiles. + # @!attribute [rw] visualization + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization] + # Required. Depending on tile_type one of below fields will be required. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [rw] drill_down_config + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig] + # Optional. Drill down configuration. + # @!attribute [rw] tokens + # @return [::Array<::String>] + # Optional. List of Advanced Filter tokens used in this chart's query (e.g., + # "hostname", "ip"). This allows the UI to identify dependencies without + # parsing the query text. The tokens are stored without the wrapping '$' + # characters. + # The number of tokens are not expected to be more than 10. + class DashboardChart + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Datasource of the chart including the query reference and source name. + # @!attribute [rw] dashboard_query + # @return [::String] + # Reference to dashboard query resource used in the chart. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Cloud::Chronicle::V1::DataSource>] + # Name of the datasource used in the chart. + class ChartDatasource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Visualization config for a chart. + # https://echarts.apache.org/en/option.html#series + # @!attribute [rw] x_axes + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Axis>] + # @!attribute [rw] y_axes + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Axis>] + # @!attribute [rw] series + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series>] + # @!attribute [rw] tooltip + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Tooltip] + # @!attribute [rw] legends + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Legend>] + # @!attribute [rw] column_defs + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::ColumnDef>] + # Column Definition to represent chart as a table. + # @!attribute [rw] table_config + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::TableConfig] + # Optional. Configuration for table appearance. + # @!attribute [rw] button + # @return [::Google::Cloud::Chronicle::V1::Button] + # Button config for a chart if tileType is TILE_TYPE_BUTTON. + # @!attribute [rw] markdown + # @return [::Google::Cloud::Chronicle::V1::Markdown] + # Optional. Markdown config for a chart if tileType is TILE_TYPE_MARKDOWN. + # @!attribute [rw] series_column + # @return [::Array<::String>] + # Optional. Selected column for series + # @!attribute [rw] grouping_type + # @return [::String] + # Optional. Selected grouping type for series + # @!attribute [rw] google_maps_config + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig] + # Optional. Google Maps config for a chart if type is GOOGLE MAPS. + # @!attribute [rw] threshold_coloring_enabled + # @return [::Boolean] + # Optional. Whether threshold coloring is enabled for the chart. If it's + # enabled, the chart will be colored based on the values stored in + # VisualMap below. + # @!attribute [rw] visual_maps + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::VisualMap>] + # Optional. Visual maps for the chart. + class Visualization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] axis_type + # @return [::Google::Cloud::Chronicle::V1::AxisType] + # @!attribute [rw] display_name + # @return [::String] + # @!attribute [rw] min + # @return [::Integer] + # Minimum value to be rendered in ECharts as per + # https://echarts.apache.org/en/option.html#xAxis.min + # @!attribute [rw] max + # @return [::Integer] + # Maximum value to be rendered in ECharts as per + # https://echarts.apache.org/en/option.html#xAxis.max + class Axis + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] series_type + # @return [::Google::Cloud::Chronicle::V1::SeriesType] + # @!attribute [rw] series_name + # @return [::String] + # user specified series label + # @!attribute [rw] show_symbol + # @return [::Boolean] + # @!attribute [rw] show_background + # @return [::Boolean] + # @!attribute [rw] stack + # @return [::String] + # @!attribute [rw] series_stack_strategy + # @return [::Google::Cloud::Chronicle::V1::SeriesStackStrategy] + # @!attribute [rw] encode + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::Encode] + # @!attribute [rw] label + # @return [::String] + # @!attribute [rw] field + # @return [::String] + # @!attribute [rw] data_label + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::DataLabel] + # Optional. Data label config for a series. + # Displays data vaule in the chart + # @!attribute [rw] radius + # @return [::Array<::String>] + # Optional. Used to make a pie chart into a douhnut chart + # @!attribute [rw] item_style + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::ItemStyle] + # Optional. Custom styling for chart + # @!attribute [rw] series_unique_value + # @return [::String] + # Optional. Series unique value from the query result + # @!attribute [rw] area_style + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::AreaStyle] + # Optional. Custom styling for area chart + # @!attribute [rw] item_colors + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::ItemColors] + # Optional. Field to be saved for retrieving slice colors for the chart + # @!attribute [rw] gauge_config + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeConfig] + # Optional. Field to be saved for retrieving gauge config for gauge chart + # @!attribute [rw] metric_trend_config + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::MetricTrendConfig] + # Optional. Fields to capture trend config for metric charts + class Series + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] x + # @return [::String] + # @!attribute [rw] y + # @return [::String] + # @!attribute [rw] value + # @return [::String] + # For some type of series that are not in any coordinate system, like + # 'pie' + # @!attribute [rw] item_name + # @return [::String] + # This is useful in charts like 'pie', where data item name can be + # displayed in legend. + class Encode + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Data label config for a series. + # @!attribute [rw] show + # @return [::Boolean] + # Optional. Whether to show data label. + class DataLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Custom styling for chart + # @!attribute [rw] border_width + # @return [::Integer] + # Optional. Used to add border width + # @!attribute [rw] border_color + # @return [::String] + # Optional. Used to add border color + # @!attribute [rw] color + # @return [::String] + # Optional. Used to add color + class ItemStyle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Custom styling for area chart + # @!attribute [rw] color + # @return [::String] + # Optional. Used to add color + # @!attribute [rw] origin + # @return [::String] + # Optional. Used to add origin + # @!attribute [rw] shadow_blur + # @return [::Integer] + # Optional. Used to add shadow blur + # @!attribute [rw] shadow_color + # @return [::String] + # Optional. Used to add shadow color + # @!attribute [rw] shadow_offset_x + # @return [::Integer] + # Optional. Used to add shadow offsetX + # @!attribute [rw] shadow_offset_y + # @return [::Integer] + # Optional. Used to add shadow offsetY + # @!attribute [rw] opacity + # @return [::Integer] + # Optional. Used to add opacity + class AreaStyle + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User selected color and label for the slice of the chart + # @!attribute [rw] color + # @return [::String] + # Optional. User specified color of a pie slice + # @!attribute [rw] label + # @return [::String] + # Optional. User specified label for a pie slice + class UserSelectedValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Slice containing the key and value for a slice in the chart + # @!attribute [rw] key + # @return [::String] + # Optional. Key for the slice + # @!attribute [rw] value + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::UserSelectedValues] + # Optional. Value for the slice + class ChartSliceColor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Field to be saved for retrieving slice colors for the chart + # @!attribute [rw] colors + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::ChartSliceColor>] + # Optional. Slice colors array + class ItemColors + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Field to be saved for retrieving value and color for gauge chart + # @!attribute [rw] value + # @return [::Integer] + # Optional. Value for gauge chart + # @!attribute [rw] color + # @return [::String] + # Optional. Color for gauge chart + class GaugeValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Field to be saved for retrieving value and color for gauge chart + # @!attribute [rw] base_value + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeValue] + # Optional. Base value for gauge chart + # @!attribute [rw] limit_value + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeValue] + # Optional. Limit value for gauge chart + # @!attribute [rw] threshold_values + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeValue>] + # Optional. Threshold values for gauge chart + class GaugeConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metric trend config for displaying trend value in Metrics chart + # @!attribute [rw] metric_format + # @return [::Google::Cloud::Chronicle::V1::MetricFormat] + # Optional. Metric chart configuration to display metric trend + # @!attribute [rw] show_metric_trend + # @return [::Boolean] + # Optional. Metric chart configuration to toggle the trend value + # display + # @!attribute [rw] metric_display_trend + # @return [::Google::Cloud::Chronicle::V1::MetricDisplayTrend] + # Optional. Metric chart configuration to display the trend value + # @!attribute [rw] metric_trend_type + # @return [::Google::Cloud::Chronicle::V1::MetricTrendType] + # Optional. Metric chart configuration to display trend type whether + # regular or inverse + class MetricTrendConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] show + # @return [::Boolean] + # @!attribute [rw] tooltip_trigger + # @return [::Google::Cloud::Chronicle::V1::ToolTipTrigger] + class Tooltip + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] id + # @return [::String] + # @!attribute [rw] show + # @return [::Boolean] + # @!attribute [rw] z_level + # @return [::Integer] + # @!attribute [rw] z + # @return [::Integer] + # @!attribute [rw] left + # @return [::Integer] + # @!attribute [rw] top + # @return [::Integer] + # @!attribute [rw] right + # @return [::Integer] + # @!attribute [rw] bottom + # @return [::Integer] + # @!attribute [rw] legend_orient + # @return [::Google::Cloud::Chronicle::V1::LegendOrient] + # @!attribute [rw] legend_align + # @return [::Google::Cloud::Chronicle::V1::LegendAlign] + # @!attribute [rw] padding + # @return [::Array<::Integer>] + class Legend + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Column Definition. + # @!attribute [rw] field + # @return [::String] + # Field key in data. + # @!attribute [rw] header + # @return [::String] + # Header name for column. + class ColumnDef + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Column render type settings. This is used to determine the data render + # type of the column in the table. + # @!attribute [rw] field + # @return [::String] + # Optional. Field key in data. + # @!attribute [rw] column_render_type + # @return [::Google::Cloud::Chronicle::V1::RenderType] + # Optional. Column render type. + class ColumnRenderTypeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for tooltip for column header and cell. + # @!attribute [rw] field + # @return [::String] + # Required. Field key in data. + # @!attribute [rw] header_tooltip_text + # @return [::String] + # Optional. Column header tooltip text. + # @!attribute [rw] cell_tooltip_text + # @return [::String] + # Optional. Column cell tooltip text. + class ColumnTooltipSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for table appearance. + # @!attribute [rw] enable_text_wrap + # @return [::Boolean] + # Optional. Whether to show the table. + # @!attribute [rw] column_render_type_settings + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::ColumnRenderTypeSettings>] + # Optional. Column render type settings. + # @!attribute [rw] column_tooltip_settings + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::ColumnTooltipSettings>] + # Optional. Settings for tooltip for column header and cell. + class TableConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Google Maps config for a chart if chart type is map. + # @!attribute [rw] data_settings + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig::DataSettings] + # Optional. Data settings for the map. + # @!attribute [rw] plot_mode + # @return [::Google::Cloud::Chronicle::V1::PlotMode] + # Optional. Plot mode for the map. This is used to determine whether to + # show points, heatmap or both. + # @!attribute [rw] map_position + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig::MapPosition] + # Optional. Map position settings for the map. + # @!attribute [rw] point_settings + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig::PointSettings] + # Optional. Point settings for the map. + class GoogleMapsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Data settings for the map. + # @!attribute [rw] latitude_column + # @return [::String] + # Optional. Latitude column. + # @!attribute [rw] longitude_column + # @return [::String] + # Optional. Longitude column. + # @!attribute [rw] count_column + # @return [::String] + # Optional. Field to count. + class DataSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Map position settings for the map. + # @!attribute [rw] fit_data + # @return [::Boolean] + # Optional. Whether to fit the map to the data. + # If true, the map will be resized to fit the data. + # If false, langitude and longitude will be used to set the map size. + # @!attribute [rw] latitude_value + # @return [::Float] + # Optional. Latitude of the map. + # @!attribute [rw] longitude_value + # @return [::Float] + # Optional. Longitude of the map. + # @!attribute [rw] zoom_scale_value + # @return [::Float] + # Optional. Scale of the map. + class MapPosition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Point settings for the map. + # @!attribute [rw] point_size_type + # @return [::Google::Cloud::Chronicle::V1::PointSizeType] + # Optional. Point size type for the map. This is used to + # determine the size of the points on the map. + # @!attribute [rw] color + # @return [::String] + # Optional. Color for the point on the map. + class PointSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Conveys what range of values should be rendered in what color. This field + # is used when threshold_coloring_enabled is true. + # @!attribute [rw] visual_map_type + # @return [::Google::Cloud::Chronicle::V1::VisualMapType] + # Optional. Contains one of the valid visual map types such as + # 'continuous' or 'piecewise'. + # @!attribute [rw] pieces + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::VisualMap::VisualMapPiece>] + # Optional. Pieces of the visual map. + class VisualMap + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An ECharts visual map of type 'piecewise' contain many pieces. Each + # piece has a min, max, and color with which it's rendered. + # @!attribute [rw] min + # @return [::Integer] + # Optional. Minimum value for the piece. + # @!attribute [rw] max + # @return [::Integer] + # Optional. Minimum value for the piece. + # @!attribute [rw] color + # @return [::String] + # Optional. Color to render the piece in when the value is between min + # and max. + # @!attribute [rw] label + # @return [::String] + # Optional. Label used in visual map controller. + class VisualMapPiece + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Drill down configuration. + # @!attribute [rw] left_drill_downs + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown>] + # Required. Left click drill downs. + # @!attribute [rw] right_drill_downs + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown>] + # Required. Right click drill downs. + class DrillDownConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Drill down config. + # @!attribute [rw] default_settings + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::DefaultDrillDownSettings] + # Default drill down settings. + # + # Note: The following fields are mutually exclusive: `default_settings`, `custom_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_settings + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings] + # Custom drill down settings. + # + # Note: The following fields are mutually exclusive: `custom_settings`, `default_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] id + # @return [::String] + # Required. ID of the drill down. + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the drill down. + class DrillDown + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Default drill down settings. + # @!attribute [rw] enabled + # @return [::Boolean] + # Required. Whether the default drill down is enabled. + class DefaultDrillDownSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Custom drill down settings. + # @!attribute [rw] query + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownQuery] + # Drill down query action config. + # + # Note: The following fields are mutually exclusive: `query`, `filter`, `external_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] filter + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter] + # Drill down filter action config. + # + # Note: The following fields are mutually exclusive: `filter`, `query`, `external_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] external_link + # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownExternalLink] + # Drill down external link action config. + # + # Note: The following fields are mutually exclusive: `external_link`, `query`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] new_tab + # @return [::Boolean] + # Required. Whether to open the drill down action in a new tab. + # @!attribute [rw] left_click_column + # @return [::String] + # Optional. Table chart column name to associate the custom drill down + # action on left click. + class CustomDrillDownSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Drill down query config. + # @!attribute [rw] query + # @return [::String] + # Required. Search query to be executed on drill down. + class DrillDownQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Drill down filter config. + # @!attribute [rw] dashboard_filters + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter::DrillDownDashboardFilter>] + # Required. Dashboard filters to be applied on drill down. + class DrillDownFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Drill down dashboard filter config. + # @!attribute [rw] dashboard_filter_id + # @return [::String] + # Required. ID of the dashboard filter. + # @!attribute [rw] filter_operator_and_values + # @return [::Array<::Google::Cloud::Chronicle::V1::FilterOperatorAndValues>] + # Required. Filter operator and field values for the dashboard + # filter. + class DrillDownDashboardFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Drill down external link config. + # @!attribute [rw] link + # @return [::String] + # Required. External link the drill down action should redirect to. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the external link. + class DrillDownExternalLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + + # Button config for a chart. + # @!attribute [rw] label + # @return [::String] + # @!attribute [rw] hyperlink + # @return [::String] + # @!attribute [rw] description + # @return [::String] + # @!attribute [rw] new_tab + # @return [::Boolean] + # Optional. Whether to open the link in a new tab. + # @!attribute [rw] properties + # @return [::Google::Cloud::Chronicle::V1::Button::Properties] + class Button + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] color + # @return [::String] + # @!attribute [rw] button_style + # @return [::Google::Cloud::Chronicle::V1::ButtonStyle] + class Properties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Markdown config for a dashboard tile. + # @!attribute [rw] content + # @return [::String] + # Required. Markdown content. + # @!attribute [rw] properties + # @return [::Google::Cloud::Chronicle::V1::Markdown::MarkdownProperties] + # Optional. Properties for the markdown. + class Markdown + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Properties for the markdown. + # @!attribute [rw] background_color + # @return [::String] + # Optional. Background color of the markdown. + class MarkdownProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message to get a dashboard chart. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the dashboardChart to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardCharts/\\{chart} + class GetDashboardChartRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to get dashboard charts in batch. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource shared by all dashboard charts being + # retrieved. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance} If this is + # set, the parent of all of the dashboard charts specified in `names` must + # match this field. + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The names of the dashboard charts to get. + class BatchGetDashboardChartsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for getting dashboard charts in batch. + # @!attribute [rw] dashboard_charts + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart>] + # The dashboardCharts from the specified chronicle instance. + class BatchGetDashboardChartsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # TileType indicates what type of chart tile it is i.e., visualization chart, + # button or text. + module TileType + # Defaults to VISUALIZATION. + TILE_TYPE_UNSPECIFIED = 0 + + # Visualization i.e., bar charts, pie charts etc. + TILE_TYPE_VISUALIZATION = 1 + + # Button with hyperlink. + TILE_TYPE_BUTTON = 2 + + # Markdown tile. + TILE_TYPE_MARKDOWN = 3 + end + + # Render type of the data in the chart. + module RenderType + # Defaults to Unspecified. + RENDER_TYPE_UNSPECIFIED = 0 + + # Text render type. + RENDER_TYPE_TEXT = 1 + + # Icon render type. + RENDER_TYPE_ICON = 2 + + # Icon and text render type. + RENDER_TYPE_ICON_AND_TEXT = 3 + end + + module AxisType + AXIS_TYPE_UNSPECIFIED = 0 + + VALUE = 1 + + CATEGORY = 2 + + TIME = 3 + + LOG = 4 + end + + module SeriesType + SERIES_TYPE_UNSPECIFIED = 0 + + LINE = 1 + + BAR = 2 + + PIE = 3 + + TEXT = 4 + + # Represents map chart type. + MAP = 5 + + # Represents gauge chart type. + GAUGE = 6 + + # Represents scatterplot chart type. + SCATTERPLOT = 7 + end + + module SeriesStackStrategy + SERIES_STACK_STRATEGY_UNSPECIFIED = 0 + + SAMESIGN = 1 + + ALL = 2 + + POSITIVE = 3 + + NEGATIVE = 4 + end + + module ToolTipTrigger + TOOLTIP_TRIGGER_UNSPECIFIED = 0 + + TOOLTIP_TRIGGER_NONE = 1 + + TOOLTIP_TRIGGER_ITEM = 2 + + TOOLTIP_TRIGGER_AXIS = 3 + end + + module LegendOrient + LEGEND_ORIENT_UNSPECIFIED = 0 + + VERTICAL = 1 + + HORIZONTAL = 2 + end + + module LegendAlign + LEGEND_ALIGN_UNSPECIFIED = 0 + + AUTO = 1 + + LEFT = 2 + + RIGHT = 3 + end + + module ButtonStyle + BUTTON_STYLE_UNSPECIFIED = 0 + + BUTTON_STYLE_FILLED = 1 + + BUTTON_STYLE_OUTLINED = 2 + + BUTTON_STYLE_TRANSPARENT = 3 + end + + # Plot mode for the map. + module PlotMode + # Plot mode is not specified. + PLOT_MODE_UNSPECIFIED = 0 + + # Plot mode is points. + PLOT_MODE_POINTS = 1 + + # Plot mode is heatmap. + PLOT_MODE_HEATMAP = 2 + + # Plot mode is both points and heatmap. + PLOT_MODE_BOTH = 3 + end + + # Point size type for the map. + module PointSizeType + # Point size is not specified. + POINT_SIZE_TYPE_UNSPECIFIED = 0 + + # Point size is fixed. + POINT_SIZE_TYPE_FIXED = 1 + + # Point size is proportional to the size of the data point. + POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE = 2 + end + + # Metric format to be displayed for the metric charts. + module MetricFormat + # Metric format is not specified. + METRIC_FORMAT_UNSPECIFIED = 0 + + # Metric format in number + METRIC_FORMAT_NUMBER = 1 + + # Metric format in plain text + METRIC_FORMAT_PLAIN_TEXT = 2 + end + + # Trend to be displayed for the metric charts as. + module MetricDisplayTrend + # Trend is not specified. + METRIC_DISPLAY_TREND_UNSPECIFIED = 0 + + # Trend data in absolute value + METRIC_DISPLAY_TREND_ABSOLUTE_VALUE = 2 + + # Trend data in percentage + METRIC_DISPLAY_TREND_PERCENTAGE = 3 + + # Trend data in both absolute value and percentage + METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE = 4 + end + + # Trend to be displayed for the metric charts as. + module MetricTrendType + # Trend type is not specified. + METRIC_TREND_TYPE_UNSPECIFIED = 0 + + # The trend type is regular(green for positive delta) + METRIC_TREND_TYPE_REGULAR = 1 + + # The trend type is inverse(red for positive delta) + METRIC_TREND_TYPE_INVERSE = 2 + end + + # Visual map for various charts. More info: + # https://echarts.apache.org/en/option.html#visualMap + module VisualMapType + # Visual map type is not specified + VISUAL_MAP_TYPE_UNSPECIFIED = 0 + + # Continuous visual map + CONTINUOUS = 1 + + # Piecewise visual map + PIECEWISE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb new file mode 100644 index 000000000000..7a1dca16bc9a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb @@ -0,0 +1,653 @@ +# 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 Chronicle + module V1 + # DashboardQuery resource. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the dashboardQuery. + # @!attribute [rw] query + # @return [::String] + # Required. Search query string. + # @!attribute [rw] input + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery::Input] + # Required. Inputs to the query. + # @!attribute [r] dashboard_chart + # @return [::String] + # Output only. DashboardChart this query belongs to. + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + class DashboardQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Input to the query like time window. + # @!attribute [rw] time_window + # @return [::Google::Type::Interval] + # time range to fetch the data for. + # + # Note: The following fields are mutually exclusive: `time_window`, `relative_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] relative_time + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery::Input::RelativeTime] + # time range for last x units. + # + # Note: The following fields are mutually exclusive: `relative_time`, `time_window`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Input + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # time representation for last x units. + # @!attribute [rw] time_unit + # @return [::Google::Cloud::Chronicle::V1::TimeUnit] + # @!attribute [rw] start_time_val + # @return [::Integer] + class RelativeTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Request message to get a dashboard query. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the dashboardQuery to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardQueries/\\{query} + class GetDashboardQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to execute a dashboard query. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, under which to run this dashboardQuery. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] query + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # Required. The query to execute and get results back for. + # QueryID or 'query', 'input.time_window' fields will be used. Use + # 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard + # query. + # @!attribute [rw] filters + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter>] + # Optional. Dashboard level filters other than query string. + # @!attribute [rw] clear_cache + # @return [::Boolean] + # Optional. When true, the backend would read from the database, rather than + # fetching data directly from the cache. + # @!attribute [rw] use_previous_time_range + # @return [::Boolean] + # Optional. When true, the backend will execute the query against the + # previous time range of the query. + class ExecuteDashboardQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Runtime error for a dashboard query. + # @!attribute [rw] error_title + # @return [::String] + # Short Description of the error. + # @!attribute [rw] error_description + # @return [::String] + # Error message + # @!attribute [rw] error_severity + # @return [::Google::Cloud::Chronicle::V1::QueryRuntimeError::ErrorSeverity] + # Severity of the error. + # @!attribute [rw] metadata + # @return [::Array<::Google::Cloud::Chronicle::V1::QueryRuntimeError::QueryRuntimeErrorMetadata>] + # Metadata for the error. + # @!attribute [rw] warning_reason + # @return [::Google::Cloud::Chronicle::V1::QueryRuntimeError::WarningReason] + # Reason for the error. + class QueryRuntimeError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Metadata for the error. + # @!attribute [rw] key + # @return [::Google::Cloud::Chronicle::V1::QueryRuntimeError::MetadataKey] + # Metadata key. + # @!attribute [rw] value + # @return [::String] + # Metadata value. + class QueryRuntimeErrorMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Based on ErrorSeverity, UI will choose to format the error differently. + module ErrorSeverity + # Severity is unknown. + ERROR_SEVERITY_UNSPECIFIED = 0 + + # Severity is warning. + WARNING = 1 + + # Error is severe. + SEVERE = 2 + end + + # Metadata enum to identify the metadata key. + module MetadataKey + # Key is unknown. + METADATA_KEY_UNSPECIFIED = 0 + + # Key is row limit. + ROW_LIMIT = 1 + end + + # Warning reason. + module WarningReason + # Reason is unknown. + WARNING_REASON_UNSPECIFIED = 0 + + # Reason is row limit exceeded. + ROW_LIMIT_EXCEEDED = 1 + + # Reason is default row limit exceeded. + DEFAULT_ROW_LIMIT_EXCEEDED = 2 + + # Reason is curated query default row limit exceeded. + CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED = 3 + end + end + + # Response message for executing a dashboard query. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnData>] + # Result rows that are queried. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Cloud::Chronicle::V1::DataSource>] + # Datasource of the query and results. + # @!attribute [rw] last_backend_cache_refreshed_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Last time the cache was refreshed. This would be used by the UI + # to show the last updated time. + # @!attribute [rw] time_window + # @return [::Google::Type::Interval] + # Time window against which query was executed. + # @!attribute [rw] query_runtime_errors + # @return [::Array<::Google::Cloud::Chronicle::V1::QueryRuntimeError>] + # Runtime errors + # @!attribute [rw] language_features + # @return [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] + # Optional. Language features found in the query. + class ExecuteDashboardQueryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # LINT.IfChange(stats_data) + # Value of the column based on data type. + # @!attribute [rw] null_val + # @return [::Boolean] + # True if the value is NULL. + # + # Note: The following fields are mutually exclusive: `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_val + # @return [::Boolean] + # Boolean value. + # + # Note: The following fields are mutually exclusive: `bool_val`, `null_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bytes_val + # @return [::String] + # Bytes value. + # + # Note: The following fields are mutually exclusive: `bytes_val`, `null_val`, `bool_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] double_val + # @return [::Float] + # Double value. + # + # Note: The following fields are mutually exclusive: `double_val`, `null_val`, `bool_val`, `bytes_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int64_val + # @return [::Integer] + # Integer value (signed). + # + # Note: The following fields are mutually exclusive: `int64_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] uint64_val + # @return [::Integer] + # Un-signed integer value. + # + # Note: The following fields are mutually exclusive: `uint64_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_val + # @return [::String] + # String value. Enum values are returned as strings. + # + # Note: The following fields are mutually exclusive: `string_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] timestamp_val + # @return [::Google::Protobuf::Timestamp] + # Timestamp values. Does not handle `interval`. + # + # Note: The following fields are mutually exclusive: `timestamp_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] date_val + # @return [::Google::Type::Date] + # Date values. + # + # Note: The following fields are mutually exclusive: `date_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] proto_val + # @return [::Google::Protobuf::Any] + # For any proto values that are not any of the above. + # + # Note: The following fields are mutually exclusive: `proto_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnValue::ValueMetadata] + class ColumnValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] links + # @return [::Array<::Google::Cloud::Chronicle::V1::InAppLink>] + # "Auto" generated In-app links. + # @!attribute [rw] field_paths + # @return [::Array<::String>] + # @!attribute [rw] timestamp_val + # @return [::Google::Protobuf::Timestamp] + # Timestamp value to store the timestamp for the case of the date and + # time data type. + class ValueMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Singular vs list of values in a column. + # @!attribute [rw] value + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnValue] + # Single value in a column. + # + # Note: The following fields are mutually exclusive: `value`, `list`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list + # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnType::List] + # List of values in a column e.g. IPs + # + # Note: The following fields are mutually exclusive: `list`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ColumnType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Store list of values in a column. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnValue>] + class List + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] column + # @return [::String] + # Used to store column names. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnType>] + # To store column data. + # @!attribute [rw] metadata + # @return [::Google::Cloud::Chronicle::V1::ColumnMetadata] + # To store column metadata. + class ColumnData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Dashboard level filter that can be used in native dashboards as well as + # inputs to execute query. + # @!attribute [rw] id + # @return [::String] + # ID of the filter. + # @!attribute [rw] data_source + # @return [::Google::Cloud::Chronicle::V1::DataSource] + # Datasource the filter is applicable for. + # @!attribute [rw] field_path + # @return [::String] + # Filter field path. + # @!attribute [rw] filter_operator_and_field_values + # @return [::Array<::Google::Cloud::Chronicle::V1::FilterOperatorAndValues>] + # Operator and values. Can include multiple modifiers. + # @!attribute [rw] display_name + # @return [::String] + # Display name of the filter. + # @!attribute [rw] chart_ids + # @return [::Array<::String>] + # Chart IDs the filter is applicable for. + # @!attribute [rw] is_standard_time_range_filter + # @return [::Boolean] + # Optional. Whether the filter is a standard time range filter, + # meaning that it has to be used as the query time range, + # and not as a predicate in the query. + # A chart can have at most one standard time range filter applied. + # @!attribute [rw] is_mandatory + # @return [::Boolean] + # Optional. Whether this filter is required to be populated by the + # dashboard consumer prior to the dashboard loading. + # @!attribute [rw] is_standard_time_range_filter_enabled + # @return [::Boolean] + # Optional. Whether this standard time range filter is enabled. + # @!attribute [rw] advanced_filter_config + # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig] + # Optional. Advanced filter configuration for the filter widget. + class DashboardFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] filter_operator + # @return [::Google::Cloud::Chronicle::V1::FilterOperator] + # Operator for a single filter modifier. + # @!attribute [rw] field_values + # @return [::Array<::String>] + # Values for the modifier. All operators should have a single value other + # than 'IN' and 'BETWEEN'. 'PAST' will have negative seconds + # like -86400 is past 1 day. + class FilterOperatorAndValues + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Advanced filter configuration for the filter widget. + # @!attribute [rw] token + # @return [::String] + # Required. The token name to look for in the query (e.g., "hostname"). + # The system will automatically wrap this in '$' (e.g., "$hostname$"). + # @!attribute [rw] prefix + # @return [::String] + # Optional. String to prepend to the final replaced value (e.g., "/", "^(", + # "\""). + # @!attribute [rw] suffix + # @return [::String] + # Optional. String to append to the final replaced value (e.g., "/", ")$", + # "\""). + # @!attribute [rw] separator + # @return [::String] + # Optional. Delimiter to join multiple selected values (e.g., "|", " OR field + # = "). + # @!attribute [rw] multiple_allowed + # @return [::Boolean] + # Optional. Whether to allow selection of multiple values. + # @!attribute [rw] default_values + # @return [::Array<::String>] + # Optional. Default values to use if no value is selected/provided. + # @!attribute [rw] skip_default_affixes + # @return [::Boolean] + # Optional. Whether to skip the configured prefix and suffix when using + # default values. If true, default values are inserted raw (joined by the + # separator). + # @!attribute [rw] value_source + # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig::ValueSource] + # Required. Source of the values for the filter. + class AdvancedFilterConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Source of the values for the filter. + # @!attribute [rw] manual_options + # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig::ManualOptions] + # Optional. Manual options provided by the user. + # + # Note: The following fields are mutually exclusive: `manual_options`, `query_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] query_options + # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig::QueryOptions] + # Optional. Query options to fetch the values from the query engine. + # This is used for the filter's population query. + # + # Note: The following fields are mutually exclusive: `query_options`, `manual_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ValueSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Manual options provided by the user. + # @!attribute [rw] options + # @return [::Array<::String>] + # Optional. The options provided by the user. + # The max number of options is limited to 10000. + class ManualOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Query options to fetch the values from the query engine. + # This is used for the filter's population query. + # @!attribute [rw] query + # @return [::String] + # Required. The query to execute to fetch the values. + # @!attribute [rw] column + # @return [::String] + # Required. The column name to use for the values. + # @!attribute [rw] global_time_filter_enabled + # @return [::Boolean] + # Optional. Enable global time filter + # @!attribute [rw] input + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery::Input] + # Optional. Time range input specifically for the filter's population + # query. + class QueryOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # In app linking start + # @!attribute [rw] url + # @return [::String] + # URL to redirect to. + # @!attribute [rw] label + # @return [::String] + # Label for the link. + # @!attribute [rw] icon_url + # @return [::String] + # Icon url for the link. + class InAppLink + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of the column. + # @!attribute [rw] column + # @return [::String] + # Name of the column. + # @!attribute [rw] field_path + # @return [::String] + # Field path of the queried field, if any. + # @!attribute [rw] function_name + # @return [::String] + # Name of the function used to query the field, if any. + # @!attribute [rw] function_module + # @return [::String] + # Module of the function used to query the field, if any. + # @!attribute [rw] data_source + # @return [::Google::Cloud::Chronicle::V1::DataSource] + # Data source queried. + # @!attribute [rw] timestamp_metadata + # @return [::Google::Cloud::Chronicle::V1::TimestampMetadata] + # Timestamp Metadata + # @!attribute [rw] longitude + # @return [::Boolean] + # Whether the column is a longitude field. + # @!attribute [rw] latitude + # @return [::Boolean] + # Whether the column is a latitude field. + # @!attribute [rw] selected + # @return [::Boolean] + # Whether the column is selected in the final response. + # @!attribute [rw] unselected + # @return [::Boolean] + # Whether the column is unselected in the final response. + class ColumnMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata of the timestamp column. + # @!attribute [rw] time_format + # @return [::String] + # Time format of the timestamp column. + # @!attribute [rw] time_zone + # @return [::String] + # Time zone of the timestamp column. + # @!attribute [rw] time_granularity + # @return [::String] + # Time granularity of the timestamp column. + # @!attribute [rw] is_sortable + # @return [::Boolean] + # Whether the timestamp column is sortable in UI. + # @!attribute [rw] is_interpolable + # @return [::Boolean] + # Whether the timestamp column is interpolable in UI. + class TimestampMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A language feature describes a specific capability or syntax of the query + # language used in a dashboard query, such as `JOINS`, `STAGES`, or + # `DATA_TABLES`. + module LanguageFeature + # Language feature is unknown. + LANGUAGE_FEATURE_UNSPECIFIED = 0 + + # Language feature is joins. + JOINS = 1 + + # Language feature is stages. + STAGES = 2 + + # Language feature is data table. + DATA_TABLES = 3 + end + + module FilterOperator + # Default unspecified. + FILTER_OPERATOR_UNSPECIFIED = 0 + + EQUAL = 1 + + NOT_EQUAL = 2 + + IN = 3 + + GREATER_THAN = 4 + + GREATER_THAN_OR_EQUAL_TO = 5 + + LESS_THAN = 6 + + LESS_THAN_OR_EQUAL_TO = 7 + + BETWEEN = 8 + + PAST = 9 + + IS_NULL = 10 + + IS_NOT_NULL = 11 + + STARTS_WITH = 12 + + ENDS_WITH = 13 + + DOES_NOT_STARTS_WITH = 14 + + DOES_NOT_ENDS_WITH = 15 + + NOT_IN = 16 + + # CONTAINS is used for substring match. + CONTAINS = 17 + + # Used if we want to check if the field does not contain the substring. + DOES_NOT_CONTAIN = 18 + end + + # LINT.IfChange(data_sources) + module DataSource + DATA_SOURCE_UNSPECIFIED = 0 + + UDM = 1 + + ENTITY = 2 + + INGESTION_METRICS = 3 + + # RULE_DETECTIONS is used for detections datasource. + RULE_DETECTIONS = 4 + + # RULESETS is used for ruleset with detections datasource. + RULESETS = 5 + + # GLOBAL is used for standard time range filter. + GLOBAL = 6 + + # IOC_MATCHES is used for ioc_matches datasource. + IOC_MATCHES = 7 + + # RULES is used for rules datasource. + RULES = 8 + + # SOAR Cases - identified as `case`. + SOAR_CASES = 9 + + # SOAR Playbooks - identified as `playbook`. + SOAR_PLAYBOOKS = 10 + + # SOAR Case History - identified as `case_history`. + SOAR_CASE_HISTORY = 11 + + # DATA_TABLE is used for data tables source. + DATA_TABLE = 12 + + # INVESTIGATION is used as the data source for triage agent investigations. + # Identified as `gemini_investigation`. + INVESTIGATION = 13 + + # INVESTIGATION_FEEDBACK is used as the data source for user feedback on + # triage agent investigations. Identified as `gemini_investigation_feedback`. + INVESTIGATION_FEEDBACK = 14 + end + + # TimeUnit supported for PAST filter operator. + module TimeUnit + # Default unspecified. + TIME_UNIT_UNSPECIFIED = 0 + + SECOND = 1 + + MINUTE = 2 + + HOUR = 3 + + DAY = 4 + + WEEK = 5 + + MONTH = 6 + + YEAR = 7 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb new file mode 100644 index 000000000000..1342c3da69d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb @@ -0,0 +1,364 @@ +# 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 Chronicle + module V1 + # Request message for CreateDataAccessLabel. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this Data Access Label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] data_access_label + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # Required. Data access label to create. + # @!attribute [rw] data_access_label_id + # @return [::String] + # Required. The ID to use for the data access label, which will become the + # label's display name and the final component of the label's resource name. + # The maximum number of characters should be 63. Regex pattern is as per AIP: + # https://google.aip.dev/122#resource-id-segments + class CreateDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to retrieve a data access label. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access label to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + class GetDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListDataAccessLabels. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data access label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of data access labels to return. The service may return + # fewer than this value. If unspecified, at most 100 data access labels will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListDataAccessLabelsRequest` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessLabel and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + class ListDataAccessLabelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListDataAccessLabels. + # @!attribute [rw] data_access_labels + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # List of data access labels. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDataAccessLabelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateDataAccessLabel method. + # @!attribute [rw] data_access_label + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # Required. The data access label to update. + # + # The label's `name` field is used to identify the label to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description and definition + # fields are supported for update; an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + class UpdateDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete a data access label. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access label to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + class DeleteDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateDataAccessScope. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this Data Access Scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] data_access_scope + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # Required. Data access scope to create. + # @!attribute [rw] data_access_scope_id + # @return [::String] + # Required. The user provided scope id which will become the last part of the + # name of the scope resource. Needs to be compliant with + # https://google.aip.dev/122 + class CreateDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to retrieve a data access scope. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access scope to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + class GetDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListDataAccessScopes. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data access scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of data access scopes to return. The service may return + # fewer than this value. If unspecified, at most 100 data access scopes will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListDataAccessScopesRequest` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessScope and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + class ListDataAccessScopesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListDataAccessScopes. + # @!attribute [rw] data_access_scopes + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # List of data access scopes. + # @!attribute [rw] global_data_access_scope_granted + # @return [::Boolean] + # Whether or not global scope is granted to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDataAccessScopesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateDataAccessScope method. + # @!attribute [rw] data_access_scope + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # Required. The data access scope to update. + # + # The scope's `name` field is used to identify the scope to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description, the allowed + # and denied labels list fields are supported for update; + # an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + class UpdateDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete a data access scope. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access scope to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + class DeleteDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A DataAccessLabel is a label on events to define user access to data. + # @!attribute [rw] udm_query + # @return [::String] + # A UDM query over event data. + # @!attribute [rw] name + # @return [::String] + # The unique resource name of the data access label. + # @!attribute [r] display_name + # @return [::String] + # Output only. The short name displayed for the label as it appears on event + # data. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access label was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access label was last updated. + # @!attribute [r] author + # @return [::String] + # Output only. The user who created the data access label. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The user who last updated the data access label. + # @!attribute [rw] description + # @return [::String] + # Optional. A description of the data access label for a human reader. + class DataAccessLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A DataAccessScope is a boolean expression of data access labels used + # to restrict access to data for users. + # @!attribute [rw] name + # @return [::String] + # Required. The unique full name of the data access scope. + # The name should comply with https://google.aip.dev/122 standards. + # @!attribute [rw] allowed_data_access_labels + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] + # Optional. The allowed labels for the scope. + # Either allow_all or allowed_data_access_labels needs to be provided. + # When provided, there has to be at least one label allowed for the scope to + # be valid. + # The logical operator for evaluation of the allowed labels is OR. + # E.g.: A customer with scope with allowed labels A and B will be able + # to see data with labeled with A or B or (A and B). + # @!attribute [rw] denied_data_access_labels + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] + # Optional. The denied labels for the scope. + # The logical operator for evaluation of the denied labels is AND. + # E.g.: A customer with scope with denied labels A and B won't be able + # to see data labeled with A and data labeled with B + # and data with labels A and B. + # @!attribute [r] display_name + # @return [::String] + # Output only. The name to be used for display to customers of the data + # access scope. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access scope was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access scope was last updated. + # @!attribute [r] author + # @return [::String] + # Output only. The user who created the data access scope. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The user who last updated the data access scope. + # @!attribute [rw] description + # @return [::String] + # Optional. A description of the data access scope for a human reader. + # @!attribute [rw] allow_all + # @return [::Boolean] + # Optional. Whether or not the scope allows all labels, allow_all and + # allowed_data_access_labels are mutually exclusive and one of them must be + # present. denied_data_access_labels can still be used along with allow_all. + # When combined with denied_data_access_labels, access will be granted to all + # data that doesn't have labels mentioned in denied_data_access_labels. E.g.: + # A customer with scope with denied labels A and B and allow_all will be able + # to see all data except data labeled with A and data labeled with B and data + # with labels A and B. + class DataAccessScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Reference object to a data access label. + # @!attribute [rw] data_access_label + # @return [::String] + # The name of the data access label. + # + # Note: The following fields are mutually exclusive: `data_access_label`, `log_type`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] log_type + # @return [::String] + # The name of the log type. + # + # Note: The following fields are mutually exclusive: `log_type`, `data_access_label`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] asset_namespace + # @return [::String] + # The asset namespace configured in the forwarder + # of the customer's events. + # + # Note: The following fields are mutually exclusive: `asset_namespace`, `data_access_label`, `log_type`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ingestion_label + # @return [::Google::Cloud::Chronicle::V1::IngestionLabel] + # The ingestion label configured in the forwarder of the customer's events. + # + # Note: The following fields are mutually exclusive: `ingestion_label`, `data_access_label`, `log_type`, `asset_namespace`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the label. + # Data access label and log types's name + # will match the display name of the resource. + # The asset namespace will match the namespace itself. + # The ingestion key value pair will match the key of the tuple. + class DataAccessLabelReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Representation of an ingestion label type. + # @!attribute [rw] ingestion_label_key + # @return [::String] + # Required. The key of the ingestion label. Always required. + # @!attribute [rw] ingestion_label_value + # @return [::String] + # Optional. The value of the ingestion label. Optional. An object + # with no provided value and some key provided would match + # against the given key and ANY value. + class IngestionLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb new file mode 100644 index 000000000000..dbbe11a22639 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb @@ -0,0 +1,512 @@ +# 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 Chronicle + module V1 + # A request to create DataTable. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] data_table + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # Required. The data table being created. + # @!attribute [rw] data_table_id + # @return [::String] + # Required. The ID to use for the data table. This is also the display name + # for the data table. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Must be unique and has length < 256. + class CreateDataTableRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get details about a data table. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data table to retrieve. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + class GetDataTableRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update details of data table. + # @!attribute [rw] data_table + # @return [::Google::Cloud::Chronicle::V1::DataTable] + # Required. This field is used to identify the datatable to update. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of metadata fields to update. Currently data tables only + # support updating the `description`, `row_time_to_live` and `scope_info` + # fields. When no field mask is supplied, all non-empty fields will be + # updated. A field mask of "*" will update all fields, whether empty or not. + class UpdateDataTableRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request for a list of data tables. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data table will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of data tables to return. The service may + # return fewer than this value. If unspecified, at most 100 data tables will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataTables` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to + # `ListDataTables` must match the call that provided the page + # token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + class ListDataTablesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting data tables. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data table to delete. + # Format + # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any rows under this data table will also be + # deleted. (Otherwise, the request will only work if the data table has no + # rows.) + class DeleteDataTableRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing data tables. + # @!attribute [rw] data_tables + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTable>] + # The list of the data tables returned. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDataTablesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create data table row. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] data_table_row + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # Required. The data table row to create. + class CreateDataTableRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update data table row. + # @!attribute [rw] data_table_row + # @return [::Google::Cloud::Chronicle::V1::DataTableRow] + # Required. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. Currently data table rows only + # support updating the `values` field. When no field mask is supplied, all + # non-empty fields will be updated. A field mask of "*" will update all + # fields, whether empty or not. + class UpdateDataTableRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list data table rows. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of data table rows to return. The service may + # return fewer than this value. If unspecified, at most 100 data table rows + # will be returned. The maximum value is 1000; values above 1000 will be + # coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDataTableRows` call. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Configures ordering of DataTables in the response. + # Note: Our implementation currently supports order by "create_time asc" only + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter facilitating search over data table rows. This filter + # performs a case-insensitive substring match on the row values. + class ListDataTableRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing data table rows. + # @!attribute [rw] data_table_rows + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] + # The list of the data table rows returned. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListDataTableRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get data table row. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + class GetDataTableRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete data table row. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data table row i,e row_id. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + class DeleteDataTableRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create data table rows in bulk. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest>] + # Required. Data table rows to create. A maximum of 1000 rows (for sync + # requests) or 2000 rows (for async requests) can be created in a single + # request. Total size of the rows should be less than 4MB. + class BulkCreateDataTableRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with created data table rows. + # @!attribute [rw] data_table_rows + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] + # DataTableRows created + class BulkCreateDataTableRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get data table rows in bulk. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest>] + # Required. Data table rows to get. At max 1,000 rows can be there in a + # request. + class BulkGetDataTableRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with data table rows. + # @!attribute [rw] data_table_rows + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] + # The requested data table rows. + class BulkGetDataTableRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to replace data table rows in bulk. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest>] + # Required. Data table rows to replace the existing data table rows. A + # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) + # can be replaced in a single request. Total size of the rows should be less + # than 4MB. + class BulkReplaceDataTableRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with data table rows that replaced existing data table rows. + # @!attribute [rw] data_table_rows + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] + # DataTableRows that replaced existing data table rows + class BulkReplaceDataTableRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update data table rows in bulk. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource id of the data table. + # Format: + # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest>] + # Required. Data table rows to update. At max 1,000 rows (or rows with size + # less than 2MB) can be there in a request. + class BulkUpdateDataTableRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message with updated data table rows. + # @!attribute [rw] data_table_rows + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] + # DataTableRows updated + class BulkUpdateDataTableRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataTableScopeInfo specifies the scope info of the data table. + # @!attribute [rw] data_access_scopes + # @return [::Array<::String>] + # Required. Contains the list of scope names of the data table. If the list + # is empty, the data table is treated as unscoped. The scope names should be + # full resource names and should be of the format: + # "projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataAccessScopes/\\{scope_name}" + class DataTableScopeInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataTable represents the data table resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the data table + # Format: + # "\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}" + # @!attribute [r] display_name + # @return [::String] + # Output only. The unique display name of the data table. + # @!attribute [rw] description + # @return [::String] + # Required. A user-provided description of the data table. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Table create time + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Table update time + # @!attribute [rw] column_info + # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableColumnInfo>] + # Immutable. Details of all the columns in the table + # @!attribute [r] data_table_uuid + # @return [::String] + # Output only. Data table unique id + # @!attribute [r] rules + # @return [::Array<::String>] + # Output only. The resource names for the associated Rules that use this + # data table. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/rules/\\{rule}. + # \\{rule} here refers to the rule id. + # @!attribute [r] rule_associations_count + # @return [::Integer] + # Output only. The count of rules using the data table. + # @!attribute [rw] row_time_to_live + # @return [::String] + # Optional. User-provided TTL of the data table. + # @!attribute [r] approximate_row_count + # @return [::Integer] + # Output only. The count of rows in the data table. + # @!attribute [rw] scope_info + # @return [::Google::Cloud::Chronicle::V1::DataTableScopeInfo] + # Optional. The scope info of the data table. + # During data table creation, if this field is not set, the data + # table without scopes (an unscoped table) will be created for a global + # user. For a scoped user, this field must be set. During data table + # update, if scope_info is requested to be updated, this field must be set. + # @!attribute [r] update_source + # @return [::Google::Cloud::Chronicle::V1::DataTableUpdateSource] + # Output only. Source of the data table update. + # @!attribute [r] row_time_to_live_update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update time of the TTL of the data table. + class DataTable + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataTableRow represents a single row in a data table. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the data table + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} + # @!attribute [rw] values + # @return [::Array<::String>] + # Required. All column values for a single row. The values should be in the + # same order as the columns of the data tables. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. DataTableRow create time + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. DataTableRow update time + # @!attribute [rw] row_time_to_live + # @return [::String] + # Optional. User-provided TTL of the data table row. + class DataTableRow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataTableColumnInfo represents the column metadata of the + # datatable. The column_index represents the ordering of the + # values in DataTableRow. + # @!attribute [rw] mapped_column_path + # @return [::String] + # Entity proto field path that the column is mapped to + # + # Note: The following fields are mutually exclusive: `mapped_column_path`, `column_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] column_type + # @return [::Google::Cloud::Chronicle::V1::DataTableColumnInfo::DataTableColumnType] + # Column type can be STRING, CIDR (Ex- 10.1.1.0/24), REGEX + # + # Note: The following fields are mutually exclusive: `column_type`, `mapped_column_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] column_index + # @return [::Integer] + # Required. Column Index. 0,1,2... + # @!attribute [rw] original_column + # @return [::String] + # Required. Original column name of the Data Table (present in the CSV header + # in case of creation of data tables using file uploads). It must satisfy the + # following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Must be unique and has length < 256. + # @!attribute [rw] key_column + # @return [::Boolean] + # Optional. Whether to include this column in the calculation of the row ID. + # If no columns have key_column = true, all columns will be included in the + # calculation of the row ID. + # @!attribute [rw] repeated_values + # @return [::Boolean] + # Optional. Whether the column is a repeated values column. + class DataTableColumnInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # DataTableColumnType denotes the type of the column to be referenced in the + # rule. + module DataTableColumnType + # The default Data Table Column Type. + DATA_TABLE_COLUMN_TYPE_UNSPECIFIED = 0 + + # Denotes the type of the column as STRING. + STRING = 1 + + # Denotes the type of the column as REGEX. + REGEX = 2 + + # Denotes the type of the column as CIDR. + CIDR = 3 + + # Denotes the type of the column as NUMBER (includes int and float). + NUMBER = 4 + end + end + + # The request message for GetDataTableOperationErrors. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name for the data table operation errors. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} + class GetDataTableOperationErrorsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The message containing the errors for a data table operation. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name for the data table operation errors. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} + # @!attribute [rw] rpc_errors + # @return [::Array<::Google::Rpc::Status>] + # The list of errors. + # Replaces the deprecated `errors` field. + class DataTableOperationErrors + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DataTableUpdateSource denotes the source that updated the data table. + module DataTableUpdateSource + # The data table is updated by the user. + DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED = 0 + + # The data table is updated by the user. + USER = 1 + + # The data table is updated by the rule. + RULE = 2 + + # The data table is updated by the search. + SEARCH = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb new file mode 100644 index 000000000000..89cef26897a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb @@ -0,0 +1,210 @@ +# 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 Chronicle + module V1 + # A watchlist is a list of entities that allows for bulk operations over the + # included entities. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the watchlist. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the watchlist. + # Note that it must be at least one character and less than 63 characters + # (https://google.aip.dev/148). + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the watchlist. + # @!attribute [rw] multiplying_factor + # @return [::Float] + # Optional. Weight applied to the risk score for entities + # in this watchlist. + # The default is 1.0 if it is not specified. + # @!attribute [rw] entity_population_mechanism + # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism] + # Required. Mechanism to populate entities in the watchlist. + # @!attribute [r] entity_count + # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityCount] + # Output only. Entity count in the watchlist. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the watchlist was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the watchlist was last updated. + # @!attribute [rw] watchlist_user_preferences + # @return [::Google::Cloud::Chronicle::V1::WatchlistUserPreferences] + # Optional. User preferences for watchlist configuration. + class Watchlist + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mechanism to populate entities in the watchlist. + # @!attribute [rw] manual + # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism::Manual] + # Optional. Entities are added manually. + class EntityPopulationMechanism + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entities are added manually. + class Manual + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Count of different types of entities in the watchlist. + # @!attribute [r] user + # @return [::Integer] + # Output only. Count of user type entities in the watchlist. + # @!attribute [r] asset + # @return [::Integer] + # Output only. Count of asset type entities in the watchlist. + class EntityCount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A collection of user preferences for watchlist UI configuration. + # @!attribute [rw] pinned + # @return [::Boolean] + # Optional. Whether the watchlist is pinned on the dashboard. + class WatchlistUserPreferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a watchlist. + # @!attribute [rw] name + # @return [::String] + # Required. The parent, which owns this collection of watchlists. + # The name of the watchlist to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + class GetWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing watchlists. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of watchlists. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of watchlists to return. + # The service may return fewer than this value. + # If unspecified, at most 200 watchlists will be returned. + # The maximum value is 200; values above 200 will be coerced to 200. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListWatchlists` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListWatchlists` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Which watchlist to return in aip.dev/160 form. + # Currently, only the following filters are supported: + # - `watchlist_user_preferences.pinned=true` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + class ListWatchlistsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing watchlists. + # @!attribute [rw] watchlists + # @return [::Array<::Google::Cloud::Chronicle::V1::Watchlist>] + # Optional. The watchlists from the specified instance. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListWatchlistsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating watchlist. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this watchlist will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] watchlist_id + # @return [::String] + # Optional. The ID to use for the watchlist, + # which will become the final component of the watchlist's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @!attribute [rw] watchlist + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # Required. The watchlist to create. + class CreateWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating watchlist. + # @!attribute [rw] watchlist + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # Required. The watchlist to update. + # + # The watchlist's `name` field is used to identify the watchlist to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + class UpdateWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting watchlist. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the watchlist to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any entities under this watchlist will also be + # deleted. (Otherwise, the request will only work if the watchlist has no + # entities.) + class DeleteWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb new file mode 100644 index 000000000000..278cfefa1bc0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb @@ -0,0 +1,82 @@ +# 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 Chronicle + module V1 + # FeaturedContentMetadata holds metadata about the Featured Content. + # @!attribute [rw] id + # @return [::String] + # Required. Unique identifier of the featured content. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the featured content. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp indicating when the item was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp indicating when the item was updated. + # @!attribute [r] author + # @return [::String] + # Output only. Content item author full name. + # @!attribute [r] certified + # @return [::Boolean] + # Output only. Determine if this content item is officially certified by + # Google or created by the community. + # @!attribute [r] description + # @return [::String] + # Output only. The description of the content item. + # @!attribute [r] categories + # @return [::Array<::String>] + # Output only. Categories the content is associated with. + # @!attribute [r] version + # @return [::String] + # Output only. Featured content version (Major.Minor.Patch). + # @!attribute [r] verified + # @return [::Boolean] + # Output only. Whether the content is verified by Google (applicable for 3rd + # party content). + # @!attribute [r] source_type + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentMetadata::ContentSourceType] + # Output only. The source type of the content. + class FeaturedContentMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # ContentSourceType specifying the content source of origin + module ContentSourceType + # Unspecified content source type + CONTENT_SOURCE_TYPE_UNSPECIFIED = 0 + + # Certified Google content source type + GOOGLE = 1 + + # Community content source type + COMMUNITY = 2 + + # Partner content source type + PARTNER = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb new file mode 100644 index 000000000000..7086b2dc1e63 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb @@ -0,0 +1,141 @@ +# 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 Chronicle + module V1 + # FeaturedContentNativeDashboard resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the FeaturedContentNativeDashboard. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # @!attribute [r] content_metadata + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentMetadata] + # Output only. Metadata about the FeaturedContentNativeDashboard. + # @!attribute [rw] dashboard_content + # @return [::Google::Cloud::Chronicle::V1::NativeDashboardWithChartsAndQueries] + # Optional. The dashboard content. + class FeaturedContentNativeDashboard + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to get a FeaturedContentNativeDashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the FeaturedContentNativeDashboard to + # retrieve. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + class GetFeaturedContentNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to list FeaturedContentNativeDashboards. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of + # FeaturedContentNativeDashboards. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of FeaturedContentNativeDashboards to return. + # The service may return fewer than this value. If unspecified, at most 100 + # FeaturedContentNativeDashboards will be returned. The maximum value is 100; + # values above 100 will be coerced to 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the + # subsequent page. + # + # When paginating, all other parameters provided to + # `ListFeaturedContentNativeDashboards` must match the call that provided the + # page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to apply to list the FeaturedContentNativeDashboards. + # + # The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. + # + # Supported fields for filtering: + # + # * `name`: The resource name of the featured content. + # * `content_metadata.description`: The description of the featured + # content. + # + # When a literal value is provided without a field, it will perform a + # substring search across both `name` and `content_metadata.description`. + # + # Examples: + # + # * `"test"`: Matches featured content where either the name or description + # contains "test" as a substring. + # * `name="test"`: Matches featured content where the name contains "test". + # * `content_metadata.description="test"`: Matches featured content where + # the description contains "test". + class ListFeaturedContentNativeDashboardsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing FeaturedContentNativeDashboards. + # @!attribute [rw] featured_content_native_dashboards + # @return [::Array<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] + # The list of FeaturedContentNativeDashboards. + # Ordered by name by default. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListFeaturedContentNativeDashboardsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to install a FeaturedContentNativeDashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the FeaturedContentNativeDashboard to + # install. Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} + # @!attribute [rw] featured_content_native_dashboard + # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] + # Optional. The FeaturedContentNativeDashboard to install. + class InstallFeaturedContentNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for installing a FeaturedContentNativeDashboard. + # @!attribute [rw] native_dashboard + # @return [::String] + # Optional. The resource name of the NativeDashboard created. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{native_dashboard_id} + class InstallFeaturedContentNativeDashboardResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb new file mode 100644 index 000000000000..dde3c3cbf88d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb @@ -0,0 +1,47 @@ +# 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 Chronicle + module V1 + # A Instance represents an instantiation of the Instance product. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of this instance. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + class Instance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a Instance. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the instance to retrieve. + # Format: + # `projects/{project_id}/locations/{location}/instances/{instance}` + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb new file mode 100644 index 000000000000..da820f0b06de --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb @@ -0,0 +1,502 @@ +# 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 Chronicle + module V1 + # Request message to export list of dashboard. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource that the dashboards to be exported belong to. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] names + # @return [::Array<::String>] + # Required. The resource names of the dashboards to export. + class ExportNativeDashboardsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for exporting a dashboard. + # @!attribute [rw] inline_destination + # @return [::Google::Cloud::Chronicle::V1::InlineDestination] + # The data for the exported dashboards included directly in the response. + class ExportNativeDashboardsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # InlineDestination for exporting a dashboard. + # @!attribute [rw] dashboards + # @return [::Array<::Google::Cloud::Chronicle::V1::NativeDashboardWithChartsAndQueries>] + # Dashboards with charts and queries. + class InlineDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NativeDashboardWithChartsAndQueries for exporting a dashboard. + # @!attribute [rw] dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Optional. Native dashboard. + # @!attribute [rw] dashboard_charts + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart>] + # Optional. Charts in the dashboard. + # @!attribute [rw] dashboard_queries + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardQuery>] + # Optional. Queries in the dashboard. + class NativeDashboardWithChartsAndQueries + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to import dashboards. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] source + # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource] + # Required. The data will imported from this proto. + class ImportNativeDashboardsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Inline source for importing dashboards. + # @!attribute [rw] dashboards + # @return [::Array<::Google::Cloud::Chronicle::V1::NativeDashboardWithChartsAndQueries>] + # Required. Dashboards with charts and queries. + class ImportNativeDashboardsInlineSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for importing dashboards. + # @!attribute [r] results + # @return [::Array<::Google::Cloud::Chronicle::V1::ImportExportStatus>] + # Output only. Represents the status of an import operation for multiple + # dashboards. Each dashboard's import status is tracked. A status of OK + # indicates the dashboard was ready for import. Otherwise, an appropriate + # error code and message are provided. Importantly, the import process is + # all-or-nothing: if even one dashboard fails to import, the entire import + # operation is aborted, and none of the dashboards are imported. The order of + # the statuses will be the same as in the import request. + class ImportNativeDashboardsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ImportExportStatus is a wrapper for dashboard name and status. + # @!attribute [rw] dashboard + # @return [::String] + # The resource name of the dashboard if it was supplied in the request. + # @!attribute [r] status + # @return [::Google::Rpc::Status] + # Output only. Status of the import/export operation. + class ImportExportStatus + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NativeDashboard resource. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the dashboard. + # @!attribute [rw] display_name + # @return [::String] + # Required. Dashboard display name/title visible to users. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the dashboard. + # @!attribute [rw] definition + # @return [::Google::Cloud::Chronicle::V1::DashboardDefinition] + # Optional. Definition of the dashboard like metadata, visualization and + # datasource configuration etc. + # @!attribute [r] type + # @return [::Google::Cloud::Chronicle::V1::DashboardType] + # Output only. Whether it's an out of the box or custom created dashboard. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation time of dashboard. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the dashboard was last edited. + # @!attribute [r] create_user_id + # @return [::String] + # Output only. User who created the dashboard. + # @!attribute [r] update_user_id + # @return [::String] + # Output only. User who last edited the dashboard. + # @!attribute [r] dashboard_user_data + # @return [::Google::Cloud::Chronicle::V1::DashboardUserData] + # Output only. User Preferences for a dashboard + # @!attribute [rw] etag + # @return [::String] + # Optional. This checksum is computed by the server based on the value of + # other fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [r] access + # @return [::Google::Cloud::Chronicle::V1::DashboardAccess] + # Output only. Access of the dashboard + class NativeDashboard + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to create a dashboard. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this dashboard will be created. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Required. The dashboard to create. + class CreateNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to get a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to fetch. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + class GetNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to list dashboards. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent owning this dashboard collection. + # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of dashboards to return. The service may + # return fewer than this value. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDashboards` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListDashboards` must + # match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::NativeDashboardView] + # Optional. View indicates the scope of fields to populate when returning the + # dashboard resource. If unspecified, defaults to the basic view. + class ListNativeDashboardsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing dashboards. + # @!attribute [rw] native_dashboards + # @return [::Array<::Google::Cloud::Chronicle::V1::NativeDashboard>] + # The dashboards from the specified chronicle instance. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListNativeDashboardsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to update a dashboard. + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Required. The dashboard to update. + # + # The dashboard's `name` field is used to identify the dashboard to update. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. LINT.IfChange(update_mask_values) + # The list of fields to update. + # Supported paths are - + # display_name + # description + # definition.filters + # definition.charts + # type + # access + # dashboard_user_data.is_pinned + class UpdateNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to duplicate a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to duplicate. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Required. Any fields that need modification can be passed through this like + # name, description etc. + class DuplicateNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to delete. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + class DeleteNativeDashboardRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to add chart in a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to add chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] dashboard_query + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # Optional. Query used to create the chart. + # @!attribute [rw] dashboard_chart + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # Required. Chart to be added to the dashboard. + # @!attribute [rw] chart_layout + # @return [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout] + # Required. ChartLayout for newly added chart. + class AddChartRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for adding chart in a dashboard. + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Dashboard with chart added in definition. + # @!attribute [rw] dashboard_chart + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # Created chart resource. + class AddChartResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to edit chart in a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to edit chart in. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] dashboard_query + # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] + # Optional. Query for the edited chart. + # @!attribute [rw] dashboard_chart + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # Optional. Edited chart. + # @!attribute [rw] edit_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to edit for chart and query. + # Supported paths in chart are - + # dashboard_chart.display_name + # dashboard_chart.description + # dashboard_chart.chart_datasource.data_sources + # dashboard_chart.visualization + # dashboard_chart.visualization.button + # dashboard_chart.visualization.markdown + # dashboard_chart.drill_down_config + # Supported paths in query are - + # dashboard_query.query + # dashboard_query.input + # @!attribute [rw] language_features + # @return [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] + # Optional. Language Features present in the query. + class EditChartRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for editing chart in a dashboard. + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Edited dashboard. + # @!attribute [rw] dashboard_chart + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # Edited chart resource. + class EditChartResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to remove chart from a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name to remove chart from. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] dashboard_chart + # @return [::String] + # Required. The dashboard chart name to remove. + class RemoveChartRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to duplicate chart in a dashboard. + # @!attribute [rw] name + # @return [::String] + # Required. The dashboard name that involves chart duplication. + # Format: + # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} + # @!attribute [rw] dashboard_chart + # @return [::String] + # Required. The dashboard chart name to duplicate. + class DuplicateChartRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for duplicating chart in a dashboard. + # @!attribute [rw] native_dashboard + # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] + # Dashboard with chart added in definition. + # @!attribute [rw] dashboard_chart + # @return [::Google::Cloud::Chronicle::V1::DashboardChart] + # Duplicated chart resource. + class DuplicateChartResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # User Data for Native Dashboard + # @!attribute [rw] last_viewed_time + # @return [::Google::Protobuf::Timestamp] + # time when this dashboard is last viewed + # @!attribute [rw] is_pinned + # @return [::Boolean] + # is dashboard pinned by user + class DashboardUserData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Definition of the dashboard including filters, layout, charts' + # configurations. + # @!attribute [rw] filters + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter>] + # Filters for the dashboard. + # @!attribute [rw] fingerprint + # @return [::String] + # Fingerprint of the dashboard definition. + # @!attribute [rw] charts + # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig>] + # Charts in the dashboard. + class DashboardDefinition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration of the chart including chart reference, layout and filters. + # @!attribute [r] dashboard_chart + # @return [::String] + # @!attribute [rw] chart_layout + # @return [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout] + # @!attribute [rw] filters_ids + # @return [::Array<::String>] + # Dashboard filters applied to the chart. + class ChartConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Layout of the chart. + # @!attribute [rw] start_x + # @return [::Integer] + # @!attribute [rw] span_x + # @return [::Integer] + # @!attribute [rw] start_y + # @return [::Integer] + # @!attribute [rw] span_y + # @return [::Integer] + class ChartLayout + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Type of the dashboard. + module DashboardType + # Default unspecified. + DASHBOARD_TYPE_UNSPECIFIED = 0 + + # Out of the box curated dashboards provided by Chronicle. + CURATED = 1 + + # Private dashboards created by users/customers. + PRIVATE = 2 + + # Public dashboards created by users/customers. + PUBLIC = 3 + + # Custom dashboards + CUSTOM = 4 + + # Marketplace dashboards + MARKETPLACE = 5 + end + + # AccessType of the dashboard. + module DashboardAccess + # Default unspecified. + DASHBOARD_ACCESS_UNSPECIFIED = 0 + + # Private dashboards created by users/customers. + DASHBOARD_PRIVATE = 1 + + # Public dashboards created by users/customers. + DASHBOARD_PUBLIC = 2 + end + + # NativeDashboardView indicates the scope of fields to populate when returning + # the dashboard resource. + module NativeDashboardView + # Defaults to basic. + NATIVE_DASHBOARD_VIEW_UNSPECIFIED = 0 + + # Include basic metadata about the dashboard without full definition. + NATIVE_DASHBOARD_VIEW_BASIC = 1 + + # Include everything. + NATIVE_DASHBOARD_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb new file mode 100644 index 000000000000..2ab663d35a0d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb @@ -0,0 +1,232 @@ +# 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 Chronicle + module V1 + # ScopeInfo specifies the scope info of the reference list. + # @!attribute [rw] reference_list_scope + # @return [::Google::Cloud::Chronicle::V1::ReferenceListScope] + # Required. The list of scope names of the reference list, if the list is + # empty the reference list is treated as unscoped. + class ScopeInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ReferenceListScope specifies the list of scope names of the reference list. + # @!attribute [rw] scope_names + # @return [::Array<::String>] + # Optional. The list of scope names of the reference list. The scope names + # should be full resource names and should be of the format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. + class ReferenceListScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get details about a reference list. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the reference list to retrieve. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of the ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_FULL. + class GetReferenceListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request for a list of reference lists. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of reference lists. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of reference lists to return. + # The service may return fewer than this value. + # If unspecified, at most 100 reference lists will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListReferenceLists` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListReferenceLists` must + # match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of each ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_BASIC. + class ListReferenceListsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to a request for a list of reference lists. + # @!attribute [rw] reference_lists + # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceList>] + # The reference lists. + # Ordered in ascending alphabetical order by name. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListReferenceListsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a reference list. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this reference list will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] reference_list + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # Required. The reference list to create. + # @!attribute [rw] reference_list_id + # @return [::String] + # Required. The ID to use for the reference list. This is also the display + # name for the reference list. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Has length less than 256. + # - Must be unique. + class CreateReferenceListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a reference list. + # @!attribute [rw] reference_list + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # Required. The reference list to update. + # + # The reference list's `name` field is used to identify the reference list to + # update. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # When no field mask is supplied, all non-empty fields will be updated. + # A field mask of "*" will update all fields, whether empty or not. + class UpdateReferenceListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A reference list. + # Reference lists are user-defined lists of values which users can + # use in multiple Rules. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the reference list. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + # @!attribute [r] display_name + # @return [::String] + # Output only. The unique display name of the reference list. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the reference list was last updated. + # @!attribute [rw] description + # @return [::String] + # Required. A user-provided description of the reference list. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceListEntry>] + # Required. The entries of the reference list. + # When listed, they are returned in the order that was specified at creation + # or update. The combined size of the values of the reference list may not + # exceed 6MB. + # This is returned only when the view is REFERENCE_LIST_VIEW_FULL. + # @!attribute [r] rules + # @return [::Array<::String>] + # Output only. The resource names for the associated self-authored Rules that + # use this reference list. This is returned only when the view is + # REFERENCE_LIST_VIEW_FULL. + # @!attribute [rw] syntax_type + # @return [::Google::Cloud::Chronicle::V1::ReferenceListSyntaxType] + # Required. The syntax type indicating how list entries should be validated. + # @!attribute [r] rule_associations_count + # @return [::Integer] + # Output only. The count of self-authored rules using the reference list. + # @!attribute [rw] scope_info + # @return [::Google::Cloud::Chronicle::V1::ScopeInfo] + # The scope info of the reference list. + # During reference list creation, if this field is not set, the reference + # list without scopes (an unscoped list) will be created for an unscoped + # user. For a scoped user, this field must be set. During reference list + # update, if scope_info is requested to be updated, this field must be set. + class ReferenceList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An entry in a reference list. + # @!attribute [rw] value + # @return [::String] + # Required. The value of the entry. Maximum length is 512 characters. + class ReferenceListEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The syntax type indicating how list entries should be validated. + module ReferenceListSyntaxType + # Defaults to REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING. + REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED = 0 + + # List contains plain text patterns. + REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING = 1 + + # List contains only Regular Expression patterns. + REFERENCE_LIST_SYNTAX_TYPE_REGEX = 2 + + # List contains only CIDR patterns. + REFERENCE_LIST_SYNTAX_TYPE_CIDR = 3 + end + + # ReferenceListView is a mechanism for viewing partial responses of the + # ReferenceList resource. + module ReferenceListView + # The default / unset value. + # The API will default to the BASIC view for ListReferenceLists. + # The API will default to the FULL view for methods that return a single + # ReferenceList resource. + REFERENCE_LIST_VIEW_UNSPECIFIED = 0 + + # Include metadata about the ReferenceList. + # This is the default view for ListReferenceLists. + REFERENCE_LIST_VIEW_BASIC = 1 + + # Include all details about the ReferenceList: metadata, content lines, + # associated rule counts. This is the default view for GetReferenceList. + REFERENCE_LIST_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb new file mode 100644 index 000000000000..0b2584f226f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb @@ -0,0 +1,701 @@ +# 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 Chronicle + module V1 + # The Rule resource represents a user-created rule. + # NEXT TAG: 21 + # @!attribute [rw] name + # @return [::String] + # Identifier. Full resource name for the rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [r] revision_id + # @return [::String] + # Output only. The revision ID of the rule. + # A new revision is created whenever the rule text is changed in any way. + # Format: `v_{10 digits}_{9 digits}` + # Populated in REVISION_METADATA_ONLY view and FULL view. + # @!attribute [r] display_name + # @return [::String] + # Output only. Display name of the rule. + # Populated in BASIC view and FULL view. + # @!attribute [rw] text + # @return [::String] + # The YARA-L content of the rule. + # Populated in FULL view. + # @!attribute [r] author + # @return [::String] + # Output only. The author of the rule. Extracted from the meta section of + # text. Populated in BASIC view and FULL view. + # @!attribute [r] severity + # @return [::Google::Cloud::Chronicle::V1::Severity] + # Output only. The severity of the rule as specified in the meta section of + # text. Populated in BASIC view and FULL view. + # @!attribute [r] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. Additional metadata specified in the meta section of text. + # Populated in FULL view. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the rule was created. + # Populated in FULL view. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the rule revision was created. + # Populated in FULL, REVISION_METADATA_ONLY views. + # @!attribute [r] compilation_state + # @return [::Google::Cloud::Chronicle::V1::Rule::CompilationState] + # Output only. The current compilation state of the rule. + # Populated in FULL view. + # @!attribute [r] type + # @return [::Google::Cloud::Chronicle::V1::RuleType] + # Output only. User-facing type of the rule. Extracted from the events + # section of rule text. Populated in BASIC view and FULL view. + # @!attribute [r] reference_lists + # @return [::Array<::String>] + # Output only. Resource names of the reference lists used in this rule. + # Populated in FULL view. + # @!attribute [r] allowed_run_frequencies + # @return [::Array<::Google::Cloud::Chronicle::V1::RunFrequency>] + # Output only. The run frequencies that are allowed for the rule. + # Populated in BASIC view and FULL view. + # @!attribute [rw] etag + # @return [::String] + # The etag for this rule. + # If this is provided on update, the request will succeed if and only if it + # matches the server-computed value, and will fail with an ABORTED error + # otherwise. + # Populated in BASIC view and FULL view. + # @!attribute [rw] scope + # @return [::String] + # Resource name of the DataAccessScope bound to this rule. + # Populated in BASIC view and FULL view. + # If reference lists are used in the rule, validations will be performed + # against this scope to ensure that the reference lists are compatible with + # both the user's and the rule's scopes. + # The scope should be in the format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. + # @!attribute [r] compilation_diagnostics + # @return [::Array<::Google::Cloud::Chronicle::V1::CompilationDiagnostic>] + # Output only. A list of a rule's corresponding compilation diagnostic + # messages such as compilation errors and compilation warnings. Populated in + # FULL view. + # @!attribute [r] near_real_time_live_rule_eligible + # @return [::Boolean] + # Output only. Indicate the rule can run in near real time live rule. + # If this is true, the rule uses the near real time live rule when the run + # frequency is set to LIVE. + # @!attribute [r] inputs_used + # @return [::Google::Cloud::Chronicle::V1::InputsUsed] + # Output only. The set of inputs used in the rule. For example, if the rule + # uses $e.principal.hostname, then the uses_udm field will be true. + class Rule + 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 + + # The current compilation state of the rule. + module CompilationState + # The compilation state is unspecified/unknown. + COMPILATION_STATE_UNSPECIFIED = 0 + + # The Rule can successfully compile. + SUCCEEDED = 1 + + # The Rule cannot successfully compile. + # This is possible if a backwards-incompatible change was made to the + # compiler. + FAILED = 2 + end + end + + # The RuleDeployment resource represents the deployment state of a Rule. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the rule deployment. + # Note that RuleDeployment is a child of the overall Rule, not any individual + # revision, so the resource ID segment for the Rule resource must not + # reference a specific revision. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether the rule is currently deployed continuously against incoming data. + # @!attribute [rw] alerting + # @return [::Boolean] + # Whether detections resulting from this deployment should be considered + # alerts. + # @!attribute [rw] archived + # @return [::Boolean] + # The archive state of the rule deployment. + # Cannot be set to true unless enabled is set to false. + # If set to true, alerting will automatically be set to false. + # If currently set to true, enabled, alerting, and run_frequency cannot be + # updated. + # @!attribute [r] archive_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the rule deployment archive state was last + # set to true. If the rule deployment's current archive state is not set to + # true, the field will be empty. + # @!attribute [rw] run_frequency + # @return [::Google::Cloud::Chronicle::V1::RunFrequency] + # The run frequency of the rule deployment. + # @!attribute [r] execution_state + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment::ExecutionState] + # Output only. The execution state of the rule deployment. + # @!attribute [r] producer_rules + # @return [::Array<::String>] + # Output only. The names of the associated/chained producer rules. Rules are + # considered producers for this rule if this rule explicitly filters on their + # ruleid. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [r] consumer_rules + # @return [::Array<::String>] + # Output only. The names of the associated/chained consumer rules. Rules are + # considered consumers of this rule if their rule text explicitly filters on + # this rule's ruleid. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [r] last_alert_status_change_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the rule deployment alert state was lastly + # changed. This is filled regardless of the current alert state. E.g. if the + # current alert status is false, this timestamp will be the timestamp when + # the alert status was changed to false. + class RuleDeployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible execution states the rule deployment can be in. + module ExecutionState + # Unspecified or unknown execution state. + EXECUTION_STATE_UNSPECIFIED = 0 + + # Default execution state. + DEFAULT = 1 + + # Rules in limited state may not have their executions guaranteed. + LIMITED = 2 + + # Paused rules are not executed at all. + PAUSED = 3 + end + end + + # Retrohunt is an execution of a Rule over a time range in the past. + # @!attribute [rw] name + # @return [::String] + # The resource name of the retrohunt. + # Retrohunt is the child of a rule revision. \\{rule} in the format below is + # structured as \\{rule_id@revision_id}. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # @!attribute [rw] process_interval + # @return [::Google::Type::Interval] + # Required. The start and end time of the event time range this retrohunt + # processes. + # @!attribute [r] execution_interval + # @return [::Google::Type::Interval] + # Output only. The start and end time of the retrohunt execution. If the + # retrohunt is not yet finished, the end time of the interval will not be + # populated. + # @!attribute [r] state + # @return [::Google::Cloud::Chronicle::V1::Retrohunt::State] + # Output only. The state of the retrohunt. + # @!attribute [r] progress_percentage + # @return [::Float] + # Output only. Percent progress of the retrohunt towards completion, from + # 0.00 to 100.00. + class Retrohunt + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible states a retrohunt can be in. + module State + # Unspecified or unknown retrohunt state. + STATE_UNSPECIFIED = 0 + + # Running state. + RUNNING = 1 + + # Done state. + DONE = 2 + + # Cancelled state. + CANCELLED = 3 + + # Failed state. + FAILED = 4 + end + end + + # Request message for CreateRule method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this rule will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] rule + # @return [::Google::Cloud::Chronicle::V1::Rule] + # Required. The rule to create. + class CreateRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRule method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the Rule being + # returned. If unspecified, defaults to FULL. + class GetRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRules method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of rules. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of rules to return. The service may return fewer than + # this value. If unspecified, at most 100 rules will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRules` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRules` + # must match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::RuleView] + # view indicates the scope of fields to populate for the Rule being returned. + # If unspecified, defaults to BASIC. + # @!attribute [rw] filter + # @return [::String] + # Only the following filters are allowed: + # "reference_lists:\\{reference_list_name}" + # "data_tables:\\{data_table_name}" + # "display_name:\\{display_name}" + class ListRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRules method. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] + # The rules from the specified instance. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateRule method. + # @!attribute [rw] rule + # @return [::Google::Cloud::Chronicle::V1::Rule] + # Required. The rule to update. + # + # The rule's `name` field is used to identify the rule to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. + class UpdateRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteRule method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to delete. A rule revision timestamp cannot + # be specified as part of the name, as deleting specific revisions is not + # supported. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any retrohunts and any detections associated with + # the rule will also be deleted. If set to false, the call will only succeed + # if the rule has no associated retrohunts, including completed retrohunts, + # and no associated detections. Regardless of this field's value, the rule + # deployment associated with this rule will also be deleted. + class DeleteRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRuleRevisions method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to list revisions for. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of revisions to return per page. The service may return + # fewer than this value. If unspecified, at most 100 revisions will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # The page token, received from a previous `ListRuleRevisions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleRevisions` + # must match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the revision + # being returned. If unspecified, defaults to BASIC. + class ListRuleRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRuleRevisions method. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] + # The revisions of the rule. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRuleRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateRetrohunt method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of retrohunt, which is a rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] retrohunt + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # Required. The retrohunt to create. + class CreateRetrohuntRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRetrohunt method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the retrohunt to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + class GetRetrohuntRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRetrohunts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The rule that the retrohunts belong to. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of retrohunt to return. The service may return fewer + # than this value. If unspecified, at most 100 retrohunts will be returned. + # The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRetrohunts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRetrohunts` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # state + class ListRetrohuntsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRetrohunts method. + # @!attribute [rw] retrohunts + # @return [::Array<::Google::Cloud::Chronicle::V1::Retrohunt>] + # The retrohunts from the specified rule. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRetrohuntsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRuleDeployment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule deployment to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + class GetRuleDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRuleDeployments. + # @!attribute [rw] parent + # @return [::String] + # Required. The collection of all parents which own all rule deployments. The + # "-" wildcard token must be used as the rule identifier in the resource + # path. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/-` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of rule deployments to return. The service may return + # fewer than this value. If unspecified, at most 100 rule deployments will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRuleDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleDeployments` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # archived, name + class ListRuleDeploymentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRuleDeployments. + # @!attribute [rw] rule_deployments + # @return [::Array<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # The rule deployments from all rules. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRuleDeploymentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateRuleDeployment. + # @!attribute [rw] rule_deployment + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # Required. The rule deployment to update. + # + # The rule deployment's `name` field is used to identify the rule deployment + # to update. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + class UpdateRuleDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CompilationPosition represents the location of a compilation diagnostic in + # rule text. + # @!attribute [r] start_line + # @return [::Integer] + # Output only. Start line number, beginning at 1. + # @!attribute [r] start_column + # @return [::Integer] + # Output only. Start column number, beginning at 1. + # @!attribute [r] end_line + # @return [::Integer] + # Output only. End line number, beginning at 1. + # @!attribute [r] end_column + # @return [::Integer] + # Output only. End column number, beginning at 1. + class CompilationPosition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CompilationDiagnostic represents a compilation diagnostic generated + # during a rule's compilation, such as a compilation error or a compilation + # warning. + # @!attribute [r] message + # @return [::String] + # Output only. The diagnostic message. + # @!attribute [r] position + # @return [::Google::Cloud::Chronicle::V1::CompilationPosition] + # Output only. The approximate position in the rule text associated with the + # compilation diagnostic. + # Compilation Position may be empty. + # @!attribute [r] severity + # @return [::Google::Cloud::Chronicle::V1::CompilationDiagnostic::Severity] + # Output only. The severity of a rule's compilation diagnostic. + # @!attribute [r] uri + # @return [::String] + # Output only. Link to documentation that describes a diagnostic in more + # detail. + class CompilationDiagnostic + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity level of the compilation diagnostic. + module Severity + # An unspecified severity level. + SEVERITY_UNSPECIFIED = 0 + + # A compilation warning. + WARNING = 1 + + # A compilation error. + ERROR = 2 + end + end + + # Severity represents the severity level of the rule. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the severity level. Extracted from the meta section of + # the rule text. + class Severity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation Metadata for Retrohunts. + # @!attribute [rw] retrohunt + # @return [::String] + # The name of the retrohunt. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # @!attribute [rw] execution_interval + # @return [::Google::Type::Interval] + # The start and end time of the retrohunt execution. If the retrohunt is not + # yet finished, the end time of the interval will not be filled. + # @!attribute [rw] progress_percentage + # @return [::Float] + # Percent progress of the retrohunt towards completion, from 0.00 to 100.00. + class RetrohuntMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # InputsUsed is a convenience field that tells us which sources + # of events (if any) were used in the rule. + # NEXT TAG: 4 + # @!attribute [rw] uses_udm + # @return [::Boolean] + # Optional. Whether the rule queries UDM events. + # @!attribute [rw] uses_entity + # @return [::Boolean] + # Optional. Whether the rule queries entity events. + # @!attribute [rw] uses_detection + # @return [::Boolean] + # Optional. Whether the rule queries detections. + class InputsUsed + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RunFrequency indicates the run frequency at which a YARA-L 2 rule will run if + # enabled. + module RunFrequency + # The run frequency is unspecified/unknown. + RUN_FREQUENCY_UNSPECIFIED = 0 + + # Executes in real time. + LIVE = 1 + + # Executes once per hour. + HOURLY = 2 + + # Executes once per day. + DAILY = 3 + end + + # RuleType indicates the YARA-L rule type of user-created and Google Cloud + # Threat Intelligence (GCTI) authored rules. + module RuleType + # The rule type is unspecified/unknown. + RULE_TYPE_UNSPECIFIED = 0 + + # Rule checks for the existence of a single event. + SINGLE_EVENT = 1 + + # Rule checks for correlation between multiple events + MULTI_EVENT = 2 + end + + # RuleView indicates the scope of fields to populate when returning the Rule + # resource. + module RuleView + # The default/unset value. + # The API will default to the BASIC view for ListRules/ListRuleRevisions. + # The API will default to the FULL view for GetRule. + RULE_VIEW_UNSPECIFIED = 0 + + # Include basic metadata about the rule, but not the full contents. + # Returned fields include: revision_id, revision_create_time, display_name, + # author, severity, type, allowed_run_frequency, + # near_real_time_live_rule_eligible, etag, and scope. + # This is the default value for ListRules and ListRuleRevisions. + BASIC = 1 + + # Include all fields. + # This is the default value for GetRule. + FULL = 2 + + # Include basic metadata about the rule's revision only. + # Returned fields include: revision_id and revision_create_time. + REVISION_METADATA_ONLY = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# 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 from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..a52275cebf89 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb @@ -0,0 +1,56 @@ +# 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 Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values. + # * A month and day, with a zero year (for example, an anniversary). + # * A year on its own, with a zero month and a zero day. + # * A year and month, with a zero day (for example, a credit card expiration + # date). + # + # Related types: + # + # * [google.type.TimeOfDay][google.type.TimeOfDay] + # * [google.type.DateTime][google.type.DateTime] + # * {::Google::Protobuf::Timestamp google.protobuf.Timestamp} + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb @@ -0,0 +1,45 @@ +# 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 Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile new file mode 100644 index 000000000000..8856abb69960 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# 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-chronicle-v1", path: "../" +else + gem "google-cloud-chronicle-v1" +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/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/get_big_query_export.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/get_big_query_export.rb new file mode 100644 index 000000000000..9071532a425c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/get_big_query_export.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_BigQueryExportService_GetBigQueryExport_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_big_query_export call in the BigQueryExportService 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::Chronicle::V1::BigQueryExportService::Client#get_big_query_export. +# +def get_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetBigQueryExportRequest.new + + # Call the get_big_query_export method. + result = client.get_big_query_export request + + # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport. + p result +end +# [END chronicle_v1_generated_BigQueryExportService_GetBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/provision_big_query_export.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/provision_big_query_export.rb new file mode 100644 index 000000000000..cea45bf0a4de --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/provision_big_query_export.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_BigQueryExportService_ProvisionBigQueryExport_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the provision_big_query_export call in the BigQueryExportService 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::Chronicle::V1::BigQueryExportService::Client#provision_big_query_export. +# +def provision_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest.new + + # Call the provision_big_query_export method. + result = client.provision_big_query_export request + + # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport. + p result +end +# [END chronicle_v1_generated_BigQueryExportService_ProvisionBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/update_big_query_export.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/update_big_query_export.rb new file mode 100644 index 000000000000..86c1956bbe9a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/update_big_query_export.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_BigQueryExportService_UpdateBigQueryExport_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_big_query_export call in the BigQueryExportService 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::Chronicle::V1::BigQueryExportService::Client#update_big_query_export. +# +def update_big_query_export + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest.new + + # Call the update_big_query_export method. + result = client.update_big_query_export request + + # The returned object is of type Google::Cloud::Chronicle::V1::BigQueryExport. + p result +end +# [END chronicle_v1_generated_BigQueryExportService_UpdateBigQueryExport_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb new file mode 100644 index 000000000000..b946884ee81c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the batch_get_dashboard_charts call in the DashboardChartService 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::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts. +# +def batch_get_dashboard_charts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new + + # Call the batch_get_dashboard_charts method. + result = client.batch_get_dashboard_charts request + + # The returned object is of type Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse. + p result +end +# [END chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb new file mode 100644 index 000000000000..f2cf1b752bfe --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_dashboard_chart call in the DashboardChartService 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::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart. +# +def get_dashboard_chart + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new + + # Call the get_dashboard_chart method. + result = client.get_dashboard_chart request + + # The returned object is of type Google::Cloud::Chronicle::V1::DashboardChart. + p result +end +# [END chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb new file mode 100644 index 000000000000..c13ee1ca8e7d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the execute_dashboard_query call in the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query. +# +def execute_dashboard_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new + + # Call the execute_dashboard_query method. + result = client.execute_dashboard_query request + + # The returned object is of type Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse. + p result +end +# [END chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb new file mode 100644 index 000000000000..67a0b2143915 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_dashboard_query call in the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query. +# +def get_dashboard_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new + + # Call the get_dashboard_query method. + result = client.get_dashboard_query request + + # The returned object is of type Google::Cloud::Chronicle::V1::DashboardQuery. + p result +end +# [END chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb new file mode 100644 index 000000000000..3bfe7e104b89 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_label. +# +def create_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new + + # Call the create_data_access_label method. + result = client.create_data_access_label request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb new file mode 100644 index 000000000000..870849c6db47 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope. +# +def create_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new + + # Call the create_data_access_scope method. + result = client.create_data_access_scope request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb new file mode 100644 index 000000000000..e12c3440d608 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label. +# +def delete_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new + + # Call the delete_data_access_label method. + result = client.delete_data_access_label request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb new file mode 100644 index 000000000000..0341030faa5c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope. +# +def delete_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new + + # Call the delete_data_access_scope method. + result = client.delete_data_access_scope request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb new file mode 100644 index 000000000000..988f66268da5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_label. +# +def get_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new + + # Call the get_data_access_label method. + result = client.get_data_access_label request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb new file mode 100644 index 000000000000..d9de6dbf8b84 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope. +# +def get_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new + + # Call the get_data_access_scope method. + result = client.get_data_access_scope request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb new file mode 100644 index 000000000000..e62e53adb905 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_data_access_labels call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels. +# +def list_data_access_labels + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new + + # Call the list_data_access_labels method. + result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. + p item + end +end +# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb new file mode 100644 index 000000000000..4b11c99375f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_data_access_scopes call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes. +# +def list_data_access_scopes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new + + # Call the list_data_access_scopes method. + result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. + p item + end +end +# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb new file mode 100644 index 000000000000..2974c40a7a70 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_label. +# +def update_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new + + # Call the update_data_access_label method. + result = client.update_data_access_label request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb new file mode 100644 index 000000000000..81a0e349a4fa --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope. +# +def update_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new + + # Call the update_data_access_scope method. + result = client.update_data_access_scope request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb new file mode 100644 index 000000000000..0f928a0c692e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the bulk_create_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows. +# +def bulk_create_data_table_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new + + # Call the bulk_create_data_table_rows method. + result = client.bulk_create_data_table_rows request + + # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. + p result +end +# [END chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb new file mode 100644 index 000000000000..b830992e26f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the bulk_get_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows. +# +def bulk_get_data_table_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new + + # Call the bulk_get_data_table_rows method. + result = client.bulk_get_data_table_rows request + + # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. + p result +end +# [END chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb new file mode 100644 index 000000000000..bf1a60ed662a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the bulk_replace_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows. +# +def bulk_replace_data_table_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new + + # Call the bulk_replace_data_table_rows method. + result = client.bulk_replace_data_table_rows request + + # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. + p result +end +# [END chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb new file mode 100644 index 000000000000..8e3e06124128 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the bulk_update_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows. +# +def bulk_update_data_table_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new + + # Call the bulk_update_data_table_rows method. + result = client.bulk_update_data_table_rows request + + # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. + p result +end +# [END chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb new file mode 100644 index 000000000000..20855dc93460 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_CreateDataTable_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#create_data_table. +# +def create_data_table + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new + + # Call the create_data_table method. + result = client.create_data_table request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + p result +end +# [END chronicle_v1_generated_DataTableService_CreateDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb new file mode 100644 index 000000000000..e73cfbdf0f57 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_CreateDataTableRow_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#create_data_table_row. +# +def create_data_table_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new + + # Call the create_data_table_row method. + result = client.create_data_table_row request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + p result +end +# [END chronicle_v1_generated_DataTableService_CreateDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb new file mode 100644 index 000000000000..b53e925c209a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_DeleteDataTable_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#delete_data_table. +# +def delete_data_table + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new + + # Call the delete_data_table method. + result = client.delete_data_table request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_DataTableService_DeleteDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb new file mode 100644 index 000000000000..3a0d3d7177b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#delete_data_table_row. +# +def delete_data_table_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new + + # Call the delete_data_table_row method. + result = client.delete_data_table_row request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb new file mode 100644 index 000000000000..cdfb160a5412 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_GetDataTable_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table. +# +def get_data_table + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new + + # Call the get_data_table method. + result = client.get_data_table request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + p result +end +# [END chronicle_v1_generated_DataTableService_GetDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb new file mode 100644 index 000000000000..f94f46436ce6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_table_operation_errors call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors. +# +def get_data_table_operation_errors + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new + + # Call the get_data_table_operation_errors method. + result = client.get_data_table_operation_errors request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. + p result +end +# [END chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb new file mode 100644 index 000000000000..3b0cd44aedd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_GetDataTableRow_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table_row. +# +def get_data_table_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new + + # Call the get_data_table_row method. + result = client.get_data_table_row request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + p result +end +# [END chronicle_v1_generated_DataTableService_GetDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb new file mode 100644 index 000000000000..9da3fb51c80a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_DataTableService_ListDataTableRows_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#list_data_table_rows. +# +def list_data_table_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new + + # Call the list_data_table_rows method. + result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. + p item + end +end +# [END chronicle_v1_generated_DataTableService_ListDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb new file mode 100644 index 000000000000..b3aab95d25d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_DataTableService_ListDataTables_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_data_tables call in the DataTableService 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::Chronicle::V1::DataTableService::Client#list_data_tables. +# +def list_data_tables + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new + + # Call the list_data_tables method. + result = client.list_data_tables 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::Chronicle::V1::DataTable. + p item + end +end +# [END chronicle_v1_generated_DataTableService_ListDataTables_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb new file mode 100644 index 000000000000..aa62027b9721 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_UpdateDataTable_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#update_data_table. +# +def update_data_table + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new + + # Call the update_data_table method. + result = client.update_data_table request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. + p result +end +# [END chronicle_v1_generated_DataTableService_UpdateDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb new file mode 100644 index 000000000000..d04975357772 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#update_data_table_row. +# +def update_data_table_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataTableService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new + + # Call the update_data_table_row method. + result = client.update_data_table_row request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. + p result +end +# [END chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb new file mode 100644 index 000000000000..76ac024b263d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_EntityService_CreateWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#create_watchlist. +# +def create_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new + + # Call the create_watchlist method. + result = client.create_watchlist request + + # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + p result +end +# [END chronicle_v1_generated_EntityService_CreateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb new file mode 100644 index 000000000000..dce65e1ea1f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_EntityService_DeleteWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#delete_watchlist. +# +def delete_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new + + # Call the delete_watchlist method. + result = client.delete_watchlist request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_EntityService_DeleteWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb new file mode 100644 index 000000000000..429a7abe7363 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_EntityService_GetWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#get_watchlist. +# +def get_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new + + # Call the get_watchlist method. + result = client.get_watchlist request + + # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + p result +end +# [END chronicle_v1_generated_EntityService_GetWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb new file mode 100644 index 000000000000..07fb0f279542 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_EntityService_ListWatchlists_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_watchlists call in the EntityService 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::Chronicle::V1::EntityService::Client#list_watchlists. +# +def list_watchlists + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new + + # Call the list_watchlists method. + result = client.list_watchlists 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::Chronicle::V1::Watchlist. + p item + end +end +# [END chronicle_v1_generated_EntityService_ListWatchlists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb new file mode 100644 index 000000000000..fe92dd9d1924 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_EntityService_UpdateWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#update_watchlist. +# +def update_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new + + # Call the update_watchlist method. + result = client.update_watchlist request + + # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + p result +end +# [END chronicle_v1_generated_EntityService_UpdateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb new file mode 100644 index 000000000000..6b0caad0a1c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard. +# +def get_featured_content_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new + + # Call the get_featured_content_native_dashboard method. + result = client.get_featured_content_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard. + p result +end +# [END chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb new file mode 100644 index 000000000000..4af32dbf10f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the install_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard. +# +def install_featured_content_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new + + # Call the install_featured_content_native_dashboard method. + result = client.install_featured_content_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse. + p result +end +# [END chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb new file mode 100644 index 000000000000..85c26982e0a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_featured_content_native_dashboards call in the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards. +# +def list_featured_content_native_dashboards + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new + + # Call the list_featured_content_native_dashboards method. + result = client.list_featured_content_native_dashboards 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::Chronicle::V1::FeaturedContentNativeDashboard. + p item + end +end +# [END chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb new file mode 100644 index 000000000000..8fdeb2d7ad47 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_InstanceService_GetInstance_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_instance call in the InstanceService 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::Chronicle::V1::InstanceService::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::InstanceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::Chronicle::V1::Instance. + p result +end +# [END chronicle_v1_generated_InstanceService_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb new file mode 100644 index 000000000000..0e419e2bf8ef --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_AddChart_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the add_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#add_chart. +# +def add_chart + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::AddChartRequest.new + + # Call the add_chart method. + result = client.add_chart request + + # The returned object is of type Google::Cloud::Chronicle::V1::AddChartResponse. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_AddChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb new file mode 100644 index 000000000000..9c417af9d3bf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard. +# +def create_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new + + # Call the create_native_dashboard method. + result = client.create_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb new file mode 100644 index 000000000000..18b1e963382b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard. +# +def delete_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new + + # Call the delete_native_dashboard method. + result = client.delete_native_dashboard request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb new file mode 100644 index 000000000000..0c5d87a4034e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the duplicate_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#duplicate_chart. +# +def duplicate_chart + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DuplicateChartRequest.new + + # Call the duplicate_chart method. + result = client.duplicate_chart request + + # The returned object is of type Google::Cloud::Chronicle::V1::DuplicateChartResponse. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb new file mode 100644 index 000000000000..f93d74d1ef9b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the duplicate_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard. +# +def duplicate_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new + + # Call the duplicate_native_dashboard method. + result = client.duplicate_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb new file mode 100644 index 000000000000..e8371b33f150 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_EditChart_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the edit_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#edit_chart. +# +def edit_chart + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::EditChartRequest.new + + # Call the edit_chart method. + result = client.edit_chart request + + # The returned object is of type Google::Cloud::Chronicle::V1::EditChartResponse. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_EditChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb new file mode 100644 index 000000000000..3f6651321533 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the export_native_dashboards call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards. +# +def export_native_dashboards + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new + + # Call the export_native_dashboards method. + result = client.export_native_dashboards request + + # The returned object is of type Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb new file mode 100644 index 000000000000..21ece4372e52 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard. +# +def get_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new + + # Call the get_native_dashboard method. + result = client.get_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb new file mode 100644 index 000000000000..bd4953102a2b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the import_native_dashboards call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards. +# +def import_native_dashboards + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new + + # Call the import_native_dashboards method. + result = client.import_native_dashboards request + + # The returned object is of type Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb new file mode 100644 index 000000000000..7835cddbae64 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_native_dashboards call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards. +# +def list_native_dashboards + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new + + # Call the list_native_dashboards method. + result = client.list_native_dashboards 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::Chronicle::V1::NativeDashboard. + p item + end +end +# [END chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb new file mode 100644 index 000000000000..23318b075f45 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_RemoveChart_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the remove_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#remove_chart. +# +def remove_chart + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::RemoveChartRequest.new + + # Call the remove_chart method. + result = client.remove_chart request + + # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_RemoveChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb new file mode 100644 index 000000000000..883df5cbae10 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard. +# +def update_native_dashboard + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new + + # Call the update_native_dashboard method. + result = client.update_native_dashboard request + + # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. + p result +end +# [END chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb new file mode 100644 index 000000000000..56680299d2ab --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#create_reference_list. +# +def create_reference_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new + + # Call the create_reference_list method. + result = client.create_reference_list request + + # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + p result +end +# [END chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb new file mode 100644 index 000000000000..9fee3cf12ff5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#get_reference_list. +# +def get_reference_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new + + # Call the get_reference_list method. + result = client.get_reference_list request + + # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + p result +end +# [END chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb new file mode 100644 index 000000000000..11926590f8d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_reference_lists call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#list_reference_lists. +# +def list_reference_lists + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new + + # Call the list_reference_lists method. + result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. + p item + end +end +# [END chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb new file mode 100644 index 000000000000..a914529bd2b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#update_reference_list. +# +def update_reference_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new + + # Call the update_reference_list method. + result = client.update_reference_list request + + # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + p result +end +# [END chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb new file mode 100644 index 000000000000..0cac677634bb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb @@ -0,0 +1,54 @@ +# 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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#create_retrohunt. +# +def create_retrohunt + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new + + # Call the create_retrohunt method. + result = client.create_retrohunt 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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb new file mode 100644 index 000000000000..57e6c2e2a973 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_CreateRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#create_rule. +# +def create_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new + + # Call the create_rule method. + result = client.create_rule request + + # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + p result +end +# [END chronicle_v1_generated_RuleService_CreateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb new file mode 100644 index 000000000000..db56a864183a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_DeleteRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#delete_rule. +# +def delete_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new + + # Call the delete_rule method. + result = client.delete_rule request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_RuleService_DeleteRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb new file mode 100644 index 000000000000..481026822412 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_GetRetrohunt_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#get_retrohunt. +# +def get_retrohunt + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new + + # Call the get_retrohunt method. + result = client.get_retrohunt request + + # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. + p result +end +# [END chronicle_v1_generated_RuleService_GetRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb new file mode 100644 index 000000000000..eb550559d7a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_GetRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule. +# +def get_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetRuleRequest.new + + # Call the get_rule method. + result = client.get_rule request + + # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + p result +end +# [END chronicle_v1_generated_RuleService_GetRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb new file mode 100644 index 000000000000..c4d8a125f230 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_GetRuleDeployment_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule_deployment. +# +def get_rule_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new + + # Call the get_rule_deployment method. + result = client.get_rule_deployment request + + # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + p result +end +# [END chronicle_v1_generated_RuleService_GetRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb new file mode 100644 index 000000000000..fd21d3d155c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_RuleService_ListRetrohunts_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_retrohunts call in the RuleService 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::Chronicle::V1::RuleService::Client#list_retrohunts. +# +def list_retrohunts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new + + # Call the list_retrohunts method. + result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRetrohunts_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb new file mode 100644 index 000000000000..061793135cde --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_RuleService_ListRuleDeployments_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_rule_deployments call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_deployments. +# +def list_rule_deployments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new + + # Call the list_rule_deployments method. + result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRuleDeployments_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb new file mode 100644 index 000000000000..ee56939b8586 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_RuleService_ListRuleRevisions_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_rule_revisions call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_revisions. +# +def list_rule_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new + + # Call the list_rule_revisions method. + result = client.list_rule_revisions 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::Chronicle::V1::Rule. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRuleRevisions_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb new file mode 100644 index 000000000000..607a52db7bbb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb @@ -0,0 +1,51 @@ +# 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 chronicle_v1_generated_RuleService_ListRules_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_rules call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rules. +# +def list_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRulesRequest.new + + # Call the list_rules method. + result = client.list_rules 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::Chronicle::V1::Rule. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb new file mode 100644 index 000000000000..612a59e32e81 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_UpdateRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule. +# +def update_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new + + # Call the update_rule method. + result = client.update_rule request + + # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + p result +end +# [END chronicle_v1_generated_RuleService_UpdateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb new file mode 100644 index 000000000000..c8c3638a445e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb @@ -0,0 +1,47 @@ +# 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 chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule_deployment. +# +def update_rule_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new + + # Call the update_rule_deployment method. + result = client.update_rule_deployment request + + # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + p result +end +# [END chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json b/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json new file mode 100644 index 000000000000..2f7db5b4e6e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json @@ -0,0 +1,2775 @@ +{ + "client_library": { + "name": "google-cloud-chronicle-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.chronicle.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "chronicle_v1_generated_BigQueryExportService_GetBigQueryExport_sync", + "title": "Snippet for the get_big_query_export call in the BigQueryExportService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::BigQueryExportService::Client#get_big_query_export.", + "file": "big_query_export_service/get_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_big_query_export", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client#get_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BigQueryExport", + "client": { + "short_name": "BigQueryExportService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client" + }, + "method": { + "short_name": "GetBigQueryExport", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService.GetBigQueryExport", + "service": { + "short_name": "BigQueryExportService", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_BigQueryExportService_UpdateBigQueryExport_sync", + "title": "Snippet for the update_big_query_export call in the BigQueryExportService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::BigQueryExportService::Client#update_big_query_export.", + "file": "big_query_export_service/update_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_big_query_export", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client#update_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BigQueryExport", + "client": { + "short_name": "BigQueryExportService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client" + }, + "method": { + "short_name": "UpdateBigQueryExport", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService.UpdateBigQueryExport", + "service": { + "short_name": "BigQueryExportService", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_BigQueryExportService_ProvisionBigQueryExport_sync", + "title": "Snippet for the provision_big_query_export call in the BigQueryExportService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::BigQueryExportService::Client#provision_big_query_export.", + "file": "big_query_export_service/provision_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "provision_big_query_export", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client#provision_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BigQueryExport", + "client": { + "short_name": "BigQueryExportService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client" + }, + "method": { + "short_name": "ProvisionBigQueryExport", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService.ProvisionBigQueryExport", + "service": { + "short_name": "BigQueryExportService", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync", + "title": "Snippet for the get_dashboard_query call in the DashboardQueryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query.", + "file": "dashboard_query_service/get_dashboard_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dashboard_query", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DashboardQuery", + "client": { + "short_name": "DashboardQueryService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client" + }, + "method": { + "short_name": "GetDashboardQuery", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService.GetDashboardQuery", + "service": { + "short_name": "DashboardQueryService", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync", + "title": "Snippet for the execute_dashboard_query call in the DashboardQueryService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query.", + "file": "dashboard_query_service/execute_dashboard_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "execute_dashboard_query", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse", + "client": { + "short_name": "DashboardQueryService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client" + }, + "method": { + "short_name": "ExecuteDashboardQuery", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService.ExecuteDashboardQuery", + "service": { + "short_name": "DashboardQueryService", + "full_name": "google.cloud.chronicle.v1.DashboardQueryService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync", + "title": "Snippet for the get_dashboard_chart call in the DashboardChartService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart.", + "file": "dashboard_chart_service/get_dashboard_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dashboard_chart", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDashboardChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DashboardChart", + "client": { + "short_name": "DashboardChartService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client" + }, + "method": { + "short_name": "GetDashboardChart", + "full_name": "google.cloud.chronicle.v1.DashboardChartService.GetDashboardChart", + "service": { + "short_name": "DashboardChartService", + "full_name": "google.cloud.chronicle.v1.DashboardChartService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync", + "title": "Snippet for the batch_get_dashboard_charts call in the DashboardChartService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts.", + "file": "dashboard_chart_service/batch_get_dashboard_charts.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_get_dashboard_charts", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse", + "client": { + "short_name": "DashboardChartService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client" + }, + "method": { + "short_name": "BatchGetDashboardCharts", + "full_name": "google.cloud.chronicle.v1.DashboardChartService.BatchGetDashboardCharts", + "service": { + "short_name": "DashboardChartService", + "full_name": "google.cloud.chronicle.v1.DashboardChartService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync", + "title": "Snippet for the create_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label.", + "file": "data_access_control_service/create_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "CreateDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync", + "title": "Snippet for the get_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label.", + "file": "data_access_control_service/get_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "GetDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync", + "title": "Snippet for the list_data_access_labels call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels.", + "file": "data_access_control_service/list_data_access_labels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_access_labels", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "ListDataAccessLabels", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessLabels", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync", + "title": "Snippet for the update_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label.", + "file": "data_access_control_service/update_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "UpdateDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync", + "title": "Snippet for the delete_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label.", + "file": "data_access_control_service/delete_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "DeleteDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync", + "title": "Snippet for the create_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope.", + "file": "data_access_control_service/create_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "CreateDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync", + "title": "Snippet for the get_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope.", + "file": "data_access_control_service/get_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "GetDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync", + "title": "Snippet for the list_data_access_scopes call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes.", + "file": "data_access_control_service/list_data_access_scopes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_access_scopes", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "ListDataAccessScopes", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessScopes", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync", + "title": "Snippet for the update_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope.", + "file": "data_access_control_service/update_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "UpdateDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync", + "title": "Snippet for the delete_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope.", + "file": "data_access_control_service/delete_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "DeleteDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_CreateDataTable_sync", + "title": "Snippet for the create_data_table call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table.", + "file": "data_table_service/create_data_table.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_table", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateDataTableRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTable", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "CreateDataTable", + "full_name": "google.cloud.chronicle.v1.DataTableService.CreateDataTable", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_ListDataTables_sync", + "title": "Snippet for the list_data_tables call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_tables.", + "file": "data_table_service/list_data_tables.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_tables", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_tables", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListDataTablesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListDataTablesResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "ListDataTables", + "full_name": "google.cloud.chronicle.v1.DataTableService.ListDataTables", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_GetDataTable_sync", + "title": "Snippet for the get_data_table call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table.", + "file": "data_table_service/get_data_table.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_table", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataTableRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTable", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "GetDataTable", + "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTable", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_UpdateDataTable_sync", + "title": "Snippet for the update_data_table call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table.", + "file": "data_table_service/update_data_table.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_table", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateDataTableRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTable", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "UpdateDataTable", + "full_name": "google.cloud.chronicle.v1.DataTableService.UpdateDataTable", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_DeleteDataTable_sync", + "title": "Snippet for the delete_data_table call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table.", + "file": "data_table_service/delete_data_table.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_table", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteDataTableRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "DeleteDataTable", + "full_name": "google.cloud.chronicle.v1.DataTableService.DeleteDataTable", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_CreateDataTableRow_sync", + "title": "Snippet for the create_data_table_row call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table_row.", + "file": "data_table_service/create_data_table_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_table_row", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "CreateDataTableRow", + "full_name": "google.cloud.chronicle.v1.DataTableService.CreateDataTableRow", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync", + "title": "Snippet for the update_data_table_row call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table_row.", + "file": "data_table_service/update_data_table_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_table_row", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "UpdateDataTableRow", + "full_name": "google.cloud.chronicle.v1.DataTableService.UpdateDataTableRow", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_ListDataTableRows_sync", + "title": "Snippet for the list_data_table_rows call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_table_rows.", + "file": "data_table_service/list_data_table_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_table_rows", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_table_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "ListDataTableRows", + "full_name": "google.cloud.chronicle.v1.DataTableService.ListDataTableRows", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_GetDataTableRow_sync", + "title": "Snippet for the get_data_table_row call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_row.", + "file": "data_table_service/get_data_table_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_table_row", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataTableRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "GetDataTableRow", + "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTableRow", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync", + "title": "Snippet for the delete_data_table_row call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table_row.", + "file": "data_table_service/delete_data_table_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_table_row", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "DeleteDataTableRow", + "full_name": "google.cloud.chronicle.v1.DataTableService.DeleteDataTableRow", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync", + "title": "Snippet for the bulk_create_data_table_rows call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows.", + "file": "data_table_service/bulk_create_data_table_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_create_data_table_rows", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "BulkCreateDataTableRows", + "full_name": "google.cloud.chronicle.v1.DataTableService.BulkCreateDataTableRows", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync", + "title": "Snippet for the bulk_get_data_table_rows call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows.", + "file": "data_table_service/bulk_get_data_table_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_get_data_table_rows", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "BulkGetDataTableRows", + "full_name": "google.cloud.chronicle.v1.DataTableService.BulkGetDataTableRows", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync", + "title": "Snippet for the bulk_replace_data_table_rows call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows.", + "file": "data_table_service/bulk_replace_data_table_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_replace_data_table_rows", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "BulkReplaceDataTableRows", + "full_name": "google.cloud.chronicle.v1.DataTableService.BulkReplaceDataTableRows", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync", + "title": "Snippet for the bulk_update_data_table_rows call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows.", + "file": "data_table_service/bulk_update_data_table_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_update_data_table_rows", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "BulkUpdateDataTableRows", + "full_name": "google.cloud.chronicle.v1.DataTableService.BulkUpdateDataTableRows", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync", + "title": "Snippet for the get_data_table_operation_errors call in the DataTableService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors.", + "file": "data_table_service/get_data_table_operation_errors.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_table_operation_errors", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataTableOperationErrors", + "client": { + "short_name": "DataTableService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" + }, + "method": { + "short_name": "GetDataTableOperationErrors", + "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTableOperationErrors", + "service": { + "short_name": "DataTableService", + "full_name": "google.cloud.chronicle.v1.DataTableService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_GetWatchlist_sync", + "title": "Snippet for the get_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist.", + "file": "entity_service/get_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "GetWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.GetWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_ListWatchlists_sync", + "title": "Snippet for the list_watchlists call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists.", + "file": "entity_service/list_watchlists.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_watchlists", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListWatchlistsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListWatchlistsResponse", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "ListWatchlists", + "full_name": "google.cloud.chronicle.v1.EntityService.ListWatchlists", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_CreateWatchlist_sync", + "title": "Snippet for the create_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist.", + "file": "entity_service/create_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "CreateWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.CreateWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_UpdateWatchlist_sync", + "title": "Snippet for the update_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist.", + "file": "entity_service/update_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "UpdateWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.UpdateWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_DeleteWatchlist_sync", + "title": "Snippet for the delete_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist.", + "file": "entity_service/delete_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "DeleteWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.DeleteWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync", + "title": "Snippet for the create_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard.", + "file": "native_dashboard_service/create_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "CreateNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.CreateNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync", + "title": "Snippet for the get_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard.", + "file": "native_dashboard_service/get_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "GetNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.GetNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync", + "title": "Snippet for the list_native_dashboards call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards.", + "file": "native_dashboard_service/list_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "ListNativeDashboards", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ListNativeDashboards", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync", + "title": "Snippet for the update_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard.", + "file": "native_dashboard_service/update_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "UpdateNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.UpdateNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync", + "title": "Snippet for the duplicate_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard.", + "file": "native_dashboard_service/duplicate_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "duplicate_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "DuplicateNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DuplicateNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync", + "title": "Snippet for the delete_native_dashboard call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard.", + "file": "native_dashboard_service/delete_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "DeleteNativeDashboard", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DeleteNativeDashboard", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_AddChart_sync", + "title": "Snippet for the add_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#add_chart.", + "file": "native_dashboard_service/add_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "add_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#add_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::AddChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::AddChartResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "AddChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.AddChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_RemoveChart_sync", + "title": "Snippet for the remove_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#remove_chart.", + "file": "native_dashboard_service/remove_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "remove_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#remove_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::RemoveChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "RemoveChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.RemoveChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_EditChart_sync", + "title": "Snippet for the edit_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#edit_chart.", + "file": "native_dashboard_service/edit_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "edit_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#edit_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::EditChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::EditChartResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "EditChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.EditChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync", + "title": "Snippet for the duplicate_chart call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_chart.", + "file": "native_dashboard_service/duplicate_chart.rb", + "language": "RUBY", + "client_method": { + "short_name": "duplicate_chart", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_chart", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DuplicateChartRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DuplicateChartResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "DuplicateChart", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DuplicateChart", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync", + "title": "Snippet for the export_native_dashboards call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards.", + "file": "native_dashboard_service/export_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "ExportNativeDashboards", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ExportNativeDashboards", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync", + "title": "Snippet for the import_native_dashboards call in the NativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards.", + "file": "native_dashboard_service/import_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse", + "client": { + "short_name": "NativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" + }, + "method": { + "short_name": "ImportNativeDashboards", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ImportNativeDashboards", + "service": { + "short_name": "NativeDashboardService", + "full_name": "google.cloud.chronicle.v1.NativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync", + "title": "Snippet for the get_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard.", + "file": "featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_featured_content_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard", + "client": { + "short_name": "FeaturedContentNativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" + }, + "method": { + "short_name": "GetFeaturedContentNativeDashboard", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.GetFeaturedContentNativeDashboard", + "service": { + "short_name": "FeaturedContentNativeDashboardService", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync", + "title": "Snippet for the list_featured_content_native_dashboards call in the FeaturedContentNativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards.", + "file": "featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_featured_content_native_dashboards", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse", + "client": { + "short_name": "FeaturedContentNativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" + }, + "method": { + "short_name": "ListFeaturedContentNativeDashboards", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.ListFeaturedContentNativeDashboards", + "service": { + "short_name": "FeaturedContentNativeDashboardService", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync", + "title": "Snippet for the install_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard.", + "file": "featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb", + "language": "RUBY", + "client_method": { + "short_name": "install_featured_content_native_dashboard", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse", + "client": { + "short_name": "FeaturedContentNativeDashboardService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" + }, + "method": { + "short_name": "InstallFeaturedContentNativeDashboard", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.InstallFeaturedContentNativeDashboard", + "service": { + "short_name": "FeaturedContentNativeDashboardService", + "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_InstanceService_GetInstance_sync", + "title": "Snippet for the get_instance call in the InstanceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance.", + "file": "instance_service/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Instance", + "client": { + "short_name": "InstanceService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.cloud.chronicle.v1.InstanceService.GetInstance", + "service": { + "short_name": "InstanceService", + "full_name": "google.cloud.chronicle.v1.InstanceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_GetReferenceList_sync", + "title": "Snippet for the get_reference_list call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list.", + "file": "reference_list_service/get_reference_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_reference_list", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetReferenceListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "GetReferenceList", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.GetReferenceList", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync", + "title": "Snippet for the list_reference_lists call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists.", + "file": "reference_list_service/list_reference_lists.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reference_lists", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListReferenceListsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListReferenceListsResponse", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "ListReferenceLists", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.ListReferenceLists", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync", + "title": "Snippet for the create_reference_list call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list.", + "file": "reference_list_service/create_reference_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_reference_list", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateReferenceListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "CreateReferenceList", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.CreateReferenceList", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync", + "title": "Snippet for the update_reference_list call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list.", + "file": "reference_list_service/update_reference_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_reference_list", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "UpdateReferenceList", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.UpdateReferenceList", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_CreateRule_sync", + "title": "Snippet for the create_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_rule.", + "file": "rule_service/create_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Rule", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "CreateRule", + "full_name": "google.cloud.chronicle.v1.RuleService.CreateRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_GetRule_sync", + "title": "Snippet for the get_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule.", + "file": "rule_service/get_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Rule", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "GetRule", + "full_name": "google.cloud.chronicle.v1.RuleService.GetRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRules_sync", + "title": "Snippet for the list_rules call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rules.", + "file": "rule_service/list_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rules", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRulesResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRules", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRules", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_UpdateRule_sync", + "title": "Snippet for the update_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule.", + "file": "rule_service/update_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Rule", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "UpdateRule", + "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_DeleteRule_sync", + "title": "Snippet for the delete_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule.", + "file": "rule_service/delete_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "DeleteRule", + "full_name": "google.cloud.chronicle.v1.RuleService.DeleteRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRuleRevisions_sync", + "title": "Snippet for the list_rule_revisions call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions.", + "file": "rule_service/list_rule_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rule_revisions", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRuleRevisions", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleRevisions", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_CreateRetrohunt_sync", + "title": "Snippet for the create_retrohunt call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt.", + "file": "rule_service/create_retrohunt.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_retrohunt", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "CreateRetrohunt", + "full_name": "google.cloud.chronicle.v1.RuleService.CreateRetrohunt", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_GetRetrohunt_sync", + "title": "Snippet for the get_retrohunt call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt.", + "file": "rule_service/get_retrohunt.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_retrohunt", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetRetrohuntRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Retrohunt", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "GetRetrohunt", + "full_name": "google.cloud.chronicle.v1.RuleService.GetRetrohunt", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRetrohunts_sync", + "title": "Snippet for the list_retrohunts call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts.", + "file": "rule_service/list_retrohunts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_retrohunts", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRetrohunts", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRetrohunts", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_GetRuleDeployment_sync", + "title": "Snippet for the get_rule_deployment call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment.", + "file": "rule_service/get_rule_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_rule_deployment", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "GetRuleDeployment", + "full_name": "google.cloud.chronicle.v1.RuleService.GetRuleDeployment", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRuleDeployments_sync", + "title": "Snippet for the list_rule_deployments call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments.", + "file": "rule_service/list_rule_deployments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rule_deployments", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRuleDeployments", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleDeployments", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync", + "title": "Snippet for the update_rule_deployment call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment.", + "file": "rule_service/update_rule_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_rule_deployment", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "UpdateRuleDeployment", + "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRuleDeployment", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_paths_test.rb new file mode 100644 index 000000000000..8f5ca6d79947 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_paths_test.rb @@ -0,0 +1,67 @@ +# 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/chronicle/v1/big_query_export_service" + +class ::Google::Cloud::Chronicle::V1::BigQueryExportService::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_big_query_export_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.big_query_export_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2/bigQueryExport", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_rest_test.rb new file mode 100644 index 000000000000..971ffd42e437 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_rest_test.rb @@ -0,0 +1,262 @@ +# 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/chronicle/v1/big_query_export_pb" +require "google/cloud/chronicle/v1/big_query_export_service/rest" + + +class ::Google::Cloud::Chronicle::V1::BigQueryExportService::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_get_big_query_export + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_big_query_export_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::Chronicle::V1::BigQueryExportService::Rest::ServiceStub.stub :transcode_get_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_big_query_export_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_big_query_export({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_big_query_export name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_big_query_export ::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_big_query_export({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_big_query_export(::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_big_query_export_client_stub.call_count + end + end + end + + def test_update_big_query_export + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + big_query_export = {} + update_mask = {} + + update_big_query_export_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::Chronicle::V1::BigQueryExportService::Rest::ServiceStub.stub :transcode_update_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_big_query_export_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_big_query_export ::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_big_query_export(::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_big_query_export_client_stub.call_count + end + end + end + + def test_provision_big_query_export + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BigQueryExport.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + provision_big_query_export_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::Chronicle::V1::BigQueryExportService::Rest::ServiceStub.stub :transcode_provision_big_query_export_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, provision_big_query_export_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.provision_big_query_export({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.provision_big_query_export parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.provision_big_query_export ::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.provision_big_query_export({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.provision_big_query_export(::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, provision_big_query_export_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::Chronicle::V1::BigQueryExportService::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::Chronicle::V1::BigQueryExportService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_test.rb new file mode 100644 index 000000000000..bf405d39fbd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_test.rb @@ -0,0 +1,280 @@ +# 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/chronicle/v1/big_query_export_pb" +require "google/cloud/chronicle/v1/big_query_export_service" + +class ::Google::Cloud::Chronicle::V1::BigQueryExportService::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_get_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BigQueryExport.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_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_big_query_export, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_big_query_export_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_big_query_export({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_big_query_export name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_big_query_export ::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_big_query_export({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_big_query_export(::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest.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_big_query_export_client_stub.call_rpc_count + end + end + + def test_update_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BigQueryExport.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. + big_query_export = {} + update_mask = {} + + update_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_big_query_export, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::BigQueryExport), request["big_query_export"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_big_query_export_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_big_query_export({ big_query_export: big_query_export, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_big_query_export big_query_export: big_query_export, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_big_query_export ::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_big_query_export({ big_query_export: big_query_export, 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 + client.update_big_query_export(::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest.new(big_query_export: big_query_export, 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_big_query_export_client_stub.call_rpc_count + end + end + + def test_provision_big_query_export + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BigQueryExport.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" + + provision_big_query_export_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :provision_big_query_export, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, provision_big_query_export_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.provision_big_query_export({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.provision_big_query_export parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.provision_big_query_export ::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.provision_big_query_export({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.provision_big_query_export(::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, provision_big_query_export_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::Chronicle::V1::BigQueryExportService::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::Chronicle::V1::BigQueryExportService::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::Chronicle::V1::BigQueryExportService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb new file mode 100644 index 000000000000..19d05a898902 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb @@ -0,0 +1,67 @@ +# 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/chronicle/v1/dashboard_chart_service" + +class ::Google::Cloud::Chronicle::V1::DashboardChartService::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_dashboard_chart_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb new file mode 100644 index 000000000000..8efea8f4f55f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb @@ -0,0 +1,208 @@ +# 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/chronicle/v1/dashboard_chart_pb" +require "google/cloud/chronicle/v1/dashboard_chart_service/rest" + + +class ::Google::Cloud::Chronicle::V1::DashboardChartService::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_get_dashboard_chart + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DashboardChart.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dashboard_chart_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::Chronicle::V1::DashboardChartService::Rest::ServiceStub.stub :transcode_get_dashboard_chart_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dashboard_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_dashboard_chart({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_dashboard_chart name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_dashboard_chart ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_dashboard_chart({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_dashboard_chart(::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dashboard_chart_client_stub.call_count + end + end + end + + def test_batch_get_dashboard_charts + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + + batch_get_dashboard_charts_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::Chronicle::V1::DashboardChartService::Rest::ServiceStub.stub :transcode_batch_get_dashboard_charts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_get_dashboard_charts_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_get_dashboard_charts({ parent: parent, names: names }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_get_dashboard_charts parent: parent, names: names do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_get_dashboard_charts ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_get_dashboard_charts({ parent: parent, names: names }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_get_dashboard_charts(::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_get_dashboard_charts_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::Chronicle::V1::DashboardChartService::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::Chronicle::V1::DashboardChartService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb new file mode 100644 index 000000000000..f2b3e78e90c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb @@ -0,0 +1,222 @@ +# 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/chronicle/v1/dashboard_chart_pb" +require "google/cloud/chronicle/v1/dashboard_chart_service" + +class ::Google::Cloud::Chronicle::V1::DashboardChartService::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_get_dashboard_chart + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DashboardChart.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_dashboard_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dashboard_chart, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dashboard_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_dashboard_chart({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_dashboard_chart name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_dashboard_chart ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_dashboard_chart({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_dashboard_chart(::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.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_dashboard_chart_client_stub.call_rpc_count + end + end + + def test_batch_get_dashboard_charts + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse.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" + names = ["hello world"] + + batch_get_dashboard_charts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_get_dashboard_charts, name + assert_kind_of ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_get_dashboard_charts_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_get_dashboard_charts({ parent: parent, names: names }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_get_dashboard_charts parent: parent, names: names do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_get_dashboard_charts ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_get_dashboard_charts({ parent: parent, names: names }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_get_dashboard_charts(::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_get_dashboard_charts_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::Chronicle::V1::DashboardChartService::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::Chronicle::V1::DashboardChartService::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::Chronicle::V1::DashboardChartService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::DashboardChartService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb new file mode 100644 index 000000000000..5ea1405fc02d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb @@ -0,0 +1,79 @@ +# 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/chronicle/v1/dashboard_query_service" + +class ::Google::Cloud::Chronicle::V1::DashboardQueryService::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_dashboard_chart_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path + end + end + + def test_dashboard_query_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_query_path project: "value0", location: "value1", instance: "value2", query: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardQueries/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb new file mode 100644 index 000000000000..f1b467a4b248 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb @@ -0,0 +1,211 @@ +# 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/chronicle/v1/dashboard_query_pb" +require "google/cloud/chronicle/v1/dashboard_query_service/rest" + + +class ::Google::Cloud::Chronicle::V1::DashboardQueryService::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_get_dashboard_query + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DashboardQuery.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dashboard_query_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::Chronicle::V1::DashboardQueryService::Rest::ServiceStub.stub :transcode_get_dashboard_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dashboard_query_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_dashboard_query({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_dashboard_query name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_dashboard_query ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_dashboard_query({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_dashboard_query(::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dashboard_query_client_stub.call_count + end + end + end + + def test_execute_dashboard_query + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = {} + filters = [{}] + clear_cache = true + use_previous_time_range = true + + execute_dashboard_query_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::Chronicle::V1::DashboardQueryService::Rest::ServiceStub.stub :transcode_execute_dashboard_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, execute_dashboard_query_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.execute_dashboard_query parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.execute_dashboard_query ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.execute_dashboard_query(::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, execute_dashboard_query_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::Chronicle::V1::DashboardQueryService::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::Chronicle::V1::DashboardQueryService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb new file mode 100644 index 000000000000..17503831b5bc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb @@ -0,0 +1,228 @@ +# 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/chronicle/v1/dashboard_query_pb" +require "google/cloud/chronicle/v1/dashboard_query_service" + +class ::Google::Cloud::Chronicle::V1::DashboardQueryService::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_get_dashboard_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DashboardQuery.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_dashboard_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dashboard_query, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dashboard_query_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_dashboard_query({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_dashboard_query name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_dashboard_query ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_dashboard_query({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_dashboard_query(::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.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_dashboard_query_client_stub.call_rpc_count + end + end + + def test_execute_dashboard_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse.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" + query = {} + filters = [{}] + clear_cache = true + use_previous_time_range = true + + execute_dashboard_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :execute_dashboard_query, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardQuery), request["query"] + assert_kind_of ::Google::Cloud::Chronicle::V1::DashboardFilter, request["filters"].first + assert_equal true, request["clear_cache"] + assert_equal true, request["use_previous_time_range"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, execute_dashboard_query_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.execute_dashboard_query parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.execute_dashboard_query ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.execute_dashboard_query(::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, execute_dashboard_query_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::Chronicle::V1::DashboardQueryService::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::Chronicle::V1::DashboardQueryService::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::Chronicle::V1::DashboardQueryService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb new file mode 100644 index 000000000000..8ef29809b076 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb @@ -0,0 +1,79 @@ +# 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/chronicle/v1/data_access_control_service" + +class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_label_path project: "value0", location: "value1", instance: "value2", data_access_label: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessLabels/value3", path + end + end + + def test_data_access_scope_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb new file mode 100644 index 000000000000..a20b2c953e40 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb @@ -0,0 +1,651 @@ +# 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/chronicle/v1/data_access_control_pb" +require "google/cloud/chronicle/v1/data_access_control_service/rest" + + +class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_access_label = {} + data_access_label_id = "hello world" + + create_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_access_label_client_stub.call_count + end + end + end + + def test_get_data_access_label + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_access_label({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_access_label name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_access_label({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_access_label_client_stub.call_count + end + end + end + + def test_list_data_access_labels + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_access_labels_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_labels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_access_labels_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_access_labels parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_access_labels_client_stub.call_count + end + end + end + + def test_update_data_access_label + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_access_label = {} + update_mask = {} + + update_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_access_label_client_stub.call_count + end + end + end + + def test_delete_data_access_label + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_access_label({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_access_label name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_access_label({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_access_label_client_stub.call_count + end + end + end + + def test_create_data_access_scope + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_access_scope = {} + data_access_scope_id = "hello world" + + create_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_access_scope_client_stub.call_count + end + end + end + + def test_get_data_access_scope + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_access_scope({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_access_scope name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_access_scope({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_access_scope_client_stub.call_count + end + end + end + + def test_list_data_access_scopes + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_access_scopes_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_scopes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_access_scopes_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_access_scopes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_access_scopes_client_stub.call_count + end + end + end + + def test_update_data_access_scope + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_access_scope = {} + update_mask = {} + + update_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_access_scope_client_stub.call_count + end + end + end + + def test_delete_data_access_scope + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_access_scope({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_access_scope name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_access_scope({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb new file mode 100644 index 000000000000..32e8f27fe8cf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb @@ -0,0 +1,718 @@ +# 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/chronicle/v1/data_access_control_pb" +require "google/cloud/chronicle/v1/data_access_control_service" + +class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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" + data_access_label = {} + data_access_label_id = "hello world" + + create_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] + assert_equal "hello world", request["data_access_label_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_access_label_client_stub.call_rpc_count + end + end + + def test_get_data_access_label + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_access_label({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_access_label name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_access_label({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count + end + end + + def test_list_data_access_labels + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_access_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_access_labels, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_access_labels_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_access_labels parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_data_access_labels_client_stub.call_rpc_count + end + end + + def test_update_data_access_label + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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. + data_access_label = {} + update_mask = {} + + update_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_access_label({ data_access_label: data_access_label, 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 + client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, 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_data_access_label_client_stub.call_rpc_count + end + end + + def test_delete_data_access_label + # 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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_access_label({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_access_label name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_access_label({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count + end + end + + def test_create_data_access_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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" + data_access_scope = {} + data_access_scope_id = "hello world" + + create_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] + assert_equal "hello world", request["data_access_scope_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_access_scope_client_stub.call_rpc_count + end + end + + def test_get_data_access_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_access_scope({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_access_scope name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_access_scope({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.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_data_access_scope_client_stub.call_rpc_count + end + end + + def test_list_data_access_scopes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_data_access_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_access_scopes, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_access_scopes_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_access_scopes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_data_access_scopes_client_stub.call_rpc_count + end + end + + def test_update_data_access_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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. + data_access_scope = {} + update_mask = {} + + update_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_access_scope({ data_access_scope: data_access_scope, 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 + client.update_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, 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_data_access_scope_client_stub.call_rpc_count + end + end + + def test_delete_data_access_scope + # 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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_access_scope({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_access_scope name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_access_scope({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.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_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb new file mode 100644 index 000000000000..ea65a25ca487 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb @@ -0,0 +1,103 @@ +# 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/chronicle/v1/data_table_service" + +class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_access_scope_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path + end + end + + def test_data_table_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_table_path project: "value0", location: "value1", instance: "value2", data_table: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataTables/value3", path + end + end + + def test_data_table_operation_errors_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_table_operation_errors_path project: "value0", location: "value1", instance: "value2", data_table_operation_errors: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataTableOperationErrors/value3", path + end + end + + def test_data_table_row_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_table_row_path project: "value0", location: "value1", instance: "value2", data_table: "value3", data_table_row: "value4" + assert_equal "projects/value0/locations/value1/instances/value2/dataTables/value3/dataTableRows/value4", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb new file mode 100644 index 000000000000..7509d98ad2cb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb @@ -0,0 +1,926 @@ +# 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/chronicle/v1/data_table_pb" +require "google/cloud/chronicle/v1/data_table_service/rest" + + +class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_table + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTable.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_table = {} + data_table_id = "hello world" + + create_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_create_data_table_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_table parent: parent, data_table: data_table, data_table_id: data_table_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_table ::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_table(::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_table_client_stub.call_count + end + end + end + + def test_list_data_tables + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_data_tables_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_list_data_tables_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_tables_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_tables parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_tables ::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_tables(::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_tables_client_stub.call_count + end + end + end + + def test_get_data_table + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTable.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_table({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_table name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_table ::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_table({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_table(::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_table_client_stub.call_count + end + end + end + + def test_update_data_table + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTable.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_table = {} + update_mask = {} + + update_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_update_data_table_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_table({ data_table: data_table, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_table data_table: data_table, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_table ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_table({ data_table: data_table, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_table(::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_table_client_stub.call_count + end + end + end + + def test_delete_data_table + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_delete_data_table_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_table({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_table name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_table ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_table({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_table(::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_table_client_stub.call_count + end + end + end + + def test_create_data_table_row + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_table_row = {} + + create_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_create_data_table_row_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_table_row({ parent: parent, data_table_row: data_table_row }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_table_row parent: parent, data_table_row: data_table_row do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_table_row ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_table_row({ parent: parent, data_table_row: data_table_row }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_table_row(::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_table_row_client_stub.call_count + end + end + end + + def test_update_data_table_row + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_table_row = {} + update_mask = {} + + update_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_update_data_table_row_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_table_row data_table_row: data_table_row, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_table_row ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_table_row(::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_table_row_client_stub.call_count + end + end + end + + def test_list_data_table_rows + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + list_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_list_data_table_rows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_data_table_rows parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_data_table_rows ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_data_table_rows(::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_data_table_rows_client_stub.call_count + end + end + end + + def test_get_data_table_row + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_row_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_table_row({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_table_row name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_table_row ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_table_row({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_table_row(::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_table_row_client_stub.call_count + end + end + end + + def test_delete_data_table_row + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_delete_data_table_row_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_table_row({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_table_row name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_table_row ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_table_row({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_table_row(::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_table_row_client_stub.call_count + end + end + end + + def test_bulk_create_data_table_rows + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + bulk_create_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_create_data_table_rows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_create_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_create_data_table_rows({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_create_data_table_rows parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_create_data_table_rows ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_create_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_create_data_table_rows(::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_create_data_table_rows_client_stub.call_count + end + end + end + + def test_bulk_get_data_table_rows + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + bulk_get_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_get_data_table_rows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_get_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_get_data_table_rows({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_get_data_table_rows parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_get_data_table_rows ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_get_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_get_data_table_rows(::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_get_data_table_rows_client_stub.call_count + end + end + end + + def test_bulk_replace_data_table_rows + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + bulk_replace_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_replace_data_table_rows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_replace_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_replace_data_table_rows({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_replace_data_table_rows parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_replace_data_table_rows ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_replace_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_replace_data_table_rows(::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_replace_data_table_rows_client_stub.call_count + end + end + end + + def test_bulk_update_data_table_rows + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requests = [{}] + + bulk_update_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_update_data_table_rows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_update_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_update_data_table_rows({ parent: parent, requests: requests }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_update_data_table_rows parent: parent, requests: requests do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_update_data_table_rows ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_update_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_update_data_table_rows(::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_update_data_table_rows_client_stub.call_count + end + end + end + + def test_get_data_table_operation_errors + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_table_operation_errors_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_operation_errors_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_table_operation_errors_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_table_operation_errors({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_table_operation_errors name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_table_operation_errors ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_table_operation_errors({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_table_operation_errors(::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_table_operation_errors_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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb new file mode 100644 index 000000000000..0abf7ea87f8f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb @@ -0,0 +1,1018 @@ +# 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/chronicle/v1/data_table_pb" +require "google/cloud/chronicle/v1/data_table_service" + +class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_table + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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" + data_table = {} + data_table_id = "hello world" + + create_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_table, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTable), request["data_table"] + assert_equal "hello world", request["data_table_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_table parent: parent, data_table: data_table, data_table_id: data_table_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_table ::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_table(::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_table_client_stub.call_rpc_count + end + end + + def test_list_data_tables + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.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" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + + list_data_tables_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_tables, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataTablesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_tables_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_tables parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_tables ::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) 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 + client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, 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 + client.list_data_tables(::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), 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_data_tables_client_stub.call_rpc_count + end + end + + def test_get_data_table + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_table, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_table({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_table name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_table ::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_table({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_table(::Google::Cloud::Chronicle::V1::GetDataTableRequest.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_data_table_client_stub.call_rpc_count + end + end + + def test_update_data_table + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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. + data_table = {} + update_mask = {} + + update_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_table, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTable), request["data_table"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_table({ data_table: data_table, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_table data_table: data_table, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_table ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_table({ data_table: data_table, 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 + client.update_data_table(::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, 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_data_table_client_stub.call_rpc_count + end + end + + def test_delete_data_table + # 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" + force = true + + delete_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_table, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_table_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_table({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_table name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_table ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_table({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_table(::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_data_table_client_stub.call_rpc_count + end + end + + def test_create_data_table_row + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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" + data_table_row = {} + + create_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_table_row, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTableRow), request["data_table_row"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_table_row({ parent: parent, data_table_row: data_table_row }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_table_row parent: parent, data_table_row: data_table_row do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_table_row ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_table_row({ parent: parent, data_table_row: data_table_row }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_table_row(::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_table_row_client_stub.call_rpc_count + end + end + + def test_update_data_table_row + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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. + data_table_row = {} + update_mask = {} + + update_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_table_row, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTableRow), request["data_table_row"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_table_row data_table_row: data_table_row, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_table_row ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_table_row({ data_table_row: data_table_row, 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 + client.update_data_table_row(::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, 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_data_table_row_client_stub.call_rpc_count + end + end + + def test_list_data_table_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.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" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + filter = "hello world" + + list_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_table_rows, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_data_table_rows parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_data_table_rows ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) 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 + client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, 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 + client.list_data_table_rows(::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), 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_data_table_rows_client_stub.call_rpc_count + end + end + + def test_get_data_table_row + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_table_row, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_table_row({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_table_row name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_table_row ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_table_row({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_table_row(::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.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_data_table_row_client_stub.call_rpc_count + end + end + + def test_delete_data_table_row + # 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_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_table_row, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_table_row_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_table_row({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_table_row name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_table_row ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_table_row({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_data_table_row(::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.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_data_table_row_client_stub.call_rpc_count + end + end + + def test_bulk_create_data_table_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.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" + requests = [{}] + + bulk_create_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_create_data_table_rows, name + assert_kind_of ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_create_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_create_data_table_rows({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_create_data_table_rows parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_create_data_table_rows ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_create_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_create_data_table_rows(::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_create_data_table_rows_client_stub.call_rpc_count + end + end + + def test_bulk_get_data_table_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.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" + requests = [{}] + + bulk_get_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_get_data_table_rows, name + assert_kind_of ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_get_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_get_data_table_rows({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_get_data_table_rows parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_get_data_table_rows ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_get_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_get_data_table_rows(::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_get_data_table_rows_client_stub.call_rpc_count + end + end + + def test_bulk_replace_data_table_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.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" + requests = [{}] + + bulk_replace_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_replace_data_table_rows, name + assert_kind_of ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_replace_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_replace_data_table_rows({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_replace_data_table_rows parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_replace_data_table_rows ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_replace_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_replace_data_table_rows(::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_replace_data_table_rows_client_stub.call_rpc_count + end + end + + def test_bulk_update_data_table_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.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" + requests = [{}] + + bulk_update_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_update_data_table_rows, name + assert_kind_of ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_update_data_table_rows_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_update_data_table_rows({ parent: parent, requests: requests }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_update_data_table_rows parent: parent, requests: requests do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_update_data_table_rows ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_update_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_update_data_table_rows(::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_update_data_table_rows_client_stub.call_rpc_count + end + end + + def test_get_data_table_operation_errors + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.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_data_table_operation_errors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_table_operation_errors, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_table_operation_errors_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_table_operation_errors({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_table_operation_errors name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_table_operation_errors ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_table_operation_errors({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_data_table_operation_errors(::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.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_data_table_operation_errors_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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::DataTableService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb new file mode 100644 index 000000000000..5d9dc9f08219 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb @@ -0,0 +1,67 @@ +# 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/chronicle/v1/entity_service" + +class ::Google::Cloud::Chronicle::V1::EntityService::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_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_watchlist_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.watchlist_path project: "value0", location: "value1", instance: "value2", watchlist: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/watchlists/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb new file mode 100644 index 000000000000..eaea39586386 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb @@ -0,0 +1,376 @@ +# 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/chronicle/v1/entity_pb" +require "google/cloud/chronicle/v1/entity_service/rest" + + +class ::Google::Cloud::Chronicle::V1::EntityService::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_get_watchlist + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_get_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_watchlist({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_watchlist name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_watchlist({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_watchlist_client_stub.call_count + end + end + end + + def test_list_watchlists + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_watchlists_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_list_watchlists_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_watchlists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_watchlists parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_watchlists_client_stub.call_count + end + end + end + + def test_create_watchlist + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + watchlist_id = "hello world" + watchlist = {} + + create_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_create_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_watchlist_client_stub.call_count + end + end + end + + def test_update_watchlist + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + watchlist = {} + update_mask = {} + + update_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_update_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_watchlist watchlist: watchlist, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_watchlist_client_stub.call_count + end + end + end + + def test_delete_watchlist + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_delete_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_watchlist({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_watchlist name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_watchlist({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb new file mode 100644 index 000000000000..33700fc8c675 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb @@ -0,0 +1,413 @@ +# 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/chronicle/v1/entity_pb" +require "google/cloud/chronicle/v1/entity_service" + +class ::Google::Cloud::Chronicle::V1::EntityService::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_get_watchlist + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_watchlist({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_watchlist name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_watchlist({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.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_watchlist_client_stub.call_rpc_count + end + end + + def test_list_watchlists + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_watchlists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_watchlists, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_watchlists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_watchlists parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_watchlists_client_stub.call_rpc_count + end + end + + def test_create_watchlist + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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" + watchlist_id = "hello world" + watchlist = {} + + create_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["watchlist_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_watchlist_client_stub.call_rpc_count + end + end + + def test_update_watchlist + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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. + watchlist = {} + update_mask = {} + + update_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_watchlist watchlist: watchlist, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_watchlist({ watchlist: watchlist, 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 + client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, 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_watchlist_client_stub.call_rpc_count + end + end + + def test_delete_watchlist + # 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" + force = true + + delete_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_watchlist({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_watchlist name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_watchlist({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::EntityService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb new file mode 100644 index 000000000000..90c49bafd600 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb @@ -0,0 +1,103 @@ +# 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/chronicle/v1/featured_content_native_dashboard_service" + +class ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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_content_hub_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.content_hub_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2/contentHub", path + end + end + + def test_dashboard_chart_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path + end + end + + def test_dashboard_query_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_query_path project: "value0", location: "value1", instance: "value2", query: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardQueries/value3", path + end + end + + def test_featured_content_native_dashboard_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.featured_content_native_dashboard_path project: "value0", location: "value1", instance: "value2", featured_content_native_dashboard: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/contentHub/featuredContentNativeDashboards/value3", path + end + end + + def test_native_dashboard_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.native_dashboard_path project: "value0", location: "value1", instance: "value2", dashboard: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/nativeDashboards/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb new file mode 100644 index 000000000000..823c3c2b5967 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb @@ -0,0 +1,265 @@ +# 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/chronicle/v1/featured_content_native_dashboard_pb" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" + + +class ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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_get_featured_content_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.stub :transcode_get_featured_content_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_featured_content_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_featured_content_native_dashboard({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_featured_content_native_dashboard name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_featured_content_native_dashboard({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_featured_content_native_dashboard_client_stub.call_count + end + end + end + + def test_list_featured_content_native_dashboards + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_featured_content_native_dashboards_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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.stub :transcode_list_featured_content_native_dashboards_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_featured_content_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_featured_content_native_dashboards parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_featured_content_native_dashboards ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_featured_content_native_dashboards(::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_featured_content_native_dashboards_client_stub.call_count + end + end + end + + def test_install_featured_content_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + featured_content_native_dashboard = {} + + install_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.stub :transcode_install_featured_content_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, install_featured_content_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.install_featured_content_native_dashboard name: name, featured_content_native_dashboard: featured_content_native_dashboard do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.install_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.install_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, install_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb new file mode 100644 index 000000000000..7c72e8df2cc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb @@ -0,0 +1,291 @@ +# 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/chronicle/v1/featured_content_native_dashboard_pb" +require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" + +class ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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_get_featured_content_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard.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_featured_content_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_featured_content_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_featured_content_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_featured_content_native_dashboard({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_featured_content_native_dashboard name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_featured_content_native_dashboard({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.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_featured_content_native_dashboard_client_stub.call_rpc_count + end + end + + def test_list_featured_content_native_dashboards + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_featured_content_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_featured_content_native_dashboards, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_featured_content_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_featured_content_native_dashboards parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_featured_content_native_dashboards ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_featured_content_native_dashboards(::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_featured_content_native_dashboards_client_stub.call_rpc_count + end + end + + def test_install_featured_content_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse.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" + featured_content_native_dashboard = {} + + install_featured_content_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :install_featured_content_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard), request["featured_content_native_dashboard"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, install_featured_content_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.install_featured_content_native_dashboard name: name, featured_content_native_dashboard: featured_content_native_dashboard do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.install_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.install_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, install_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::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::Chronicle::V1::FeaturedContentNativeDashboardService::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::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb new file mode 100644 index 000000000000..07fe0e7efd30 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb @@ -0,0 +1,55 @@ +# 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/chronicle/v1/instance_service" + +class ::Google::Cloud::Chronicle::V1::InstanceService::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_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb new file mode 100644 index 000000000000..68e2d76e63cf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb @@ -0,0 +1,153 @@ +# 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/chronicle/v1/instance_pb" +require "google/cloud/chronicle/v1/instance_service/rest" + + +class ::Google::Cloud::Chronicle::V1::InstanceService::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_get_instance + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_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::Chronicle::V1::InstanceService::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb new file mode 100644 index 000000000000..267cd03ea876 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb @@ -0,0 +1,162 @@ +# 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/chronicle/v1/instance_pb" +require "google/cloud/chronicle/v1/instance_service" + +class ::Google::Cloud::Chronicle::V1::InstanceService::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_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Instance.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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_instance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_instance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_instance({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.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_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::InstanceService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb new file mode 100644 index 000000000000..acee3f640c8b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb @@ -0,0 +1,91 @@ +# 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/chronicle/v1/native_dashboard_service" + +class ::Google::Cloud::Chronicle::V1::NativeDashboardService::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_dashboard_chart_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path + end + end + + def test_dashboard_query_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dashboard_query_path project: "value0", location: "value1", instance: "value2", query: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dashboardQueries/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_native_dashboard_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.native_dashboard_path project: "value0", location: "value1", instance: "value2", dashboard: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/nativeDashboards/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb new file mode 100644 index 000000000000..bd590a79cb52 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb @@ -0,0 +1,765 @@ +# 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/chronicle/v1/native_dashboard_pb" +require "google/cloud/chronicle/v1/native_dashboard_service/rest" + + +class ::Google::Cloud::Chronicle::V1::NativeDashboardService::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_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + native_dashboard = {} + + create_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_create_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_native_dashboard parent: parent, native_dashboard: native_dashboard do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_native_dashboard ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_native_dashboard(::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_native_dashboard_client_stub.call_count + end + end + end + + def test_get_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED + + get_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_get_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_native_dashboard({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_native_dashboard name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_native_dashboard ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_native_dashboard({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_native_dashboard(::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_native_dashboard_client_stub.call_count + end + end + end + + def test_list_native_dashboards + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED + + list_native_dashboards_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_list_native_dashboards_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_native_dashboards parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_native_dashboards ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_native_dashboards(::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_native_dashboards_client_stub.call_count + end + end + end + + def test_update_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + native_dashboard = {} + update_mask = {} + + update_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_update_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_native_dashboard({ native_dashboard: native_dashboard, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_native_dashboard native_dashboard: native_dashboard, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_native_dashboard ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_native_dashboard({ native_dashboard: native_dashboard, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_native_dashboard(::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_native_dashboard_client_stub.call_count + end + end + end + + def test_duplicate_native_dashboard + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + native_dashboard = {} + + duplicate_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_duplicate_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, duplicate_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.duplicate_native_dashboard name: name, native_dashboard: native_dashboard do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.duplicate_native_dashboard ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.duplicate_native_dashboard(::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, duplicate_native_dashboard_client_stub.call_count + end + end + end + + def test_delete_native_dashboard + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_delete_native_dashboard_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_native_dashboard({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_native_dashboard name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_native_dashboard ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_native_dashboard({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_native_dashboard(::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_native_dashboard_client_stub.call_count + end + end + end + + def test_add_chart + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::AddChartResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + dashboard_query = {} + dashboard_chart = {} + chart_layout = {} + + add_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_add_chart_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, add_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.add_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.add_chart ::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.add_chart(::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, add_chart_client_stub.call_count + end + end + end + + def test_remove_chart + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + dashboard_chart = "hello world" + + remove_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_remove_chart_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, remove_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.remove_chart({ name: name, dashboard_chart: dashboard_chart }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.remove_chart name: name, dashboard_chart: dashboard_chart do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.remove_chart ::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.remove_chart({ name: name, dashboard_chart: dashboard_chart }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.remove_chart(::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, remove_chart_client_stub.call_count + end + end + end + + def test_edit_chart + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::EditChartResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + dashboard_query = {} + dashboard_chart = {} + edit_mask = {} + language_features = [:LANGUAGE_FEATURE_UNSPECIFIED] + + edit_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_edit_chart_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, edit_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.edit_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.edit_chart ::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.edit_chart(::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, edit_chart_client_stub.call_count + end + end + end + + def test_duplicate_chart + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DuplicateChartResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + dashboard_chart = "hello world" + + duplicate_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_duplicate_chart_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, duplicate_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.duplicate_chart name: name, dashboard_chart: dashboard_chart do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.duplicate_chart ::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.duplicate_chart(::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, duplicate_chart_client_stub.call_count + end + end + end + + def test_export_native_dashboards + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + names = ["hello world"] + + export_native_dashboards_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_export_native_dashboards_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_native_dashboards({ parent: parent, names: names }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_native_dashboards parent: parent, names: names do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_native_dashboards ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_native_dashboards({ parent: parent, names: names }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_native_dashboards(::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_native_dashboards_client_stub.call_count + end + end + end + + def test_import_native_dashboards + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + source = {} + + import_native_dashboards_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_import_native_dashboards_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_native_dashboards({ parent: parent, source: source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_native_dashboards parent: parent, source: source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_native_dashboards ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_native_dashboards({ parent: parent, source: source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_native_dashboards(::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_native_dashboards_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::Chronicle::V1::NativeDashboardService::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::Chronicle::V1::NativeDashboardService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb new file mode 100644 index 000000000000..bd48a08485da --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb @@ -0,0 +1,841 @@ +# 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/chronicle/v1/native_dashboard_pb" +require "google/cloud/chronicle/v1/native_dashboard_service" + +class ::Google::Cloud::Chronicle::V1::NativeDashboardService::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_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" + native_dashboard = {} + + create_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::NativeDashboard), request["native_dashboard"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_native_dashboard parent: parent, native_dashboard: native_dashboard do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_native_dashboard ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_native_dashboard(::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_native_dashboard_client_stub.call_rpc_count + end + end + + def test_get_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" + view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED + + get_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, request + assert_equal "hello world", request["name"] + assert_equal :NATIVE_DASHBOARD_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_native_dashboard({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_native_dashboard name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_native_dashboard ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_native_dashboard({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_native_dashboard(::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_native_dashboard_client_stub.call_rpc_count + end + end + + def test_list_native_dashboards + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse.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" + page_size = 42 + page_token = "hello world" + view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED + + list_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_native_dashboards, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :NATIVE_DASHBOARD_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_native_dashboards parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_native_dashboards ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) 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 + client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }, 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 + client.list_native_dashboards(::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), 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_native_dashboards_client_stub.call_rpc_count + end + end + + def test_update_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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. + native_dashboard = {} + update_mask = {} + + update_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::NativeDashboard), request["native_dashboard"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_native_dashboard({ native_dashboard: native_dashboard, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_native_dashboard native_dashboard: native_dashboard, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_native_dashboard ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_native_dashboard({ native_dashboard: native_dashboard, 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 + client.update_native_dashboard(::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, 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_native_dashboard_client_stub.call_rpc_count + end + end + + def test_duplicate_native_dashboard + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" + native_dashboard = {} + + duplicate_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :duplicate_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::NativeDashboard), request["native_dashboard"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, duplicate_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.duplicate_native_dashboard name: name, native_dashboard: native_dashboard do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.duplicate_native_dashboard ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.duplicate_native_dashboard(::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, duplicate_native_dashboard_client_stub.call_rpc_count + end + end + + def test_delete_native_dashboard + # 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_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_native_dashboard, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_native_dashboard_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_native_dashboard({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_native_dashboard name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_native_dashboard ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_native_dashboard({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_native_dashboard(::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.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_native_dashboard_client_stub.call_rpc_count + end + end + + def test_add_chart + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::AddChartResponse.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" + dashboard_query = {} + dashboard_chart = {} + chart_layout = {} + + add_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :add_chart, name + assert_kind_of ::Google::Cloud::Chronicle::V1::AddChartRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardQuery), request["dashboard_query"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardChart), request["dashboard_chart"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout), request["chart_layout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, add_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.add_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.add_chart ::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.add_chart(::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, add_chart_client_stub.call_rpc_count + end + end + + def test_remove_chart + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" + dashboard_chart = "hello world" + + remove_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :remove_chart, name + assert_kind_of ::Google::Cloud::Chronicle::V1::RemoveChartRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["dashboard_chart"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, remove_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.remove_chart({ name: name, dashboard_chart: dashboard_chart }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.remove_chart name: name, dashboard_chart: dashboard_chart do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.remove_chart ::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.remove_chart({ name: name, dashboard_chart: dashboard_chart }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.remove_chart(::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, remove_chart_client_stub.call_rpc_count + end + end + + def test_edit_chart + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::EditChartResponse.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" + dashboard_query = {} + dashboard_chart = {} + edit_mask = {} + language_features = [:LANGUAGE_FEATURE_UNSPECIFIED] + + edit_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :edit_chart, name + assert_kind_of ::Google::Cloud::Chronicle::V1::EditChartRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardQuery), request["dashboard_query"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardChart), request["dashboard_chart"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["edit_mask"] + assert_equal [:LANGUAGE_FEATURE_UNSPECIFIED], request["language_features"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, edit_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.edit_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.edit_chart ::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.edit_chart(::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, edit_chart_client_stub.call_rpc_count + end + end + + def test_duplicate_chart + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DuplicateChartResponse.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" + dashboard_chart = "hello world" + + duplicate_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :duplicate_chart, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DuplicateChartRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["dashboard_chart"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, duplicate_chart_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.duplicate_chart name: name, dashboard_chart: dashboard_chart do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.duplicate_chart ::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.duplicate_chart(::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, duplicate_chart_client_stub.call_rpc_count + end + end + + def test_export_native_dashboards + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse.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" + names = ["hello world"] + + export_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_native_dashboards, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["names"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_native_dashboards({ parent: parent, names: names }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_native_dashboards parent: parent, names: names do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_native_dashboards ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_native_dashboards({ parent: parent, names: names }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_native_dashboards(::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_native_dashboards_client_stub.call_rpc_count + end + end + + def test_import_native_dashboards + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse.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" + source = {} + + import_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_native_dashboards, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource), request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_native_dashboards_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_native_dashboards({ parent: parent, source: source }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_native_dashboards parent: parent, source: source do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_native_dashboards ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_native_dashboards({ parent: parent, source: source }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_native_dashboards(::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_native_dashboards_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::Chronicle::V1::NativeDashboardService::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::Chronicle::V1::NativeDashboardService::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::Chronicle::V1::NativeDashboardService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb new file mode 100644 index 000000000000..0a3e0e6f9025 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb @@ -0,0 +1,67 @@ +# 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/chronicle/v1/reference_list_service" + +class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_reference_list_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb new file mode 100644 index 000000000000..e077a4322795 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb @@ -0,0 +1,322 @@ +# 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/chronicle/v1/reference_list_pb" +require "google/cloud/chronicle/v1/reference_list_service/rest" + + +class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_get_reference_list + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + get_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_get_reference_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_reference_list({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_reference_list name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_reference_list({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_reference_list_client_stub.call_count + end + end + end + + def test_list_reference_lists + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + list_reference_lists_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_list_reference_lists_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reference_lists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_reference_lists_client_stub.call_count + end + end + end + + def test_create_reference_list + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reference_list = {} + reference_list_id = "hello world" + + create_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_create_reference_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_reference_list_client_stub.call_count + end + end + end + + def test_update_reference_list + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + reference_list = {} + update_mask = {} + + update_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_update_reference_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_reference_list reference_list: reference_list, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb new file mode 100644 index 000000000000..02598fddb1c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb @@ -0,0 +1,355 @@ +# 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/chronicle/v1/reference_list_pb" +require "google/cloud/chronicle/v1/reference_list_service" + +class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_get_reference_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + get_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_reference_list, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, request + assert_equal "hello world", request["name"] + assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_reference_list({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_reference_list name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_reference_list({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_reference_list_client_stub.call_rpc_count + end + end + + def test_list_reference_lists + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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" + page_size = 42 + page_token = "hello world" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + list_reference_lists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reference_lists, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_reference_lists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) 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 + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, 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 + client.list_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), 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_reference_lists_client_stub.call_rpc_count + end + end + + def test_create_reference_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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" + reference_list = {} + reference_list_id = "hello world" + + create_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_reference_list, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] + assert_equal "hello world", request["reference_list_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_reference_list_client_stub.call_rpc_count + end + end + + def test_update_reference_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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. + reference_list = {} + update_mask = {} + + update_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_reference_list, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_reference_list reference_list: reference_list, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_reference_list({ reference_list: reference_list, 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 + client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, 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_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::ReferenceListService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb new file mode 100644 index 000000000000..91602a5d5414 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb @@ -0,0 +1,400 @@ +# 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_services_pb" +require "google/cloud/chronicle/v1/rule_service" + +class ::Google::Cloud::Chronicle::V1::RuleService::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 + client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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 + client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.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 + client.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 + client.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 + client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.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 + client.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 + client.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 + client.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 + client.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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb new file mode 100644 index 000000000000..cc40252d4fea --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb @@ -0,0 +1,115 @@ +# 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/chronicle/v1/rule_service" + +class ::Google::Cloud::Chronicle::V1::RuleService::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_data_access_scope_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_reference_list_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path + end + end + + def test_retrohunt_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.retrohunt_path project: "value0", location: "value1", instance: "value2", rule: "value3", retrohunt: "value4" + assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/retrohunts/value4", path + end + end + + def test_rule_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rule_path project: "value0", location: "value1", instance: "value2", rule: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/rules/value3", path + end + end + + def test_rule_deployment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rule_deployment_path project: "value0", location: "value1", instance: "value2", rule: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/deployment", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb new file mode 100644 index 000000000000..22d16284fac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb @@ -0,0 +1,766 @@ +# 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_service/rest" + + +class ::Google::Cloud::Chronicle::V1::RuleService::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_rule + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rule = {} + + create_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_rule({ parent: parent, rule: rule }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_rule parent: parent, rule: rule do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_rule({ parent: parent, rule: rule }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_rule_client_stub.call_count + end + end + end + + def test_get_rule + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :RULE_VIEW_UNSPECIFIED + + get_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_rule({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_rule name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_rule({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_rule_client_stub.call_count + end + end + end + + def test_list_rules + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + view = :RULE_VIEW_UNSPECIFIED + filter = "hello world" + + list_rules_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_rules parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rules_client_stub.call_count + end + end + end + + def test_update_rule + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rule = {} + update_mask = {} + + update_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_rule({ rule: rule, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_rule rule: rule, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_rule({ rule: rule, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_rule_client_stub.call_count + end + end + end + + def test_delete_rule + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_delete_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_rule({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_rule name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_rule({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_rule_client_stub.call_count + end + end + end + + def test_list_rule_revisions + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + view = :RULE_VIEW_UNSPECIFIED + + list_rule_revisions_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rule_revisions_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rule_revisions_client_stub.call_count + end + end + end + + def test_create_retrohunt + # 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" + retrohunt = {} + + create_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_retrohunt_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_retrohunt parent: parent, retrohunt: retrohunt do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_retrohunt_client_stub.call_count + end + end + end + + def test_get_retrohunt + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Retrohunt.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_retrohunt_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_retrohunt({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_retrohunt name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_retrohunt({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_retrohunt_client_stub.call_count + end + end + end + + def test_list_retrohunts + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_retrohunts_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_retrohunts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_retrohunts_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_retrohunts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_retrohunts_client_stub.call_count + end + end + end + + def test_get_rule_deployment + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_rule_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_rule_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_rule_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_rule_deployment_client_stub.call_count + end + end + end + + def test_list_rule_deployments + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_rule_deployments_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_deployments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rule_deployments_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_rule_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rule_deployments_client_stub.call_count + end + end + end + + def test_update_rule_deployment + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rule_deployment = {} + update_mask = {} + + update_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb new file mode 100644 index 000000000000..75d72ff1a561 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb @@ -0,0 +1,877 @@ +# 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_service" + +class ::Google::Cloud::Chronicle::V1::RuleService::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_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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" + rule = {} + + create_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_rule({ parent: parent, rule: rule }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_rule parent: parent, rule: rule do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_rule({ parent: parent, rule: rule }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_rule_client_stub.call_rpc_count + end + end + + def test_get_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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" + view = :RULE_VIEW_UNSPECIFIED + + get_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleRequest, request + assert_equal "hello world", request["name"] + assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_rule({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_rule name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_rule({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_rule_client_stub.call_rpc_count + end + end + + def test_list_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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" + page_size = 42 + page_token = "hello world" + view = :RULE_VIEW_UNSPECIFIED + filter = "hello world" + + list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rules, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rules_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_rules parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter) 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 + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }, 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 + client.list_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter), 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_rules_client_stub.call_rpc_count + end + end + + def test_update_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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. + rule = {} + update_mask = {} + + update_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_rule({ rule: rule, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_rule rule: rule, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_rule({ rule: rule, 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 + client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, 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_rule_client_stub.call_rpc_count + end + end + + def test_delete_rule + # 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" + force = true + + delete_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_rule({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_rule name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_rule({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_rule_client_stub.call_rpc_count + end + end + + def test_list_rule_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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" + page_size = 42 + page_token = "hello world" + view = :RULE_VIEW_UNSPECIFIED + + list_rule_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rule_revisions, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rule_revisions_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) 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 + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, 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 + client.list_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), 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_rule_revisions_client_stub.call_rpc_count + end + end + + def test_create_retrohunt + # 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" + retrohunt = {} + + create_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_retrohunt, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Retrohunt), request["retrohunt"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) 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 + client.create_retrohunt parent: parent, retrohunt: retrohunt 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 + client.create_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) 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 + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }, 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 + client.create_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), 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_retrohunt_client_stub.call_rpc_count + end + end + + def test_get_retrohunt + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_retrohunt, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_retrohunt({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_retrohunt name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_retrohunt({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.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_retrohunt_client_stub.call_rpc_count + end + end + + def test_list_retrohunts + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_retrohunts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_retrohunts, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_retrohunts_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_retrohunts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_retrohunts_client_stub.call_rpc_count + end + end + + def test_get_rule_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_rule_deployment, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_rule_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_rule_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_rule_deployment({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.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_rule_deployment_client_stub.call_rpc_count + end + end + + def test_list_rule_deployments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_rule_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rule_deployments, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rule_deployments_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_rule_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_rule_deployments_client_stub.call_rpc_count + end + end + + def test_update_rule_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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. + rule_deployment = {} + update_mask = {} + + update_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_rule_deployment, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::RuleDeployment), request["rule_deployment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_rule_deployment({ rule_deployment: rule_deployment, 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 + client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, 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_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb @@ -0,0 +1,26 @@ +# 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 "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 9a99b3e769e71a53fe5a6f1f5ee3fa83ba3ad4c9 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 30 Apr 2026 17:12:45 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 16 + google-cloud-chronicle-v1/AUTHENTICATION.md | 8 +- google-cloud-chronicle-v1/README.md | 8 +- google-cloud-chronicle-v1/Rakefile | 4 +- google-cloud-chronicle-v1/gapic_metadata.json | 24 + .../lib/google/cloud/chronicle/v1.rb | 5 +- .../cloud/chronicle/v1/big_query_export_pb.rb | 0 .../chronicle/v1/big_query_export_service.rb | 0 .../v1/big_query_export_service/client.rb | 0 .../big_query_export_service/credentials.rb | 0 .../v1/big_query_export_service/paths.rb | 0 .../v1/big_query_export_service/rest.rb | 0 .../big_query_export_service/rest/client.rb | 0 .../rest/service_stub.rb | 0 .../v1/big_query_export_services_pb.rb | 0 .../lib/google/cloud/chronicle/v1/rest.rb | 3 +- .../cloud/chronicle/v1/big_query_export.rb | 0 .../get_big_query_export.rb | 0 .../provision_big_query_export.rb | 0 .../update_big_query_export.rb | 0 ...et_metadata_google.cloud.chronicle.v1.json | 120 + .../v1/big_query_export_service_paths_test.rb | 0 .../v1/big_query_export_service_rest_test.rb | 0 .../v1/big_query_export_service_test.rb | 0 .../google-cloud-chronicle-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-chronicle-v1/.rubocop.yml | 33 - .../google-cloud-chronicle-v1/.toys.rb | 28 - .../google-cloud-chronicle-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-chronicle-v1/CHANGELOG.md | 2 - .../google-cloud-chronicle-v1/Gemfile | 14 - .../google-cloud-chronicle-v1/LICENSE.md | 201 -- .../google-cloud-chronicle-v1/README.md | 154 - .../google-cloud-chronicle-v1/Rakefile | 169 - .../gapic_metadata.json | 453 --- .../google-cloud-chronicle-v1.gemspec | 28 - .../lib/google-cloud-chronicle-v1.rb | 21 - .../lib/google/cloud/chronicle/v1.rb | 55 - .../cloud/chronicle/v1/dashboard_chart_pb.rb | 83 - .../chronicle/v1/dashboard_chart_service.rb | 55 - .../v1/dashboard_chart_service/client.rb | 584 ---- .../v1/dashboard_chart_service/credentials.rb | 49 - .../v1/dashboard_chart_service/paths.rb | 73 - .../v1/dashboard_chart_service/rest.rb | 52 - .../v1/dashboard_chart_service/rest/client.rb | 527 ---- .../rest/service_stub.rb | 203 -- .../v1/dashboard_chart_services_pb.rb | 47 - .../cloud/chronicle/v1/dashboard_query_pb.rb | 58 - .../chronicle/v1/dashboard_query_service.rb | 55 - .../v1/dashboard_query_service/client.rb | 589 ---- .../v1/dashboard_query_service/credentials.rb | 49 - .../v1/dashboard_query_service/paths.rb | 94 - .../v1/dashboard_query_service/rest.rb | 52 - .../v1/dashboard_query_service/rest/client.rb | 532 ---- .../rest/service_stub.rb | 204 -- .../v1/dashboard_query_services_pb.rb | 47 - .../chronicle/v1/data_access_control_pb.rb | 44 - .../v1/data_access_control_service.rb | 56 - .../v1/data_access_control_service/client.rb | 1431 --------- .../credentials.rb | 47 - .../v1/data_access_control_service/paths.rb | 94 - .../v1/data_access_control_service/rest.rb | 53 - .../rest/client.rb | 1318 -------- .../rest/service_stub.rb | 695 ----- .../v1/data_access_control_services_pb.rb | 76 - .../cloud/chronicle/v1/data_table_pb.rb | 57 - .../cloud/chronicle/v1/data_table_service.rb | 55 - .../chronicle/v1/data_table_service/client.rb | 1915 ------------ .../v1/data_table_service/credentials.rb | 49 - .../chronicle/v1/data_table_service/paths.rb | 138 - .../chronicle/v1/data_table_service/rest.rb | 52 - .../v1/data_table_service/rest/client.rb | 1767 ----------- .../data_table_service/rest/service_stub.rb | 1004 ------ .../chronicle/v1/data_table_services_pb.rb | 73 - .../google/cloud/chronicle/v1/entity_pb.rb | 39 - .../cloud/chronicle/v1/entity_service.rb | 55 - .../chronicle/v1/entity_service/client.rb | 908 ------ .../v1/entity_service/credentials.rb | 47 - .../chronicle/v1/entity_service/paths.rb | 73 - .../cloud/chronicle/v1/entity_service/rest.rb | 52 - .../v1/entity_service/rest/client.rb | 830 ----- .../v1/entity_service/rest/service_stub.rb | 388 --- .../cloud/chronicle/v1/entity_services_pb.rb | 54 - .../v1/featured_content_metadata_pb.rb | 25 - .../featured_content_native_dashboard_pb.rb | 33 - ...atured_content_native_dashboard_service.rb | 56 - .../client.rb | 717 ----- .../credentials.rb | 49 - .../paths.rb | 136 - .../rest.rb | 53 - .../rest/client.rb | 653 ---- .../rest/service_stub.rb | 265 -- ...ed_content_native_dashboard_services_pb.rb | 50 - .../google/cloud/chronicle/v1/instance_pb.rb | 27 - .../cloud/chronicle/v1/instance_service.rb | 55 - .../chronicle/v1/instance_service/client.rb | 481 --- .../v1/instance_service/credentials.rb | 47 - .../chronicle/v1/instance_service/paths.rb | 52 - .../chronicle/v1/instance_service/rest.rb | 52 - .../v1/instance_service/rest/client.rb | 431 --- .../v1/instance_service/rest/service_stub.rb | 142 - .../chronicle/v1/instance_services_pb.rb | 45 - .../cloud/chronicle/v1/native_dashboard_pb.rb | 61 - .../chronicle/v1/native_dashboard_service.rb | 55 - .../v1/native_dashboard_service/client.rb | 1611 ---------- .../native_dashboard_service/credentials.rb | 49 - .../v1/native_dashboard_service/paths.rb | 115 - .../v1/native_dashboard_service/rest.rb | 52 - .../native_dashboard_service/rest/client.rb | 1484 --------- .../rest/service_stub.rb | 822 ----- .../v1/native_dashboard_services_pb.rb | 67 - .../cloud/chronicle/v1/reference_list_pb.rb | 38 - .../chronicle/v1/reference_list_service.rb | 55 - .../v1/reference_list_service/client.rb | 809 ----- .../v1/reference_list_service/credentials.rb | 47 - .../v1/reference_list_service/paths.rb | 73 - .../v1/reference_list_service/rest.rb | 52 - .../v1/reference_list_service/rest/client.rb | 738 ----- .../rest/service_stub.rb | 327 -- .../v1/reference_list_services_pb.rb | 51 - .../lib/google/cloud/chronicle/v1/rest.rb | 47 - .../lib/google/cloud/chronicle/v1/rule_pb.rb | 61 - .../google/cloud/chronicle/v1/rule_service.rb | 56 - .../cloud/chronicle/v1/rule_service/client.rb | 1691 ---------- .../chronicle/v1/rule_service/credentials.rb | 47 - .../chronicle/v1/rule_service/operations.rb | 841 ----- .../cloud/chronicle/v1/rule_service/paths.rb | 159 - .../cloud/chronicle/v1/rule_service/rest.rb | 53 - .../chronicle/v1/rule_service/rest/client.rb | 1564 ---------- .../v1/rule_service/rest/operations.rb | 925 ------ .../v1/rule_service/rest/service_stub.rb | 817 ----- .../cloud/chronicle/v1/rule_services_pb.rb | 70 - .../lib/google/cloud/chronicle/v1/version.rb | 28 - .../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 -- .../cloud/chronicle/v1/dashboard_chart.rb | 923 ------ .../cloud/chronicle/v1/dashboard_query.rb | 653 ---- .../cloud/chronicle/v1/data_access_control.rb | 364 --- .../google/cloud/chronicle/v1/data_table.rb | 512 --- .../google/cloud/chronicle/v1/entity.rb | 210 -- .../chronicle/v1/featured_content_metadata.rb | 82 - .../v1/featured_content_native_dashboard.rb | 141 - .../google/cloud/chronicle/v1/instance.rb | 47 - .../cloud/chronicle/v1/native_dashboard.rb | 502 --- .../cloud/chronicle/v1/reference_list.rb | 232 -- .../google/cloud/chronicle/v1/rule.rb | 701 ----- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/date.rb | 56 - .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../batch_get_dashboard_charts.rb | 47 - .../get_dashboard_chart.rb | 47 - .../execute_dashboard_query.rb | 47 - .../get_dashboard_query.rb | 47 - .../create_data_access_label.rb | 47 - .../create_data_access_scope.rb | 47 - .../delete_data_access_label.rb | 47 - .../delete_data_access_scope.rb | 47 - .../get_data_access_label.rb | 47 - .../get_data_access_scope.rb | 47 - .../list_data_access_labels.rb | 51 - .../list_data_access_scopes.rb | 51 - .../update_data_access_label.rb | 47 - .../update_data_access_scope.rb | 47 - .../bulk_create_data_table_rows.rb | 47 - .../bulk_get_data_table_rows.rb | 47 - .../bulk_replace_data_table_rows.rb | 47 - .../bulk_update_data_table_rows.rb | 47 - .../data_table_service/create_data_table.rb | 47 - .../create_data_table_row.rb | 47 - .../data_table_service/delete_data_table.rb | 47 - .../delete_data_table_row.rb | 47 - .../data_table_service/get_data_table.rb | 47 - .../get_data_table_operation_errors.rb | 47 - .../data_table_service/get_data_table_row.rb | 47 - .../list_data_table_rows.rb | 51 - .../data_table_service/list_data_tables.rb | 51 - .../data_table_service/update_data_table.rb | 47 - .../update_data_table_row.rb | 47 - .../entity_service/create_watchlist.rb | 47 - .../entity_service/delete_watchlist.rb | 47 - .../snippets/entity_service/get_watchlist.rb | 47 - .../entity_service/list_watchlists.rb | 51 - .../entity_service/update_watchlist.rb | 47 - .../get_featured_content_native_dashboard.rb | 47 - ...stall_featured_content_native_dashboard.rb | 47 - ...list_featured_content_native_dashboards.rb | 51 - .../snippets/instance_service/get_instance.rb | 47 - .../native_dashboard_service/add_chart.rb | 47 - .../create_native_dashboard.rb | 47 - .../delete_native_dashboard.rb | 47 - .../duplicate_chart.rb | 47 - .../duplicate_native_dashboard.rb | 47 - .../native_dashboard_service/edit_chart.rb | 47 - .../export_native_dashboards.rb | 47 - .../get_native_dashboard.rb | 47 - .../import_native_dashboards.rb | 47 - .../list_native_dashboards.rb | 51 - .../native_dashboard_service/remove_chart.rb | 47 - .../update_native_dashboard.rb | 47 - .../create_reference_list.rb | 47 - .../get_reference_list.rb | 47 - .../list_reference_lists.rb | 51 - .../update_reference_list.rb | 47 - .../snippets/rule_service/create_retrohunt.rb | 54 - .../snippets/rule_service/create_rule.rb | 47 - .../snippets/rule_service/delete_rule.rb | 47 - .../snippets/rule_service/get_retrohunt.rb | 47 - .../snippets/rule_service/get_rule.rb | 47 - .../rule_service/get_rule_deployment.rb | 47 - .../snippets/rule_service/list_retrohunts.rb | 51 - .../rule_service/list_rule_deployments.rb | 51 - .../rule_service/list_rule_revisions.rb | 51 - .../snippets/rule_service/list_rules.rb | 51 - .../snippets/rule_service/update_rule.rb | 47 - .../rule_service/update_rule_deployment.rb | 47 - ...et_metadata_google.cloud.chronicle.v1.json | 2775 ----------------- .../v1/dashboard_chart_service_paths_test.rb | 67 - .../v1/dashboard_chart_service_rest_test.rb | 208 -- .../v1/dashboard_chart_service_test.rb | 222 -- .../v1/dashboard_query_service_paths_test.rb | 79 - .../v1/dashboard_query_service_rest_test.rb | 211 -- .../v1/dashboard_query_service_test.rb | 228 -- .../data_access_control_service_paths_test.rb | 79 - .../data_access_control_service_rest_test.rb | 651 ---- .../v1/data_access_control_service_test.rb | 718 ----- .../v1/data_table_service_paths_test.rb | 103 - .../v1/data_table_service_rest_test.rb | 926 ------ .../chronicle/v1/data_table_service_test.rb | 1018 ------ .../chronicle/v1/entity_service_paths_test.rb | 67 - .../chronicle/v1/entity_service_rest_test.rb | 376 --- .../cloud/chronicle/v1/entity_service_test.rb | 413 --- ...ent_native_dashboard_service_paths_test.rb | 103 - ...tent_native_dashboard_service_rest_test.rb | 265 -- ...d_content_native_dashboard_service_test.rb | 291 -- .../v1/instance_service_paths_test.rb | 55 - .../v1/instance_service_rest_test.rb | 153 - .../chronicle/v1/instance_service_test.rb | 162 - .../v1/native_dashboard_service_paths_test.rb | 91 - .../v1/native_dashboard_service_rest_test.rb | 765 ----- .../v1/native_dashboard_service_test.rb | 841 ----- .../v1/reference_list_service_paths_test.rb | 67 - .../v1/reference_list_service_rest_test.rb | 322 -- .../v1/reference_list_service_test.rb | 355 --- .../v1/rule_service_operations_test.rb | 400 --- .../chronicle/v1/rule_service_paths_test.rb | 115 - .../chronicle/v1/rule_service_rest_test.rb | 766 ----- .../cloud/chronicle/v1/rule_service_test.rb | 877 ------ .../google-cloud-chronicle-v1/test/helper.rb | 26 - 259 files changed, 175 insertions(+), 55605 deletions(-) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/big_query_export_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/big_query_export_service.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/big_query_export_service/client.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/proto_docs/google/cloud/chronicle/v1/big_query_export.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/big_query_export_service/get_big_query_export.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/big_query_export_service/provision_big_query_export.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/snippets/big_query_export_service/update_big_query_export.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/big_query_export_service_paths_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/big_query_export_service_rest_test.rb (100%) rename {owl-bot-staging/google-cloud-chronicle-v1 => google-cloud-chronicle-v1}/test/google/cloud/chronicle/v1/big_query_export_service_test.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb diff --git a/google-cloud-chronicle-v1/.owlbot-manifest.json b/google-cloud-chronicle-v1/.owlbot-manifest.json index f2550fbd7730..650e97379e4e 100644 --- a/google-cloud-chronicle-v1/.owlbot-manifest.json +++ b/google-cloud-chronicle-v1/.owlbot-manifest.json @@ -15,6 +15,15 @@ "google-cloud-chronicle-v1.gemspec", "lib/google-cloud-chronicle-v1.rb", "lib/google/cloud/chronicle/v1.rb", + "lib/google/cloud/chronicle/v1/big_query_export_pb.rb", + "lib/google/cloud/chronicle/v1/big_query_export_service.rb", + "lib/google/cloud/chronicle/v1/big_query_export_service/client.rb", + "lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb", + "lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb", + "lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb", + "lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb", + "lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb", + "lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb", "lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb", "lib/google/cloud/chronicle/v1/dashboard_chart_service.rb", "lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb", @@ -115,6 +124,7 @@ "proto_docs/google/api/field_behavior.rb", "proto_docs/google/api/launch_stage.rb", "proto_docs/google/api/resource.rb", + "proto_docs/google/cloud/chronicle/v1/big_query_export.rb", "proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb", "proto_docs/google/cloud/chronicle/v1/dashboard_query.rb", "proto_docs/google/cloud/chronicle/v1/data_access_control.rb", @@ -136,6 +146,9 @@ "proto_docs/google/type/date.rb", "proto_docs/google/type/interval.rb", "snippets/Gemfile", + "snippets/big_query_export_service/get_big_query_export.rb", + "snippets/big_query_export_service/provision_big_query_export.rb", + "snippets/big_query_export_service/update_big_query_export.rb", "snippets/dashboard_chart_service/batch_get_dashboard_charts.rb", "snippets/dashboard_chart_service/get_dashboard_chart.rb", "snippets/dashboard_query_service/execute_dashboard_query.rb", @@ -203,6 +216,9 @@ "snippets/rule_service/update_rule.rb", "snippets/rule_service/update_rule_deployment.rb", "snippets/snippet_metadata_google.cloud.chronicle.v1.json", + "test/google/cloud/chronicle/v1/big_query_export_service_paths_test.rb", + "test/google/cloud/chronicle/v1/big_query_export_service_rest_test.rb", + "test/google/cloud/chronicle/v1/big_query_export_service_test.rb", "test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb", "test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb", "test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb", diff --git a/google-cloud-chronicle-v1/AUTHENTICATION.md b/google-cloud-chronicle-v1/AUTHENTICATION.md index 1b97f84a9c98..1cb69c3578b1 100644 --- a/google-cloud-chronicle-v1/AUTHENTICATION.md +++ b/google-cloud-chronicle-v1/AUTHENTICATION.md @@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization: ```ruby require "google/cloud/chronicle/v1" -client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| +client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new do |config| config.credentials = "path/to/credentialfile.json" end ``` @@ -66,11 +66,11 @@ To configure a credentials file globally for all clients: ```ruby require "google/cloud/chronicle/v1" -::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.configure do |config| +::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.configure do |config| config.credentials = "path/to/credentialfile.json" end -client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new +client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new ``` ### Environment Variables @@ -100,7 +100,7 @@ require "google/cloud/chronicle/v1" ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" -client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new +client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new ``` ### Local ADC file diff --git a/google-cloud-chronicle-v1/README.md b/google-cloud-chronicle-v1/README.md index d541636e6e52..d569847e64fe 100644 --- a/google-cloud-chronicle-v1/README.md +++ b/google-cloud-chronicle-v1/README.md @@ -32,9 +32,9 @@ In order to use this library, you first need to go through the following steps: ```ruby require "google/cloud/chronicle/v1" -client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new -request = ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new # (request fields as keyword arguments...) -response = client.get_dashboard_query request +client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new +request = ::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest.new # (request fields as keyword arguments...) +response = client.get_big_query_export request ``` View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest) @@ -75,7 +75,7 @@ constructing a client object. For example: require "google/cloud/chronicle/v1" require "logger" -client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| +client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new do |config| config.logger = Logger.new "my-app.log" end ``` diff --git a/google-cloud-chronicle-v1/Rakefile b/google-cloud-chronicle-v1/Rakefile index e127630c24bc..9c3ed806ebfb 100644 --- a/google-cloud-chronicle-v1/Rakefile +++ b/google-cloud-chronicle-v1/Rakefile @@ -57,8 +57,8 @@ task :acceptance, :project, :keyfile do |t, args| if project.nil? || keyfile.nil? fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" end - require "google/cloud/chronicle/v1/dashboard_query_service/credentials" - ::Google::Cloud::Chronicle::V1::DashboardQueryService::Credentials.env_vars.each do |path| + require "google/cloud/chronicle/v1/big_query_export_service/credentials" + ::Google::Cloud::Chronicle::V1::BigQueryExportService::Credentials.env_vars.each do |path| ENV[path] = nil end ENV["GOOGLE_CLOUD_PROJECT"] = project diff --git a/google-cloud-chronicle-v1/gapic_metadata.json b/google-cloud-chronicle-v1/gapic_metadata.json index 16360a702a6d..a97437d01ef0 100644 --- a/google-cloud-chronicle-v1/gapic_metadata.json +++ b/google-cloud-chronicle-v1/gapic_metadata.json @@ -5,6 +5,30 @@ "protoPackage": "google.cloud.chronicle.v1", "libraryPackage": "::Google::Cloud::Chronicle::V1", "services": { + "BigQueryExportService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client", + "rpcs": { + "GetBigQueryExport": { + "methods": [ + "get_big_query_export" + ] + }, + "UpdateBigQueryExport": { + "methods": [ + "update_big_query_export" + ] + }, + "ProvisionBigQueryExport": { + "methods": [ + "provision_big_query_export" + ] + } + } + } + } + }, "DashboardQueryService": { "clients": { "grpc": { diff --git a/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb index ab6f5e2142f9..bf04e41d2967 100644 --- a/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb +++ b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb @@ -16,6 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/cloud/chronicle/v1/big_query_export_service" require "google/cloud/chronicle/v1/dashboard_query_service" require "google/cloud/chronicle/v1/dashboard_chart_service" require "google/cloud/chronicle/v1/data_access_control_service" @@ -37,12 +38,12 @@ module Chronicle # @example Load this package, including all its services, and instantiate a gRPC client # # require "google/cloud/chronicle/v1" - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new # # @example Load this package, including all its services, and instantiate a REST client # # require "google/cloud/chronicle/v1" - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new # module V1 end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_pb.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/client.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/client.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/client.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/credentials.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/paths.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/client.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_service/rest/service_stub.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb rename to google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/big_query_export_services_pb.rb diff --git a/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb index d518fb21cc9f..dabfca52785d 100644 --- a/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb +++ b/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb @@ -16,6 +16,7 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! +require "google/cloud/chronicle/v1/big_query_export_service/rest" require "google/cloud/chronicle/v1/dashboard_query_service/rest" require "google/cloud/chronicle/v1/dashboard_chart_service/rest" require "google/cloud/chronicle/v1/data_access_control_service/rest" @@ -37,7 +38,7 @@ module Chronicle # @example # # require "google/cloud/chronicle/v1/rest" - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new + # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new # module V1 end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/big_query_export.rb b/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/big_query_export.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/big_query_export.rb rename to google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/big_query_export.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/get_big_query_export.rb b/google-cloud-chronicle-v1/snippets/big_query_export_service/get_big_query_export.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/get_big_query_export.rb rename to google-cloud-chronicle-v1/snippets/big_query_export_service/get_big_query_export.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/provision_big_query_export.rb b/google-cloud-chronicle-v1/snippets/big_query_export_service/provision_big_query_export.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/provision_big_query_export.rb rename to google-cloud-chronicle-v1/snippets/big_query_export_service/provision_big_query_export.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/update_big_query_export.rb b/google-cloud-chronicle-v1/snippets/big_query_export_service/update_big_query_export.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/snippets/big_query_export_service/update_big_query_export.rb rename to google-cloud-chronicle-v1/snippets/big_query_export_service/update_big_query_export.rb diff --git a/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json b/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json index a26d9c073088..343b766d38d1 100644 --- a/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json +++ b/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json @@ -11,6 +11,126 @@ ] }, "snippets": [ + { + "region_tag": "chronicle_v1_generated_BigQueryExportService_GetBigQueryExport_sync", + "title": "Snippet for the get_big_query_export call in the BigQueryExportService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::BigQueryExportService::Client#get_big_query_export.", + "file": "big_query_export_service/get_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_big_query_export", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client#get_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BigQueryExport", + "client": { + "short_name": "BigQueryExportService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client" + }, + "method": { + "short_name": "GetBigQueryExport", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService.GetBigQueryExport", + "service": { + "short_name": "BigQueryExportService", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_BigQueryExportService_UpdateBigQueryExport_sync", + "title": "Snippet for the update_big_query_export call in the BigQueryExportService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::BigQueryExportService::Client#update_big_query_export.", + "file": "big_query_export_service/update_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_big_query_export", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client#update_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BigQueryExport", + "client": { + "short_name": "BigQueryExportService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client" + }, + "method": { + "short_name": "UpdateBigQueryExport", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService.UpdateBigQueryExport", + "service": { + "short_name": "BigQueryExportService", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_BigQueryExportService_ProvisionBigQueryExport_sync", + "title": "Snippet for the provision_big_query_export call in the BigQueryExportService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::BigQueryExportService::Client#provision_big_query_export.", + "file": "big_query_export_service/provision_big_query_export.rb", + "language": "RUBY", + "client_method": { + "short_name": "provision_big_query_export", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client#provision_big_query_export", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::BigQueryExport", + "client": { + "short_name": "BigQueryExportService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client" + }, + "method": { + "short_name": "ProvisionBigQueryExport", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService.ProvisionBigQueryExport", + "service": { + "short_name": "BigQueryExportService", + "full_name": "google.cloud.chronicle.v1.BigQueryExportService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, { "region_tag": "chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync", "title": "Snippet for the get_dashboard_query call in the DashboardQueryService service", diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_paths_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_paths_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_paths_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_paths_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_rest_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_rest_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_rest_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_rest_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_test.rb b/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_test.rb similarity index 100% rename from owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_test.rb rename to google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/big_query_export_service_test.rb diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.gitignore b/owl-bot-staging/google-cloud-chronicle-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -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/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json deleted file mode 100644 index b353dde6b42b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "chronicle.googleapis.com", - "api_shortname": "chronicle", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest", - "distribution_name": "google-cloud-chronicle-v1", - "is_cloud": true, - "language": "ruby", - "name": "chronicle", - "name_pretty": "Chronicle V1 API", - "product_documentation": "https://cloud.google.com/chronicle/docs/secops/secops-overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/chronicle/docs/secops/secops-overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml b/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml deleted file mode 100644 index 247c818fc834..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-chronicle-v1.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-chronicle-v1.rb" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb b/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.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/owl-bot-staging/google-cloud-chronicle-v1/.yardopts b/owl-bot-staging/google-cloud-chronicle-v1/.yardopts deleted file mode 100644 index 279160678357..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Chronicle V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md deleted file mode 100644 index 1cb69c3578b1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-chronicle-v1 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-chronicle-v1 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/chronicle/v1" - -client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/chronicle/v1" - -::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::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-chronicle-v1 -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/chronicle/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::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/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-chronicle-v1/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/Gemfile +++ /dev/null @@ -1,14 +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-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md b/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. diff --git a/owl-bot-staging/google-cloud-chronicle-v1/README.md b/owl-bot-staging/google-cloud-chronicle-v1/README.md deleted file mode 100644 index d569847e64fe..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Chronicle V1 API - -The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. - -The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Chronicle V1 API. Most users should consider using -the main client gem, -[google-cloud-chronicle](https://rubygems.org/gems/google-cloud-chronicle). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-chronicle-v1 -``` - -## 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/chronicle.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/chronicle/v1" - -client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new -request = ::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest.new # (request fields as keyword arguments...) -response = client.get_big_query_export request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/chronicle/docs/secops/secops-overview) -for general usage information. - -## 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/chronicle/v1" -require "logger" - -client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::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.0+. - -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-chronicle`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-chronicle-v1`. -_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-chronicle`. -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-chronicle-v1`. - -### 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. diff --git a/owl-bot-staging/google-cloud-chronicle-v1/Rakefile b/owl-bot-staging/google-cloud-chronicle-v1/Rakefile deleted file mode 100644 index 63fc23f2db54..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/Rakefile +++ /dev/null @@ -1,169 +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 "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-chronicle-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_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 GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/chronicle/v1/big_query_export_service/credentials" - ::Google::Cloud::Chronicle::V1::BigQueryExportService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_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-chronicle-v1 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-chronicle-v1 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-chronicle-v1 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-chronicle-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-chronicle-v1" - header "google-cloud-chronicle-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-chronicle-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-chronicle-v1 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-chronicle-v1 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-chronicle-v1 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/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json deleted file mode 100644 index a97437d01ef0..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json +++ /dev/null @@ -1,453 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.chronicle.v1", - "libraryPackage": "::Google::Cloud::Chronicle::V1", - "services": { - "BigQueryExportService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client", - "rpcs": { - "GetBigQueryExport": { - "methods": [ - "get_big_query_export" - ] - }, - "UpdateBigQueryExport": { - "methods": [ - "update_big_query_export" - ] - }, - "ProvisionBigQueryExport": { - "methods": [ - "provision_big_query_export" - ] - } - } - } - } - }, - "DashboardQueryService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client", - "rpcs": { - "GetDashboardQuery": { - "methods": [ - "get_dashboard_query" - ] - }, - "ExecuteDashboardQuery": { - "methods": [ - "execute_dashboard_query" - ] - } - } - } - } - }, - "DashboardChartService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client", - "rpcs": { - "GetDashboardChart": { - "methods": [ - "get_dashboard_chart" - ] - }, - "BatchGetDashboardCharts": { - "methods": [ - "batch_get_dashboard_charts" - ] - } - } - } - } - }, - "DataAccessControlService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client", - "rpcs": { - "CreateDataAccessLabel": { - "methods": [ - "create_data_access_label" - ] - }, - "GetDataAccessLabel": { - "methods": [ - "get_data_access_label" - ] - }, - "ListDataAccessLabels": { - "methods": [ - "list_data_access_labels" - ] - }, - "UpdateDataAccessLabel": { - "methods": [ - "update_data_access_label" - ] - }, - "DeleteDataAccessLabel": { - "methods": [ - "delete_data_access_label" - ] - }, - "CreateDataAccessScope": { - "methods": [ - "create_data_access_scope" - ] - }, - "GetDataAccessScope": { - "methods": [ - "get_data_access_scope" - ] - }, - "ListDataAccessScopes": { - "methods": [ - "list_data_access_scopes" - ] - }, - "UpdateDataAccessScope": { - "methods": [ - "update_data_access_scope" - ] - }, - "DeleteDataAccessScope": { - "methods": [ - "delete_data_access_scope" - ] - } - } - } - } - }, - "DataTableService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::DataTableService::Client", - "rpcs": { - "CreateDataTable": { - "methods": [ - "create_data_table" - ] - }, - "ListDataTables": { - "methods": [ - "list_data_tables" - ] - }, - "GetDataTable": { - "methods": [ - "get_data_table" - ] - }, - "UpdateDataTable": { - "methods": [ - "update_data_table" - ] - }, - "DeleteDataTable": { - "methods": [ - "delete_data_table" - ] - }, - "CreateDataTableRow": { - "methods": [ - "create_data_table_row" - ] - }, - "UpdateDataTableRow": { - "methods": [ - "update_data_table_row" - ] - }, - "ListDataTableRows": { - "methods": [ - "list_data_table_rows" - ] - }, - "GetDataTableRow": { - "methods": [ - "get_data_table_row" - ] - }, - "DeleteDataTableRow": { - "methods": [ - "delete_data_table_row" - ] - }, - "BulkCreateDataTableRows": { - "methods": [ - "bulk_create_data_table_rows" - ] - }, - "BulkGetDataTableRows": { - "methods": [ - "bulk_get_data_table_rows" - ] - }, - "BulkReplaceDataTableRows": { - "methods": [ - "bulk_replace_data_table_rows" - ] - }, - "BulkUpdateDataTableRows": { - "methods": [ - "bulk_update_data_table_rows" - ] - }, - "GetDataTableOperationErrors": { - "methods": [ - "get_data_table_operation_errors" - ] - } - } - } - } - }, - "EntityService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::EntityService::Client", - "rpcs": { - "GetWatchlist": { - "methods": [ - "get_watchlist" - ] - }, - "ListWatchlists": { - "methods": [ - "list_watchlists" - ] - }, - "CreateWatchlist": { - "methods": [ - "create_watchlist" - ] - }, - "UpdateWatchlist": { - "methods": [ - "update_watchlist" - ] - }, - "DeleteWatchlist": { - "methods": [ - "delete_watchlist" - ] - } - } - } - } - }, - "NativeDashboardService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client", - "rpcs": { - "CreateNativeDashboard": { - "methods": [ - "create_native_dashboard" - ] - }, - "GetNativeDashboard": { - "methods": [ - "get_native_dashboard" - ] - }, - "ListNativeDashboards": { - "methods": [ - "list_native_dashboards" - ] - }, - "UpdateNativeDashboard": { - "methods": [ - "update_native_dashboard" - ] - }, - "DuplicateNativeDashboard": { - "methods": [ - "duplicate_native_dashboard" - ] - }, - "DeleteNativeDashboard": { - "methods": [ - "delete_native_dashboard" - ] - }, - "AddChart": { - "methods": [ - "add_chart" - ] - }, - "RemoveChart": { - "methods": [ - "remove_chart" - ] - }, - "EditChart": { - "methods": [ - "edit_chart" - ] - }, - "DuplicateChart": { - "methods": [ - "duplicate_chart" - ] - }, - "ExportNativeDashboards": { - "methods": [ - "export_native_dashboards" - ] - }, - "ImportNativeDashboards": { - "methods": [ - "import_native_dashboards" - ] - } - } - } - } - }, - "FeaturedContentNativeDashboardService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client", - "rpcs": { - "GetFeaturedContentNativeDashboard": { - "methods": [ - "get_featured_content_native_dashboard" - ] - }, - "ListFeaturedContentNativeDashboards": { - "methods": [ - "list_featured_content_native_dashboards" - ] - }, - "InstallFeaturedContentNativeDashboard": { - "methods": [ - "install_featured_content_native_dashboard" - ] - } - } - } - } - }, - "InstanceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::InstanceService::Client", - "rpcs": { - "GetInstance": { - "methods": [ - "get_instance" - ] - } - } - } - } - }, - "ReferenceListService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client", - "rpcs": { - "GetReferenceList": { - "methods": [ - "get_reference_list" - ] - }, - "ListReferenceLists": { - "methods": [ - "list_reference_lists" - ] - }, - "CreateReferenceList": { - "methods": [ - "create_reference_list" - ] - }, - "UpdateReferenceList": { - "methods": [ - "update_reference_list" - ] - } - } - } - } - }, - "RuleService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::RuleService::Client", - "rpcs": { - "CreateRule": { - "methods": [ - "create_rule" - ] - }, - "GetRule": { - "methods": [ - "get_rule" - ] - }, - "ListRules": { - "methods": [ - "list_rules" - ] - }, - "UpdateRule": { - "methods": [ - "update_rule" - ] - }, - "DeleteRule": { - "methods": [ - "delete_rule" - ] - }, - "ListRuleRevisions": { - "methods": [ - "list_rule_revisions" - ] - }, - "CreateRetrohunt": { - "methods": [ - "create_retrohunt" - ] - }, - "GetRetrohunt": { - "methods": [ - "get_retrohunt" - ] - }, - "ListRetrohunts": { - "methods": [ - "list_retrohunts" - ] - }, - "GetRuleDeployment": { - "methods": [ - "get_rule_deployment" - ] - }, - "ListRuleDeployments": { - "methods": [ - "list_rule_deployments" - ] - }, - "UpdateRuleDeployment": { - "methods": [ - "update_rule_deployment" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec b/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec deleted file mode 100644 index 0cf9044d81bc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/chronicle/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-chronicle-v1" - gem.version = Google::Cloud::Chronicle::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details." - gem.summary = "The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb deleted file mode 100644 index 8d5cd2a8ddb3..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.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/chronicle/v1" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb deleted file mode 100644 index a069a33dfd28..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.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 "google/cloud/chronicle/v1/big_query_export_service" -require "google/cloud/chronicle/v1/dashboard_query_service" -require "google/cloud/chronicle/v1/dashboard_chart_service" -require "google/cloud/chronicle/v1/data_access_control_service" -require "google/cloud/chronicle/v1/data_table_service" -require "google/cloud/chronicle/v1/entity_service" -require "google/cloud/chronicle/v1/native_dashboard_service" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" -require "google/cloud/chronicle/v1/instance_service" -require "google/cloud/chronicle/v1/reference_list_service" -require "google/cloud/chronicle/v1/rule_service" -require "google/cloud/chronicle/v1/version" - -module Google - module Cloud - module Chronicle - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1" - # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/chronicle/v1" - # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/chronicle/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb deleted file mode 100644 index 8ac2f8e6e1cb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_pb.rb +++ /dev/null @@ -1,83 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/dashboard_chart.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/chronicle/v1/dashboard_query_pb' - - -descriptor_data = "\n/google/cloud/chronicle/v1/dashboard_chart.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/chronicle/v1/dashboard_query.proto\"\xfd=\n\x0e\x44\x61shboardChart\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12J\n\x10native_dashboard\x18\x04 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12;\n\ttile_type\x18\x07 \x01(\x0e\x32#.google.cloud.chronicle.v1.TileTypeB\x03\xe0\x41\x01\x12X\n\x10\x63hart_datasource\x18\x05 \x01(\x0b\x32\x39.google.cloud.chronicle.v1.DashboardChart.ChartDatasourceB\x03\xe0\x41\x01\x12S\n\rvisualization\x18\x06 \x01(\x0b\x32\x37.google.cloud.chronicle.v1.DashboardChart.VisualizationB\x03\xe0\x41\x02\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12Y\n\x11\x64rill_down_config\x18\t \x01(\x0b\x32\x39.google.cloud.chronicle.v1.DashboardChart.DrillDownConfigB\x03\xe0\x41\x01\x12\x13\n\x06tokens\x18\n \x03(\tB\x03\xe0\x41\x01\x1a\x95\x01\n\x0f\x43hartDatasource\x12\x45\n\x0f\x64\x61shboard_query\x18\x01 \x01(\tB,\xfa\x41)\n\'chronicle.googleapis.com/DashboardQuery\x12;\n\x0c\x64\x61ta_sources\x18\x03 \x03(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x1a\x8c+\n\rVisualization\x12L\n\x06x_axes\x18\x07 \x03(\x0b\x32<.google.cloud.chronicle.v1.DashboardChart.Visualization.Axis\x12L\n\x06y_axes\x18\x08 \x03(\x0b\x32<.google.cloud.chronicle.v1.DashboardChart.Visualization.Axis\x12N\n\x06series\x18\x03 \x03(\x0b\x32>.google.cloud.chronicle.v1.DashboardChart.Visualization.Series\x12P\n\x07tooltip\x18\x04 \x01(\x0b\x32?.google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip\x12O\n\x07legends\x18\t \x03(\x0b\x32>.google.cloud.chronicle.v1.DashboardChart.Visualization.Legend\x12V\n\x0b\x63olumn_defs\x18\n \x03(\x0b\x32\x41.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef\x12^\n\x0ctable_config\x18\x12 \x01(\x0b\x32\x43.google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfigB\x03\xe0\x41\x01\x12\x31\n\x06\x62utton\x18\x0b \x01(\x0b\x32!.google.cloud.chronicle.v1.Button\x12:\n\x08markdown\x18\x11 \x01(\x0b\x32#.google.cloud.chronicle.v1.MarkdownB\x03\xe0\x41\x01\x12\x1a\n\rseries_column\x18\x0c \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rgrouping_type\x18\r \x01(\tB\x03\xe0\x41\x01\x12i\n\x12google_maps_config\x18\x0e \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfigB\x03\xe0\x41\x01\x12\'\n\x1athreshold_coloring_enabled\x18\x0f \x01(\x08\x42\x03\xe0\x41\x01\x12[\n\x0bvisual_maps\x18\x10 \x03(\x0b\x32\x41.google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMapB\x03\xe0\x41\x01\x1a\x88\x01\n\x04\x41xis\x12\x36\n\taxis_type\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.AxisType\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x10\n\x03min\x18\x06 \x01(\x05H\x00\x88\x01\x01\x12\x10\n\x03max\x18\x07 \x01(\x05H\x01\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_max\x1a\xc1\x12\n\x06Series\x12:\n\x0bseries_type\x18\x08 \x01(\x0e\x32%.google.cloud.chronicle.v1.SeriesType\x12\x13\n\x0bseries_name\x18\x02 \x01(\t\x12\x13\n\x0bshow_symbol\x18\x04 \x01(\x08\x12\x17\n\x0fshow_background\x18\x05 \x01(\x08\x12\r\n\x05stack\x18\x06 \x01(\t\x12M\n\x15series_stack_strategy\x18\t \x01(\x0e\x32..google.cloud.chronicle.v1.SeriesStackStrategy\x12U\n\x06\x65ncode\x18\n \x01(\x0b\x32\x45.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode\x12\r\n\x05label\x18\x0b \x01(\t\x12\r\n\x05\x66ield\x18\x0c \x01(\t\x12\x61\n\ndata_label\x18\r \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabelB\x03\xe0\x41\x01\x12\x13\n\x06radius\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12\x61\n\nitem_style\x18\x0f \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyleB\x03\xe0\x41\x01\x12 \n\x13series_unique_value\x18\x10 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\narea_style\x18\x11 \x01(\x0b\x32H.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyleB\x03\xe0\x41\x01\x12\x63\n\x0bitem_colors\x18\x12 \x01(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColorsB\x03\xe0\x41\x01\x12\x65\n\x0cgauge_config\x18\x13 \x01(\x0b\x32J.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfigB\x03\xe0\x41\x01\x12r\n\x13metric_trend_config\x18\x14 \x01(\x0b\x32P.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfigB\x03\xe0\x41\x01\x1a@\n\x06\x45ncode\x12\t\n\x01x\x18\x01 \x01(\t\x12\t\n\x01y\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\x12\x11\n\titem_name\x18\x04 \x01(\t\x1a\x1e\n\tDataLabel\x12\x11\n\x04show\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1aU\n\tItemStyle\x12\x19\n\x0c\x62order_width\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x19\n\x0c\x62order_color\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x63olor\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xbb\x01\n\tAreaStyle\x12\x12\n\x05\x63olor\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06origin\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bshadow_blur\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x19\n\x0cshadow_color\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fshadow_offset_x\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1c\n\x0fshadow_offset_y\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07opacity\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x1a<\n\x12UserSelectedValues\x12\x12\n\x05\x63olor\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05label\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x8a\x01\n\x0f\x43hartSliceColor\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x65\n\x05value\x18\x02 \x01(\x0b\x32Q.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValuesB\x03\xe0\x41\x01\x1aq\n\nItemColors\x12\x63\n\x06\x63olors\x18\x01 \x03(\x0b\x32N.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColorB\x03\xe0\x41\x01\x1a\x34\n\nGaugeValue\x12\x12\n\x05value\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\xc0\x02\n\x0bGaugeConfig\x12\x62\n\nbase_value\x18\x01 \x01(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xe0\x41\x01\x12\x63\n\x0blimit_value\x18\x02 \x01(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xe0\x41\x01\x12h\n\x10threshold_values\x18\x03 \x03(\x0b\x32I.google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValueB\x03\xe0\x41\x01\x1a\x96\x02\n\x11MetricTrendConfig\x12\x43\n\rmetric_format\x18\x01 \x01(\x0e\x32\'.google.cloud.chronicle.v1.MetricFormatB\x03\xe0\x41\x01\x12\x1e\n\x11show_metric_trend\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12P\n\x14metric_display_trend\x18\x03 \x01(\x0e\x32-.google.cloud.chronicle.v1.MetricDisplayTrendB\x03\xe0\x41\x01\x12J\n\x11metric_trend_type\x18\x04 \x01(\x0e\x32*.google.cloud.chronicle.v1.MetricTrendTypeB\x03\xe0\x41\x01\x1a[\n\x07Tooltip\x12\x0c\n\x04show\x18\x01 \x01(\x08\x12\x42\n\x0ftooltip_trigger\x18\x03 \x01(\x0e\x32).google.cloud.chronicle.v1.ToolTipTrigger\x1a\x87\x02\n\x06Legend\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04show\x18\x02 \x01(\x08\x12\x0f\n\x07z_level\x18\x03 \x01(\x05\x12\t\n\x01z\x18\x04 \x01(\x05\x12\x0c\n\x04left\x18\x05 \x01(\x05\x12\x0b\n\x03top\x18\x06 \x01(\x05\x12\r\n\x05right\x18\x07 \x01(\x05\x12\x0e\n\x06\x62ottom\x18\x08 \x01(\x05\x12>\n\rlegend_orient\x18\x0c \x01(\x0e\x32\'.google.cloud.chronicle.v1.LegendOrient\x12<\n\x0clegend_align\x18\r \x01(\x0e\x32&.google.cloud.chronicle.v1.LegendAlign\x12\x0f\n\x07padding\x18\x0b \x03(\x05\x1a*\n\tColumnDef\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\x0e\n\x06header\x18\x02 \x01(\t\x1av\n\x18\x43olumnRenderTypeSettings\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x46\n\x12\x63olumn_render_type\x18\x02 \x01(\x0e\x32%.google.cloud.chronicle.v1.RenderTypeB\x03\xe0\x41\x01\x1am\n\x15\x43olumnTooltipSettings\x12\x12\n\x05\x66ield\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12 \n\x13header_tooltip_text\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1e\n\x11\x63\x65ll_tooltip_text\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\x9d\x02\n\x0bTableConfig\x12\x1d\n\x10\x65nable_text_wrap\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12z\n\x1b\x63olumn_render_type_settings\x18\x02 \x03(\x0b\x32P.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettingsB\x03\xe0\x41\x01\x12s\n\x17\x63olumn_tooltip_settings\x18\x03 \x03(\x0b\x32M.google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettingsB\x03\xe0\x41\x01\x1a\xfd\x05\n\x10GoogleMapsConfig\x12q\n\rdata_settings\x18\x01 \x01(\x0b\x32U.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettingsB\x03\xe0\x41\x01\x12;\n\tplot_mode\x18\x02 \x01(\x0e\x32#.google.cloud.chronicle.v1.PlotModeB\x03\xe0\x41\x01\x12o\n\x0cmap_position\x18\x03 \x01(\x0b\x32T.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPositionB\x03\xe0\x41\x01\x12s\n\x0epoint_settings\x18\x04 \x01(\x0b\x32V.google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettingsB\x03\xe0\x41\x01\x1a\x66\n\x0c\x44\x61taSettings\x12\x1c\n\x0flatitude_column\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10longitude_column\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x63ount_column\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a~\n\x0bMapPosition\x12\x15\n\x08\x66it_data\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0elatitude_value\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01\x12\x1c\n\x0flongitude_value\x18\x06 \x01(\x01\x42\x03\xe0\x41\x01\x12\x1d\n\x10zoom_scale_value\x18\x07 \x01(\x01\x42\x03\xe0\x41\x01\x1ak\n\rPointSettings\x12\x46\n\x0fpoint_size_type\x18\x01 \x01(\x0e\x32(.google.cloud.chronicle.v1.PointSizeTypeB\x03\xe0\x41\x01\x12\x12\n\x05\x63olor\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\xb2\x02\n\tVisualMap\x12\x46\n\x0fvisual_map_type\x18\x01 \x01(\x0e\x32(.google.cloud.chronicle.v1.VisualMapTypeB\x03\xe0\x41\x01\x12\x65\n\x06pieces\x18\x02 \x03(\x0b\x32P.google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPieceB\x03\xe0\x41\x01\x1av\n\x0eVisualMapPiece\x12\x15\n\x03min\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x15\n\x03max\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x12\n\x05\x63olor\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05label\x18\x04 \x01(\tB\x03\xe0\x41\x01\x42\x06\n\x04_minB\x06\n\x04_max\x1a\xed\x0b\n\x0f\x44rillDownConfig\x12\x62\n\x10left_drill_downs\x18\x01 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDownB\x03\xe0\x41\x02\x12\x63\n\x11right_drill_downs\x18\x02 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDownB\x03\xe0\x41\x02\x1a\x90\n\n\tDrillDown\x12x\n\x10\x64\x65\x66\x61ult_settings\x18\x03 \x01(\x0b\x32\\.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettingsH\x00\x12v\n\x0f\x63ustom_settings\x18\x04 \x01(\x0b\x32[.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettingsH\x00\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x1a\x30\n\x18\x44\x65\x66\x61ultDrillDownSettings\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x1a\xa6\x07\n\x17\x43ustomDrillDownSettings\x12{\n\x05query\x18\x03 \x01(\x0b\x32j.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQueryH\x00\x12}\n\x06\x66ilter\x18\x04 \x01(\x0b\x32k.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilterH\x00\x12\x8a\x01\n\rexternal_link\x18\x05 \x01(\x0b\x32q.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLinkH\x00\x12\x14\n\x07new_tab\x18\x01 \x01(\x08\x42\x03\xe0\x41\x02\x12\x1e\n\x11left_click_column\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a$\n\x0e\x44rillDownQuery\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a\xd5\x02\n\x0f\x44rillDownFilter\x12\xa5\x01\n\x11\x64\x61shboard_filters\x18\x01 \x03(\x0b\x32\x84\x01.google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilterB\x03\xe0\x41\x02\x1a\x99\x01\n\x18\x44rillDownDashboardFilter\x12 \n\x13\x64\x61shboard_filter_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12[\n\x1a\x66ilter_operator_and_values\x18\x02 \x03(\x0b\x32\x32.google.cloud.chronicle.v1.FilterOperatorAndValuesB\x03\xe0\x41\x02\x1a\x44\n\x15\x44rillDownExternalLink\x12\x11\n\x04link\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06\x61\x63tionB\n\n\x08settings:\xa4\x01\xea\x41\xa0\x01\n\'chronicle.googleapis.com/DashboardChart\x12Tprojects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}*\x0f\x64\x61shboardCharts2\x0e\x64\x61shboardChart\"\x90\x02\n\x06\x42utton\x12\x12\n\x05label\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\thyperlink\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07new_tab\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x45\n\nproperties\x18\x05 \x01(\x0b\x32,.google.cloud.chronicle.v1.Button.PropertiesB\x03\xe0\x41\x01\x1a\x63\n\nProperties\x12\x12\n\x05\x63olor\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x0c\x62utton_style\x18\x02 \x01(\x0e\x32&.google.cloud.chronicle.v1.ButtonStyleB\x03\xe0\x41\x01\"\xa6\x01\n\x08Markdown\x12\x14\n\x07\x63ontent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\nproperties\x18\x02 \x01(\x0b\x32\x36.google.cloud.chronicle.v1.Markdown.MarkdownPropertiesB\x03\xe0\x41\x01\x1a\x33\n\x12MarkdownProperties\x12\x1d\n\x10\x62\x61\x63kground_color\x18\x03 \x01(\tB\x03\xe0\x41\x01\"Y\n\x18GetDashboardChartRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"\xa1\x01\n\x1e\x42\x61tchGetDashboardChartsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/DashboardChart\x12>\n\x05names\x18\x02 \x03(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"f\n\x1f\x42\x61tchGetDashboardChartsResponse\x12\x43\n\x10\x64\x61shboard_charts\x18\x01 \x03(\x0b\x32).google.cloud.chronicle.v1.DashboardChart*p\n\x08TileType\x12\x19\n\x15TILE_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17TILE_TYPE_VISUALIZATION\x10\x01\x12\x14\n\x10TILE_TYPE_BUTTON\x10\x02\x12\x16\n\x12TILE_TYPE_MARKDOWN\x10\x03*t\n\nRenderType\x12\x1b\n\x17RENDER_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10RENDER_TYPE_TEXT\x10\x01\x12\x14\n\x10RENDER_TYPE_ICON\x10\x02\x12\x1d\n\x19RENDER_TYPE_ICON_AND_TEXT\x10\x03*Q\n\x08\x41xisType\x12\x19\n\x15\x41XIS_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05VALUE\x10\x01\x12\x0c\n\x08\x43\x41TEGORY\x10\x02\x12\x08\n\x04TIME\x10\x03\x12\x07\n\x03LOG\x10\x04*t\n\nSeriesType\x12\x1b\n\x17SERIES_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04LINE\x10\x01\x12\x07\n\x03\x42\x41R\x10\x02\x12\x07\n\x03PIE\x10\x03\x12\x08\n\x04TEXT\x10\x04\x12\x07\n\x03MAP\x10\x05\x12\t\n\x05GAUGE\x10\x06\x12\x0f\n\x0bSCATTERPLOT\x10\x07*o\n\x13SeriesStackStrategy\x12%\n!SERIES_STACK_STRATEGY_UNSPECIFIED\x10\x00\x12\x0c\n\x08SAMESIGN\x10\x01\x12\x07\n\x03\x41LL\x10\x02\x12\x0c\n\x08POSITIVE\x10\x03\x12\x0c\n\x08NEGATIVE\x10\x04*\x7f\n\x0eToolTipTrigger\x12\x1f\n\x1bTOOLTIP_TRIGGER_UNSPECIFIED\x10\x00\x12\x18\n\x14TOOLTIP_TRIGGER_NONE\x10\x01\x12\x18\n\x14TOOLTIP_TRIGGER_ITEM\x10\x02\x12\x18\n\x14TOOLTIP_TRIGGER_AXIS\x10\x03*K\n\x0cLegendOrient\x12\x1d\n\x19LEGEND_ORIENT_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERTICAL\x10\x01\x12\x0e\n\nHORIZONTAL\x10\x02*J\n\x0bLegendAlign\x12\x1c\n\x18LEGEND_ALIGN_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x08\n\x04LEFT\x10\x02\x12\t\n\x05RIGHT\x10\x03*}\n\x0b\x42uttonStyle\x12\x1c\n\x18\x42UTTON_STYLE_UNSPECIFIED\x10\x00\x12\x17\n\x13\x42UTTON_STYLE_FILLED\x10\x01\x12\x19\n\x15\x42UTTON_STYLE_OUTLINED\x10\x02\x12\x1c\n\x18\x42UTTON_STYLE_TRANSPARENT\x10\x03*f\n\x08PlotMode\x12\x19\n\x15PLOT_MODE_UNSPECIFIED\x10\x00\x12\x14\n\x10PLOT_MODE_POINTS\x10\x01\x12\x15\n\x11PLOT_MODE_HEATMAP\x10\x02\x12\x12\n\x0ePLOT_MODE_BOTH\x10\x03*u\n\rPointSizeType\x12\x1f\n\x1bPOINT_SIZE_TYPE_UNSPECIFIED\x10\x00\x12\x19\n\x15POINT_SIZE_TYPE_FIXED\x10\x01\x12(\n$POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE\x10\x02*e\n\x0cMetricFormat\x12\x1d\n\x19METRIC_FORMAT_UNSPECIFIED\x10\x00\x12\x18\n\x14METRIC_FORMAT_NUMBER\x10\x01\x12\x1c\n\x18METRIC_FORMAT_PLAIN_TEXT\x10\x02*\xc0\x01\n\x12MetricDisplayTrend\x12$\n METRIC_DISPLAY_TREND_UNSPECIFIED\x10\x00\x12\'\n#METRIC_DISPLAY_TREND_ABSOLUTE_VALUE\x10\x02\x12#\n\x1fMETRIC_DISPLAY_TREND_PERCENTAGE\x10\x03\x12\x36\n2METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE\x10\x04*r\n\x0fMetricTrendType\x12!\n\x1dMETRIC_TREND_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19METRIC_TREND_TYPE_REGULAR\x10\x01\x12\x1d\n\x19METRIC_TREND_TYPE_INVERSE\x10\x02*O\n\rVisualMapType\x12\x1f\n\x1bVISUAL_MAP_TYPE_UNSPECIFIED\x10\x00\x12\x0e\n\nCONTINUOUS\x10\x01\x12\r\n\tPIECEWISE\x10\x02\x32\xfe\x04\n\x15\x44\x61shboardChartService\x12\xc3\x01\n\x11GetDashboardChart\x12\x33.google.cloud.chronicle.v1.GetDashboardChartRequest\x1a).google.cloud.chronicle.v1.DashboardChart\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/instances/*/dashboardCharts/*}\x12\xf1\x01\n\x17\x42\x61tchGetDashboardCharts\x12\x39.google.cloud.chronicle.v1.BatchGetDashboardChartsRequest\x1a:.google.cloud.chronicle.v1.BatchGetDashboardChartsResponse\"_\xda\x41\x0cparent,names\x82\xd3\xe4\x93\x02J\x12H/v1/{parent=projects/*/locations/*/instances/*}/dashboardCharts:batchGet\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xca\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x13\x44\x61shboardChartProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - DashboardChart = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart").msgclass - DashboardChart::ChartDatasource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.ChartDatasource").msgclass - DashboardChart::Visualization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization").msgclass - DashboardChart::Visualization::Axis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Axis").msgclass - DashboardChart::Visualization::Series = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series").msgclass - DashboardChart::Visualization::Series::Encode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.Encode").msgclass - DashboardChart::Visualization::Series::DataLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.DataLabel").msgclass - DashboardChart::Visualization::Series::ItemStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemStyle").msgclass - DashboardChart::Visualization::Series::AreaStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.AreaStyle").msgclass - DashboardChart::Visualization::Series::UserSelectedValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.UserSelectedValues").msgclass - DashboardChart::Visualization::Series::ChartSliceColor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ChartSliceColor").msgclass - DashboardChart::Visualization::Series::ItemColors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.ItemColors").msgclass - DashboardChart::Visualization::Series::GaugeValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeValue").msgclass - DashboardChart::Visualization::Series::GaugeConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.GaugeConfig").msgclass - DashboardChart::Visualization::Series::MetricTrendConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Series.MetricTrendConfig").msgclass - DashboardChart::Visualization::Tooltip = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Tooltip").msgclass - DashboardChart::Visualization::Legend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.Legend").msgclass - DashboardChart::Visualization::ColumnDef = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnDef").msgclass - DashboardChart::Visualization::ColumnRenderTypeSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnRenderTypeSettings").msgclass - DashboardChart::Visualization::ColumnTooltipSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.ColumnTooltipSettings").msgclass - DashboardChart::Visualization::TableConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.TableConfig").msgclass - DashboardChart::Visualization::GoogleMapsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig").msgclass - DashboardChart::Visualization::GoogleMapsConfig::DataSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.DataSettings").msgclass - DashboardChart::Visualization::GoogleMapsConfig::MapPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.MapPosition").msgclass - DashboardChart::Visualization::GoogleMapsConfig::PointSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.GoogleMapsConfig.PointSettings").msgclass - DashboardChart::Visualization::VisualMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap").msgclass - DashboardChart::Visualization::VisualMap::VisualMapPiece = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.Visualization.VisualMap.VisualMapPiece").msgclass - DashboardChart::DrillDownConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig").msgclass - DashboardChart::DrillDownConfig::DrillDown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown").msgclass - DashboardChart::DrillDownConfig::DrillDown::DefaultDrillDownSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.DefaultDrillDownSettings").msgclass - DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings").msgclass - DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownQuery").msgclass - DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter").msgclass - DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter::DrillDownDashboardFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownFilter.DrillDownDashboardFilter").msgclass - DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownExternalLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardChart.DrillDownConfig.DrillDown.CustomDrillDownSettings.DrillDownExternalLink").msgclass - Button = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Button").msgclass - Button::Properties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Button.Properties").msgclass - Markdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Markdown").msgclass - Markdown::MarkdownProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Markdown.MarkdownProperties").msgclass - GetDashboardChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDashboardChartRequest").msgclass - BatchGetDashboardChartsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BatchGetDashboardChartsRequest").msgclass - BatchGetDashboardChartsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BatchGetDashboardChartsResponse").msgclass - TileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.TileType").enummodule - RenderType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RenderType").enummodule - AxisType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AxisType").enummodule - SeriesType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.SeriesType").enummodule - SeriesStackStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.SeriesStackStrategy").enummodule - ToolTipTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ToolTipTrigger").enummodule - LegendOrient = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.LegendOrient").enummodule - LegendAlign = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.LegendAlign").enummodule - ButtonStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ButtonStyle").enummodule - PlotMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.PlotMode").enummodule - PointSizeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.PointSizeType").enummodule - MetricFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.MetricFormat").enummodule - MetricDisplayTrend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.MetricDisplayTrend").enummodule - MetricTrendType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.MetricTrendType").enummodule - VisualMapType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.VisualMapType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.rb deleted file mode 100644 index 6a8b4f84d9ac..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/dashboard_chart_service/credentials" -require "google/cloud/chronicle/v1/dashboard_chart_service/paths" -require "google/cloud/chronicle/v1/dashboard_chart_service/client" -require "google/cloud/chronicle/v1/dashboard_chart_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # A service providing functionality for managing dashboards' charts. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/dashboard_chart_service" - # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/dashboard_chart_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new - # - module DashboardChartService - end - end - end - end -end - -helper_path = ::File.join __dir__, "dashboard_chart_service", "helpers.rb" -require "google/cloud/chronicle/v1/dashboard_chart_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb deleted file mode 100644 index 47581154918d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/client.rb +++ /dev/null @@ -1,584 +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/chronicle/v1/dashboard_chart_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DashboardChartService - ## - # Client for the DashboardChartService service. - # - # A service providing functionality for managing dashboards' charts. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dashboard_chart_service_stub - - ## - # Configure the DashboardChartService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DashboardChartService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DashboardChartService clients - # ::Google::Cloud::Chronicle::V1::DashboardChartService::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", "Chronicle", "V1"] - 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.get_dashboard_chart.timeout = 60.0 - default_config.rpcs.get_dashboard_chart.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_get_dashboard_charts.timeout = 60.0 - default_config.rpcs.batch_get_dashboard_charts.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DashboardChartService 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::Chronicle::V1::DashboardChartService::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 - @dashboard_chart_service_stub.universe_domain - end - - ## - # Create a new DashboardChartService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DashboardChartService 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/chronicle/v1/dashboard_chart_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 - - @dashboard_chart_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::DashboardChartService::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 - ) - - @dashboard_chart_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @dashboard_chart_service_stub.logger - end - - # Service calls - - ## - # Get a dashboard chart. - # - # @overload get_dashboard_chart(request, options = nil) - # Pass arguments to `get_dashboard_chart` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDashboardChartRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, ::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_dashboard_chart(name: nil) - # Pass arguments to `get_dashboard_chart` 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 name of the dashboardChart to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardCharts/\\{chart} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DashboardChart] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DashboardChart] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new - # - # # Call the get_dashboard_chart method. - # result = client.get_dashboard_chart request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardChart. - # p result - # - def get_dashboard_chart request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest - - # 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_dashboard_chart.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::Chronicle::V1::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_dashboard_chart.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dashboard_chart.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dashboard_chart_service_stub.call_rpc :get_dashboard_chart, 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 - - ## - # Get dashboard charts in batches. - # - # @overload batch_get_dashboard_charts(request, options = nil) - # Pass arguments to `batch_get_dashboard_charts` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, ::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_get_dashboard_charts(parent: nil, names: nil) - # Pass arguments to `batch_get_dashboard_charts` 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 parent resource shared by all dashboard charts being - # retrieved. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance} If this is - # set, the parent of all of the dashboard charts specified in `names` must - # match this field. - # @param names [::Array<::String>] - # Required. The names of the dashboard charts to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new - # - # # Call the batch_get_dashboard_charts method. - # result = client.batch_get_dashboard_charts request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse. - # p result - # - def batch_get_dashboard_charts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest - - # 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_get_dashboard_charts.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::Chronicle::V1::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.batch_get_dashboard_charts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_get_dashboard_charts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dashboard_chart_service_stub.call_rpc :batch_get_dashboard_charts, 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 - - ## - # Configuration class for the DashboardChartService API. - # - # This class represents the configuration for DashboardChartService, - # 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::Chronicle::V1::DashboardChartService::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 - # # get_dashboard_chart to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_dashboard_chart.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_dashboard_chart.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::Chronicle::V1::DashboardChartService::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. - # * `: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 = "chronicle.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 DashboardChartService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_dashboard_chart` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dashboard_chart - ## - # RPC-specific configuration for `batch_get_dashboard_charts` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_dashboard_charts - - # @private - def initialize parent_rpcs = nil - get_dashboard_chart_config = parent_rpcs.get_dashboard_chart if parent_rpcs.respond_to? :get_dashboard_chart - @get_dashboard_chart = ::Gapic::Config::Method.new get_dashboard_chart_config - batch_get_dashboard_charts_config = parent_rpcs.batch_get_dashboard_charts if parent_rpcs.respond_to? :batch_get_dashboard_charts - @batch_get_dashboard_charts = ::Gapic::Config::Method.new batch_get_dashboard_charts_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb deleted file mode 100644 index 8c5f54e38221..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/credentials.rb +++ /dev/null @@ -1,49 +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 Chronicle - module V1 - module DashboardChartService - # Credentials for the DashboardChartService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/chronicle", - "https://www.googleapis.com/auth/chronicle.readonly", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.rb deleted file mode 100644 index 9bbfee50192d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/paths.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 Chronicle - module V1 - module DashboardChartService - # Path helper methods for the DashboardChartService API. - module Paths - ## - # Create a fully-qualified DashboardChart resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param chart [String] - # - # @return [::String] - def dashboard_chart_path project:, location:, instance:, chart: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.rb deleted file mode 100644 index 6a4e38024078..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/dashboard_chart_service/credentials" -require "google/cloud/chronicle/v1/dashboard_chart_service/paths" -require "google/cloud/chronicle/v1/dashboard_chart_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # A service providing functionality for managing dashboards' charts. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/dashboard_chart_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new - # - module DashboardChartService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/dashboard_chart_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb deleted file mode 100644 index 1abece7b2fd4..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/client.rb +++ /dev/null @@ -1,527 +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/chronicle/v1/dashboard_chart_pb" -require "google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module DashboardChartService - module Rest - ## - # REST client for the DashboardChartService service. - # - # A service providing functionality for managing dashboards' charts. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dashboard_chart_service_stub - - ## - # Configure the DashboardChartService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DashboardChartService clients - # ::Google::Cloud::Chronicle::V1::DashboardChartService::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", "Chronicle", "V1"] - 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.get_dashboard_chart.timeout = 60.0 - default_config.rpcs.get_dashboard_chart.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.batch_get_dashboard_charts.timeout = 60.0 - default_config.rpcs.batch_get_dashboard_charts.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DashboardChartService 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::Chronicle::V1::DashboardChartService::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 - @dashboard_chart_service_stub.universe_domain - end - - ## - # Create a new DashboardChartService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DashboardChartService 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 - - @dashboard_chart_service_stub = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @dashboard_chart_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @dashboard_chart_service_stub.logger - end - - # Service calls - - ## - # Get a dashboard chart. - # - # @overload get_dashboard_chart(request, options = nil) - # Pass arguments to `get_dashboard_chart` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDashboardChartRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, ::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_dashboard_chart(name: nil) - # Pass arguments to `get_dashboard_chart` 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 name of the dashboardChart to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardCharts/\\{chart} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DashboardChart] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DashboardChart] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new - # - # # Call the get_dashboard_chart method. - # result = client.get_dashboard_chart request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardChart. - # p result - # - def get_dashboard_chart request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest - - # 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_dashboard_chart.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::Chronicle::V1::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_dashboard_chart.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dashboard_chart.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dashboard_chart_service_stub.get_dashboard_chart 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 - - ## - # Get dashboard charts in batches. - # - # @overload batch_get_dashboard_charts(request, options = nil) - # Pass arguments to `batch_get_dashboard_charts` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, ::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_get_dashboard_charts(parent: nil, names: nil) - # Pass arguments to `batch_get_dashboard_charts` 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 parent resource shared by all dashboard charts being - # retrieved. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance} If this is - # set, the parent of all of the dashboard charts specified in `names` must - # match this field. - # @param names [::Array<::String>] - # Required. The names of the dashboard charts to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new - # - # # Call the batch_get_dashboard_charts method. - # result = client.batch_get_dashboard_charts request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse. - # p result - # - def batch_get_dashboard_charts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest - - # 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_get_dashboard_charts.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::Chronicle::V1::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_get_dashboard_charts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_get_dashboard_charts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dashboard_chart_service_stub.batch_get_dashboard_charts 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 - - ## - # Configuration class for the DashboardChartService REST API. - # - # This class represents the configuration for DashboardChartService 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::Chronicle::V1::DashboardChartService::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 - # # get_dashboard_chart to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_dashboard_chart.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_dashboard_chart.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. - # * `: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 = "chronicle.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 DashboardChartService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_dashboard_chart` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dashboard_chart - ## - # RPC-specific configuration for `batch_get_dashboard_charts` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_dashboard_charts - - # @private - def initialize parent_rpcs = nil - get_dashboard_chart_config = parent_rpcs.get_dashboard_chart if parent_rpcs.respond_to? :get_dashboard_chart - @get_dashboard_chart = ::Gapic::Config::Method.new get_dashboard_chart_config - batch_get_dashboard_charts_config = parent_rpcs.batch_get_dashboard_charts if parent_rpcs.respond_to? :batch_get_dashboard_charts - @batch_get_dashboard_charts = ::Gapic::Config::Method.new batch_get_dashboard_charts_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb deleted file mode 100644 index e79d617d732c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_service/rest/service_stub.rb +++ /dev/null @@ -1,203 +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/chronicle/v1/dashboard_chart_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DashboardChartService - module Rest - ## - # REST service stub for the DashboardChartService 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 get_dashboard_chart REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest] - # 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::Chronicle::V1::DashboardChart] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DashboardChart] - # A result object deserialized from the server's reply - def get_dashboard_chart request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dashboard_chart_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_dashboard_chart", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DashboardChart.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_get_dashboard_charts REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest] - # 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::Chronicle::V1::BatchGetDashboardChartsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse] - # A result object deserialized from the server's reply - def batch_get_dashboard_charts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_dashboard_charts_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_get_dashboard_charts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse.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 get_dashboard_chart REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardChartRequest] - # 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_dashboard_chart_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dashboardCharts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_get_dashboard_charts REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest] - # 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_get_dashboard_charts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dashboardCharts:batchGet", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb deleted file mode 100644 index 33780def2e31..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_chart_services_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/dashboard_chart.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# 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 -# -# 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/chronicle/v1/dashboard_chart_pb' - -module Google - module Cloud - module Chronicle - module V1 - module DashboardChartService - # A service providing functionality for managing dashboards' charts. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.DashboardChartService' - - # Get a dashboard chart. - rpc :GetDashboardChart, ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, ::Google::Cloud::Chronicle::V1::DashboardChart - # Get dashboard charts in batches. - rpc :BatchGetDashboardCharts, ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb deleted file mode 100644 index 25fc186ae397..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/dashboard_query.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/protobuf/any_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/date_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n/google/cloud/chronicle/v1/dashboard_query.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1agoogle/type/interval.proto\"\xb5\x05\n\x0e\x44\x61shboardQuery\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardQuery\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x05input\x18\x03 \x01(\x0b\x32/.google.cloud.chronicle.v1.DashboardQuery.InputB\x03\xe0\x41\x02\x12H\n\x0f\x64\x61shboard_chart\x18\x04 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\x12\x11\n\x04\x65tag\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x84\x02\n\x05Input\x12,\n\x0btime_window\x18\x01 \x01(\x0b\x32\x15.google.type.IntervalH\x00\x12U\n\rrelative_time\x18\x03 \x01(\x0b\x32<.google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTimeH\x00\x1ah\n\x0cRelativeTime\x12;\n\ttime_unit\x18\x01 \x01(\x0e\x32#.google.cloud.chronicle.v1.TimeUnitB\x03\xe0\x41\x02\x12\x1b\n\x0estart_time_val\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x42\x0c\n\ntime_input:\xa6\x01\xea\x41\xa2\x01\n\'chronicle.googleapis.com/DashboardQuery\x12Uprojects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}*\x10\x64\x61shboardQueries2\x0e\x64\x61shboardQuery\"Y\n\x18GetDashboardQueryRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardQuery\"\xa0\x02\n\x1c\x45xecuteDashboardQueryRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/DashboardQuery\x12=\n\x05query\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x02\x12@\n\x07\x66ilters\x18\x03 \x03(\x0b\x32*.google.cloud.chronicle.v1.DashboardFilterB\x03\xe0\x41\x01\x12\x18\n\x0b\x63lear_cache\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17use_previous_time_range\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xd6\x05\n\x11QueryRuntimeError\x12\x13\n\x0b\x65rror_title\x18\x01 \x01(\t\x12\x19\n\x11\x65rror_description\x18\x02 \x01(\t\x12R\n\x0e\x65rror_severity\x18\x03 \x01(\x0e\x32:.google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity\x12X\n\x08metadata\x18\x04 \x03(\x0b\x32\x46.google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata\x12R\n\x0ewarning_reason\x18\x05 \x01(\x0e\x32:.google.cloud.chronicle.v1.QueryRuntimeError.WarningReason\x1aq\n\x19QueryRuntimeErrorMetadata\x12\x45\n\x03key\x18\x01 \x01(\x0e\x32\x38.google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey\x12\r\n\x05value\x18\x02 \x01(\t\"H\n\rErrorSeverity\x12\x1e\n\x1a\x45RROR_SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\n\n\x06SEVERE\x10\x02\":\n\x0bMetadataKey\x12\x1c\n\x18METADATA_KEY_UNSPECIFIED\x10\x00\x12\r\n\tROW_LIMIT\x10\x01\"\x95\x01\n\rWarningReason\x12\x1e\n\x1aWARNING_REASON_UNSPECIFIED\x10\x00\x12\x16\n\x12ROW_LIMIT_EXCEEDED\x10\x01\x12\x1e\n\x1a\x44\x45\x46\x41ULT_ROW_LIMIT_EXCEEDED\x10\x02\x12,\n(CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED\x10\x03\"\xc2\x0b\n\x1d\x45xecuteDashboardQueryResponse\x12T\n\x07results\x18\x01 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData\x12;\n\x0c\x64\x61ta_sources\x18\x03 \x03(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x12J\n!last_backend_cache_refreshed_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12*\n\x0btime_window\x18\x05 \x01(\x0b\x32\x15.google.type.Interval\x12J\n\x14query_runtime_errors\x18\x06 \x03(\x0b\x32,.google.cloud.chronicle.v1.QueryRuntimeError\x12J\n\x11language_features\x18\x07 \x03(\x0e\x32*.google.cloud.chronicle.v1.LanguageFeatureB\x03\xe0\x41\x01\x1a\xa6\x04\n\x0b\x43olumnValue\x12\x12\n\x08null_val\x18\x01 \x01(\x08H\x00\x12\x12\n\x08\x62ool_val\x18\x02 \x01(\x08H\x00\x12\x13\n\tbytes_val\x18\x03 \x01(\x0cH\x00\x12\x14\n\ndouble_val\x18\x04 \x01(\x01H\x00\x12\x13\n\tint64_val\x18\x05 \x01(\x03H\x00\x12\x14\n\nuint64_val\x18\x06 \x01(\x04H\x00\x12\x14\n\nstring_val\x18\x07 \x01(\tH\x00\x12\x33\n\rtimestamp_val\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12%\n\x08\x64\x61te_val\x18\t \x01(\x0b\x32\x11.google.type.DateH\x00\x12)\n\tproto_val\x18\n \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x64\n\x08metadata\x18\x0b \x01(\x0b\x32R.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata\x1a\x8c\x01\n\rValueMetadata\x12\x33\n\x05links\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.InAppLink\x12\x13\n\x0b\x66ield_paths\x18\x02 \x03(\t\x12\x31\n\rtimestamp_val\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x07\n\x05value\x1a\xa3\x02\n\nColumnType\x12U\n\x05value\x18\x01 \x01(\x0b\x32\x44.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValueH\x00\x12X\n\x04list\x18\x02 \x01(\x0b\x32H.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.ListH\x00\x1a\\\n\x04List\x12T\n\x06values\x18\x01 \x03(\x0b\x32\x44.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValueB\x06\n\x04type\x1a\xae\x01\n\nColumnData\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12S\n\x06values\x18\x02 \x03(\x0b\x32\x43.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType\x12;\n\x08metadata\x18\x03 \x01(\x0b\x32).google.cloud.chronicle.v1.ColumnMetadata\"\xf4\x03\n\x0f\x44\x61shboardFilter\x12\n\n\x02id\x18\x01 \x01(\t\x12:\n\x0b\x64\x61ta_source\x18\x02 \x01(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x12\x12\n\nfield_path\x18\x03 \x01(\t\x12\\\n filter_operator_and_field_values\x18\x04 \x03(\x0b\x32\x32.google.cloud.chronicle.v1.FilterOperatorAndValues\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12\x11\n\tchart_ids\x18\x06 \x03(\t\x12*\n\x1dis_standard_time_range_filter\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x19\n\x0cis_mandatory\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12\x37\n%is_standard_time_range_filter_enabled\x18\t \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12T\n\x16\x61\x64vanced_filter_config\x18\n \x01(\x0b\x32/.google.cloud.chronicle.v1.AdvancedFilterConfigB\x03\xe0\x41\x01\x42(\n&_is_standard_time_range_filter_enabled\"s\n\x17\x46ilterOperatorAndValues\x12\x42\n\x0f\x66ilter_operator\x18\x01 \x01(\x0e\x32).google.cloud.chronicle.v1.FilterOperator\x12\x14\n\x0c\x66ield_values\x18\x02 \x03(\t\"\xc6\x05\n\x14\x41\x64vancedFilterConfig\x12\x12\n\x05token\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06prefix\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06suffix\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tseparator\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10multiple_allowed\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0e\x64\x65\x66\x61ult_values\x18\x06 \x03(\tB\x03\xe0\x41\x01\x12!\n\x14skip_default_affixes\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12V\n\x0cvalue_source\x18\x08 \x01(\x0b\x32;.google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSourceB\x03\xe0\x41\x02\x1a\xd1\x01\n\x0bValueSource\x12\\\n\x0emanual_options\x18\x01 \x01(\x0b\x32=.google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptionsB\x03\xe0\x41\x01H\x00\x12Z\n\rquery_options\x18\x02 \x01(\x0b\x32<.google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptionsB\x03\xe0\x41\x01H\x00\x42\x08\n\x06source\x1a%\n\rManualOptions\x12\x14\n\x07options\x18\x01 \x03(\tB\x03\xe0\x41\x01\x1a\xa5\x01\n\x0cQueryOptions\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06\x63olumn\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\'\n\x1aglobal_time_filter_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x43\n\x05input\x18\x04 \x01(\x0b\x32/.google.cloud.chronicle.v1.DashboardQuery.InputB\x03\xe0\x41\x01\"9\n\tInAppLink\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x10\n\x08icon_url\x18\x03 \x01(\t\"\xb5\x02\n\x0e\x43olumnMetadata\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\x12\n\nfield_path\x18\x02 \x01(\t\x12\x15\n\rfunction_name\x18\x03 \x01(\t\x12\x17\n\x0f\x66unction_module\x18\x04 \x01(\t\x12:\n\x0b\x64\x61ta_source\x18\x05 \x01(\x0e\x32%.google.cloud.chronicle.v1.DataSource\x12H\n\x12timestamp_metadata\x18\x06 \x01(\x0b\x32,.google.cloud.chronicle.v1.TimestampMetadata\x12\x11\n\tlongitude\x18\x07 \x01(\x08\x12\x10\n\x08latitude\x18\x08 \x01(\x08\x12\x10\n\x08selected\x18\t \x01(\x08\x12\x12\n\nunselected\x18\n \x01(\x08\"\x83\x01\n\x11TimestampMetadata\x12\x13\n\x0btime_format\x18\x01 \x01(\t\x12\x11\n\ttime_zone\x18\x02 \x01(\t\x12\x18\n\x10time_granularity\x18\x03 \x01(\t\x12\x13\n\x0bis_sortable\x18\x04 \x01(\x08\x12\x17\n\x0fis_interpolable\x18\x05 \x01(\x08*[\n\x0fLanguageFeature\x12 \n\x1cLANGUAGE_FEATURE_UNSPECIFIED\x10\x00\x12\t\n\x05JOINS\x10\x01\x12\n\n\x06STAGES\x10\x02\x12\x0f\n\x0b\x44\x41TA_TABLES\x10\x03*\xe4\x02\n\x0e\x46ilterOperator\x12\x1f\n\x1b\x46ILTER_OPERATOR_UNSPECIFIED\x10\x00\x12\t\n\x05\x45QUAL\x10\x01\x12\r\n\tNOT_EQUAL\x10\x02\x12\x06\n\x02IN\x10\x03\x12\x10\n\x0cGREATER_THAN\x10\x04\x12\x1c\n\x18GREATER_THAN_OR_EQUAL_TO\x10\x05\x12\r\n\tLESS_THAN\x10\x06\x12\x19\n\x15LESS_THAN_OR_EQUAL_TO\x10\x07\x12\x0b\n\x07\x42\x45TWEEN\x10\x08\x12\x08\n\x04PAST\x10\t\x12\x0b\n\x07IS_NULL\x10\n\x12\x0f\n\x0bIS_NOT_NULL\x10\x0b\x12\x0f\n\x0bSTARTS_WITH\x10\x0c\x12\r\n\tENDS_WITH\x10\r\x12\x18\n\x14\x44OES_NOT_STARTS_WITH\x10\x0e\x12\x16\n\x12\x44OES_NOT_ENDS_WITH\x10\x0f\x12\n\n\x06NOT_IN\x10\x10\x12\x0c\n\x08\x43ONTAINS\x10\x11\x12\x14\n\x10\x44OES_NOT_CONTAIN\x10\x12*\x9a\x02\n\nDataSource\x12\x1b\n\x17\x44\x41TA_SOURCE_UNSPECIFIED\x10\x00\x12\x07\n\x03UDM\x10\x01\x12\n\n\x06\x45NTITY\x10\x02\x12\x15\n\x11INGESTION_METRICS\x10\x03\x12\x13\n\x0fRULE_DETECTIONS\x10\x04\x12\x0c\n\x08RULESETS\x10\x05\x12\n\n\x06GLOBAL\x10\x06\x12\x0f\n\x0bIOC_MATCHES\x10\x07\x12\t\n\x05RULES\x10\x08\x12\x0e\n\nSOAR_CASES\x10\t\x12\x12\n\x0eSOAR_PLAYBOOKS\x10\n\x12\x15\n\x11SOAR_CASE_HISTORY\x10\x0b\x12\x0e\n\nDATA_TABLE\x10\x0c\x12\x11\n\rINVESTIGATION\x10\r\x12\x1a\n\x16INVESTIGATION_FEEDBACK\x10\x0e*o\n\x08TimeUnit\x12\x19\n\x15TIME_UNIT_UNSPECIFIED\x10\x00\x12\n\n\x06SECOND\x10\x01\x12\n\n\x06MINUTE\x10\x02\x12\x08\n\x04HOUR\x10\x03\x12\x07\n\x03\x44\x41Y\x10\x04\x12\x08\n\x04WEEK\x10\x05\x12\t\n\x05MONTH\x10\x06\x12\x08\n\x04YEAR\x10\x07\x32\xfc\x04\n\x15\x44\x61shboardQueryService\x12\xc4\x01\n\x11GetDashboardQuery\x12\x33.google.cloud.chronicle.v1.GetDashboardQueryRequest\x1a).google.cloud.chronicle.v1.DashboardQuery\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dashboardQueries/*}\x12\xee\x01\n\x15\x45xecuteDashboardQuery\x12\x37.google.cloud.chronicle.v1.ExecuteDashboardQueryRequest\x1a\x38.google.cloud.chronicle.v1.ExecuteDashboardQueryResponse\"b\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02M\"H/v1/{parent=projects/*/locations/*/instances/*}/dashboardQueries:execute:\x01*\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xca\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x13\x44\x61shboardQueryProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - DashboardQuery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardQuery").msgclass - DashboardQuery::Input = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardQuery.Input").msgclass - DashboardQuery::Input::RelativeTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardQuery.Input.RelativeTime").msgclass - GetDashboardQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDashboardQueryRequest").msgclass - ExecuteDashboardQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryRequest").msgclass - QueryRuntimeError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError").msgclass - QueryRuntimeError::QueryRuntimeErrorMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.QueryRuntimeErrorMetadata").msgclass - QueryRuntimeError::ErrorSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.ErrorSeverity").enummodule - QueryRuntimeError::MetadataKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.MetadataKey").enummodule - QueryRuntimeError::WarningReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.QueryRuntimeError.WarningReason").enummodule - ExecuteDashboardQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse").msgclass - ExecuteDashboardQueryResponse::ColumnValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue").msgclass - ExecuteDashboardQueryResponse::ColumnValue::ValueMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnValue.ValueMetadata").msgclass - ExecuteDashboardQueryResponse::ColumnType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType").msgclass - ExecuteDashboardQueryResponse::ColumnType::List = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnType.List").msgclass - ExecuteDashboardQueryResponse::ColumnData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExecuteDashboardQueryResponse.ColumnData").msgclass - DashboardFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardFilter").msgclass - FilterOperatorAndValues = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FilterOperatorAndValues").msgclass - AdvancedFilterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig").msgclass - AdvancedFilterConfig::ValueSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig.ValueSource").msgclass - AdvancedFilterConfig::ManualOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig.ManualOptions").msgclass - AdvancedFilterConfig::QueryOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AdvancedFilterConfig.QueryOptions").msgclass - InAppLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InAppLink").msgclass - ColumnMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ColumnMetadata").msgclass - TimestampMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.TimestampMetadata").msgclass - LanguageFeature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.LanguageFeature").enummodule - FilterOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FilterOperator").enummodule - DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataSource").enummodule - TimeUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.TimeUnit").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.rb deleted file mode 100644 index fea1bce2d395..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/dashboard_query_service/credentials" -require "google/cloud/chronicle/v1/dashboard_query_service/paths" -require "google/cloud/chronicle/v1/dashboard_query_service/client" -require "google/cloud/chronicle/v1/dashboard_query_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # A service providing functionality for managing dashboards' queries. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/dashboard_query_service" - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/dashboard_query_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new - # - module DashboardQueryService - end - end - end - end -end - -helper_path = ::File.join __dir__, "dashboard_query_service", "helpers.rb" -require "google/cloud/chronicle/v1/dashboard_query_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb deleted file mode 100644 index 75eb19e93766..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/client.rb +++ /dev/null @@ -1,589 +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/chronicle/v1/dashboard_query_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DashboardQueryService - ## - # Client for the DashboardQueryService service. - # - # A service providing functionality for managing dashboards' queries. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dashboard_query_service_stub - - ## - # Configure the DashboardQueryService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DashboardQueryService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DashboardQueryService clients - # ::Google::Cloud::Chronicle::V1::DashboardQueryService::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", "Chronicle", "V1"] - 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.get_dashboard_query.timeout = 60.0 - default_config.rpcs.get_dashboard_query.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.execute_dashboard_query.timeout = 1800.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::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 - @dashboard_query_service_stub.universe_domain - end - - ## - # Create a new DashboardQueryService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DashboardQueryService 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/chronicle/v1/dashboard_query_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 - - @dashboard_query_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::DashboardQueryService::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 - ) - - @dashboard_query_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @dashboard_query_service_stub.logger - end - - # Service calls - - ## - # Get a dashboard query. - # - # @overload get_dashboard_query(request, options = nil) - # Pass arguments to `get_dashboard_query` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, ::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_dashboard_query(name: nil) - # Pass arguments to `get_dashboard_query` 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 name of the dashboardQuery to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardQueries/\\{query} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DashboardQuery] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new - # - # # Call the get_dashboard_query method. - # result = client.get_dashboard_query request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardQuery. - # p result - # - def get_dashboard_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest - - # 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_dashboard_query.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::Chronicle::V1::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_dashboard_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dashboard_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dashboard_query_service_stub.call_rpc :get_dashboard_query, 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 - - ## - # Execute a query and return the data. - # - # @overload execute_dashboard_query(request, options = nil) - # Pass arguments to `execute_dashboard_query` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, ::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 execute_dashboard_query(parent: nil, query: nil, filters: nil, clear_cache: nil, use_previous_time_range: nil) - # Pass arguments to `execute_dashboard_query` 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 parent, under which to run this dashboardQuery. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] - # Required. The query to execute and get results back for. - # QueryID or 'query', 'input.time_window' fields will be used. Use - # 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard - # query. - # @param filters [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter, ::Hash>] - # Optional. Dashboard level filters other than query string. - # @param clear_cache [::Boolean] - # Optional. When true, the backend would read from the database, rather than - # fetching data directly from the cache. - # @param use_previous_time_range [::Boolean] - # Optional. When true, the backend will execute the query against the - # previous time range of the query. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new - # - # # Call the execute_dashboard_query method. - # result = client.execute_dashboard_query request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse. - # p result - # - def execute_dashboard_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest - - # 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.execute_dashboard_query.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::Chronicle::V1::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.execute_dashboard_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.execute_dashboard_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dashboard_query_service_stub.call_rpc :execute_dashboard_query, 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 - - ## - # Configuration class for the DashboardQueryService API. - # - # This class represents the configuration for DashboardQueryService, - # 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::Chronicle::V1::DashboardQueryService::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 - # # get_dashboard_query to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_dashboard_query.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_dashboard_query.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::Chronicle::V1::DashboardQueryService::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. - # * `: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 = "chronicle.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 DashboardQueryService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_dashboard_query` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dashboard_query - ## - # RPC-specific configuration for `execute_dashboard_query` - # @return [::Gapic::Config::Method] - # - attr_reader :execute_dashboard_query - - # @private - def initialize parent_rpcs = nil - get_dashboard_query_config = parent_rpcs.get_dashboard_query if parent_rpcs.respond_to? :get_dashboard_query - @get_dashboard_query = ::Gapic::Config::Method.new get_dashboard_query_config - execute_dashboard_query_config = parent_rpcs.execute_dashboard_query if parent_rpcs.respond_to? :execute_dashboard_query - @execute_dashboard_query = ::Gapic::Config::Method.new execute_dashboard_query_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb deleted file mode 100644 index 18fdc4a6bfae..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/credentials.rb +++ /dev/null @@ -1,49 +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 Chronicle - module V1 - module DashboardQueryService - # Credentials for the DashboardQueryService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/chronicle", - "https://www.googleapis.com/auth/chronicle.readonly", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb deleted file mode 100644 index 937d3f33b4e2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/paths.rb +++ /dev/null @@ -1,94 +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 Chronicle - module V1 - module DashboardQueryService - # Path helper methods for the DashboardQueryService API. - module Paths - ## - # Create a fully-qualified DashboardChart resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param chart [String] - # - # @return [::String] - def dashboard_chart_path project:, location:, instance:, chart: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" - end - - ## - # Create a fully-qualified DashboardQuery resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param query [String] - # - # @return [::String] - def dashboard_query_path project:, location:, instance:, query: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardQueries/#{query}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.rb deleted file mode 100644 index 7679559f64da..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/dashboard_query_service/credentials" -require "google/cloud/chronicle/v1/dashboard_query_service/paths" -require "google/cloud/chronicle/v1/dashboard_query_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # A service providing functionality for managing dashboards' queries. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/dashboard_query_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new - # - module DashboardQueryService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/dashboard_query_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb deleted file mode 100644 index 2653019e183b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/client.rb +++ /dev/null @@ -1,532 +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/chronicle/v1/dashboard_query_pb" -require "google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module DashboardQueryService - module Rest - ## - # REST client for the DashboardQueryService service. - # - # A service providing functionality for managing dashboards' queries. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :dashboard_query_service_stub - - ## - # Configure the DashboardQueryService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DashboardQueryService clients - # ::Google::Cloud::Chronicle::V1::DashboardQueryService::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", "Chronicle", "V1"] - 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.get_dashboard_query.timeout = 60.0 - default_config.rpcs.get_dashboard_query.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.execute_dashboard_query.timeout = 1800.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::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 - @dashboard_query_service_stub.universe_domain - end - - ## - # Create a new DashboardQueryService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DashboardQueryService 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 - - @dashboard_query_service_stub = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @dashboard_query_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @dashboard_query_service_stub.logger - end - - # Service calls - - ## - # Get a dashboard query. - # - # @overload get_dashboard_query(request, options = nil) - # Pass arguments to `get_dashboard_query` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, ::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_dashboard_query(name: nil) - # Pass arguments to `get_dashboard_query` 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 name of the dashboardQuery to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardQueries/\\{query} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DashboardQuery] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new - # - # # Call the get_dashboard_query method. - # result = client.get_dashboard_query request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DashboardQuery. - # p result - # - def get_dashboard_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest - - # 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_dashboard_query.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::Chronicle::V1::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_dashboard_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dashboard_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dashboard_query_service_stub.get_dashboard_query 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 - - ## - # Execute a query and return the data. - # - # @overload execute_dashboard_query(request, options = nil) - # Pass arguments to `execute_dashboard_query` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, ::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 execute_dashboard_query(parent: nil, query: nil, filters: nil, clear_cache: nil, use_previous_time_range: nil) - # Pass arguments to `execute_dashboard_query` 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 parent, under which to run this dashboardQuery. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] - # Required. The query to execute and get results back for. - # QueryID or 'query', 'input.time_window' fields will be used. Use - # 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard - # query. - # @param filters [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter, ::Hash>] - # Optional. Dashboard level filters other than query string. - # @param clear_cache [::Boolean] - # Optional. When true, the backend would read from the database, rather than - # fetching data directly from the cache. - # @param use_previous_time_range [::Boolean] - # Optional. When true, the backend will execute the query against the - # previous time range of the query. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new - # - # # Call the execute_dashboard_query method. - # result = client.execute_dashboard_query request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse. - # p result - # - def execute_dashboard_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest - - # 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.execute_dashboard_query.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::Chronicle::V1::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.execute_dashboard_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.execute_dashboard_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @dashboard_query_service_stub.execute_dashboard_query 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 - - ## - # Configuration class for the DashboardQueryService REST API. - # - # This class represents the configuration for DashboardQueryService 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::Chronicle::V1::DashboardQueryService::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 - # # get_dashboard_query to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_dashboard_query.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_dashboard_query.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. - # * `: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 = "chronicle.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 DashboardQueryService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_dashboard_query` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dashboard_query - ## - # RPC-specific configuration for `execute_dashboard_query` - # @return [::Gapic::Config::Method] - # - attr_reader :execute_dashboard_query - - # @private - def initialize parent_rpcs = nil - get_dashboard_query_config = parent_rpcs.get_dashboard_query if parent_rpcs.respond_to? :get_dashboard_query - @get_dashboard_query = ::Gapic::Config::Method.new get_dashboard_query_config - execute_dashboard_query_config = parent_rpcs.execute_dashboard_query if parent_rpcs.respond_to? :execute_dashboard_query - @execute_dashboard_query = ::Gapic::Config::Method.new execute_dashboard_query_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb deleted file mode 100644 index b58063ce1d9b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_service/rest/service_stub.rb +++ /dev/null @@ -1,204 +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/chronicle/v1/dashboard_query_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DashboardQueryService - module Rest - ## - # REST service stub for the DashboardQueryService 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 get_dashboard_query REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest] - # 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::Chronicle::V1::DashboardQuery] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] - # A result object deserialized from the server's reply - def get_dashboard_query request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dashboard_query_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_dashboard_query", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DashboardQuery.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the execute_dashboard_query REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest] - # 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::Chronicle::V1::ExecuteDashboardQueryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse] - # A result object deserialized from the server's reply - def execute_dashboard_query request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_execute_dashboard_query_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: "execute_dashboard_query", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse.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 get_dashboard_query REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest] - # 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_dashboard_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dashboardQueries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the execute_dashboard_query REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_execute_dashboard_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dashboardQueries:execute", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb deleted file mode 100644 index f96c55661d70..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/dashboard_query_services_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/dashboard_query.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# 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 -# -# 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/chronicle/v1/dashboard_query_pb' - -module Google - module Cloud - module Chronicle - module V1 - module DashboardQueryService - # A service providing functionality for managing dashboards' queries. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.DashboardQueryService' - - # Get a dashboard query. - rpc :GetDashboardQuery, ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, ::Google::Cloud::Chronicle::V1::DashboardQuery - # Execute a query and return the data. - rpc :ExecuteDashboardQuery, ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb deleted file mode 100644 index cc6fd584534a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/data_access_control.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/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/chronicle/v1/data_access_control.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x01\n\x1c\x43reateDataAccessLabelRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12J\n\x11\x64\x61ta_access_label\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_label_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\x9b\x01\n\x1bListDataAccessLabelsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x1cListDataAccessLabelsResponse\x12\x46\n\x12\x64\x61ta_access_labels\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x1cUpdateDataAccessLabelRequest\x12J\n\x11\x64\x61ta_access_label\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\xcf\x01\n\x1c\x43reateDataAccessScopeRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12J\n\x11\x64\x61ta_access_scope\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_scope_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\x9b\x01\n\x1bListDataAccessScopesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd3\x01\n\x1cListDataAccessScopesResponse\x12\x46\n\x12\x64\x61ta_access_scopes\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScope\x12-\n global_data_access_scope_granted\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB#\n!_global_data_access_scope_granted\"\x9b\x01\n\x1cUpdateDataAccessScopeRequest\x12J\n\x11\x64\x61ta_access_scope\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\xd5\x03\n\x0f\x44\x61taAccessLabel\x12\x13\n\tudm_query\x18\x03 \x01(\tH\x00\x12;\n\x04name\x18\x01 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessLabel\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}B\x0c\n\ndefinition\"\x88\x05\n\x0f\x44\x61taAccessScope\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12\\\n\x1a\x61llowed_data_access_labels\x18\x02 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12[\n\x19\x64\x65nied_data_access_labels\x18\x03 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tallow_all\x18\n \x01(\x08\x42\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessScope\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}\"\xd0\x01\n\x18\x44\x61taAccessLabelReference\x12\x1b\n\x11\x64\x61ta_access_label\x18\x01 \x01(\tH\x00\x12\x12\n\x08log_type\x18\x02 \x01(\tH\x00\x12\x19\n\x0f\x61sset_namespace\x18\x03 \x01(\tH\x00\x12\x44\n\x0fingestion_label\x18\x04 \x01(\x0b\x32).google.cloud.chronicle.v1.IngestionLabelH\x00\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x42\x07\n\x05label\"V\n\x0eIngestionLabel\x12 \n\x13ingestion_label_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15ingestion_label_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xe6\x12\n\x18\x44\x61taAccessControlService\x12\x8a\x02\n\x15\x43reateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.CreateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8b\x01\xda\x41-parent,data_access_label,data_access_label_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels:\x11\x64\x61ta_access_label\x12\xc7\x01\n\x12GetDataAccessLabel\x12\x34.google.cloud.chronicle.v1.GetDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\xda\x01\n\x14ListDataAccessLabels\x12\x36.google.cloud.chronicle.v1.ListDataAccessLabelsRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessLabelsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels\x12\x8c\x02\n\x15UpdateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_label,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_label.name=projects/*/locations/*/instances/*/dataAccessLabels/*}:\x11\x64\x61ta_access_label\x12\xb9\x01\n\x15\x44\x65leteDataAccessLabel\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessLabelRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\x8a\x02\n\x15\x43reateDataAccessScope\x12\x37.google.cloud.chronicle.v1.CreateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8b\x01\xda\x41-parent,data_access_scope,data_access_scope_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes:\x11\x64\x61ta_access_scope\x12\xc7\x01\n\x12GetDataAccessScope\x12\x34.google.cloud.chronicle.v1.GetDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x12\xda\x01\n\x14ListDataAccessScopes\x12\x36.google.cloud.chronicle.v1.ListDataAccessScopesRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessScopesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes\x12\x8c\x02\n\x15UpdateDataAccessScope\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_scope,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_scope.name=projects/*/locations/*/instances/*/dataAccessScopes/*}:\x11\x64\x61ta_access_scope\x12\xb9\x01\n\x15\x44\x65leteDataAccessScope\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessScopeRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0f\x44\x61taAccessProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - CreateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessLabelRequest").msgclass - GetDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessLabelRequest").msgclass - ListDataAccessLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsRequest").msgclass - ListDataAccessLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsResponse").msgclass - UpdateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessLabelRequest").msgclass - DeleteDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessLabelRequest").msgclass - CreateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessScopeRequest").msgclass - GetDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessScopeRequest").msgclass - ListDataAccessScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesRequest").msgclass - ListDataAccessScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesResponse").msgclass - UpdateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessScopeRequest").msgclass - DeleteDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessScopeRequest").msgclass - DataAccessLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabel").msgclass - DataAccessScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessScope").msgclass - DataAccessLabelReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabelReference").msgclass - IngestionLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.IngestionLabel").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb deleted file mode 100644 index 7001b817d96a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/data_access_control_service/credentials" -require "google/cloud/chronicle/v1/data_access_control_service/paths" -require "google/cloud/chronicle/v1/data_access_control_service/client" -require "google/cloud/chronicle/v1/data_access_control_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/data_access_control_service" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/data_access_control_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - module DataAccessControlService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_access_control_service", "helpers.rb" -require "google/cloud/chronicle/v1/data_access_control_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb deleted file mode 100644 index 06ae3041cf1e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb +++ /dev/null @@ -1,1431 +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/chronicle/v1/data_access_control_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - ## - # Client for the DataAccessControlService service. - # - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_access_control_service_stub - - ## - # Configure the DataAccessControlService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataAccessControlService clients - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] - 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_data_access_label.timeout = 60.0 - - default_config.rpcs.get_data_access_label.timeout = 60.0 - default_config.rpcs.get_data_access_label.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_labels.timeout = 60.0 - default_config.rpcs.list_data_access_labels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_label.timeout = 60.0 - - default_config.rpcs.delete_data_access_label.timeout = 60.0 - - default_config.rpcs.create_data_access_scope.timeout = 60.0 - - default_config.rpcs.get_data_access_scope.timeout = 60.0 - default_config.rpcs.get_data_access_scope.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_scopes.timeout = 60.0 - default_config.rpcs.list_data_access_scopes.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_scope.timeout = 60.0 - - default_config.rpcs.delete_data_access_scope.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 - @data_access_control_service_stub.universe_domain - end - - ## - # Create a new DataAccessControlService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataAccessControlService 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/chronicle/v1/data_access_control_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 - - @data_access_control_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::DataAccessControlService::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 - ) - - @data_access_control_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_access_control_service_stub.logger - end - - # Service calls - - ## - # Creates a data access label. - # Data access labels are applied to incoming event data and selected in data - # access scopes (another resource), and only users with scopes containing the - # label can see data with that label. Currently, the data access label - # resource only includes custom labels, which are labels that correspond - # to UDM queries over event data. - # - # @overload create_data_access_label(request, options = nil) - # Pass arguments to `create_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) - # Pass arguments to `create_data_access_label` 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 parent resource where this Data Access Label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. Data access label to create. - # @param data_access_label_id [::String] - # Required. The ID to use for the data access label, which will become the - # label's display name and the final component of the label's resource name. - # The maximum number of characters should be 63. Regex pattern is as per AIP: - # https://google.aip.dev/122#resource-id-segments - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new - # - # # Call the create_data_access_label method. - # result = client.create_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def create_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :create_data_access_label, 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 data access label. - # - # @overload get_data_access_label(request, options = nil) - # Pass arguments to `get_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::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_data_access_label(name: nil) - # Pass arguments to `get_data_access_label` 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 ID of the data access label to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new - # - # # Call the get_data_access_label method. - # result = client.get_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def get_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :get_data_access_label, 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 all data access labels for the customer. - # - # @overload list_data_access_labels(request, options = nil) - # Pass arguments to `list_data_access_labels` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_labels` 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 parent resource where this data access label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access labels to return. The service may return - # fewer than this value. If unspecified, at most 100 data access labels will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessLabelsRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessLabel and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new - # - # # Call the list_data_access_labels method. - # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. - # p item - # end - # - def list_data_access_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest - - # 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_data_access_labels.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::Chronicle::V1::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_data_access_labels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_access_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :list_data_access_labels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, 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 data access label. - # - # @overload update_data_access_label(request, options = nil) - # Pass arguments to `update_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::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_data_access_label(data_access_label: nil, update_mask: nil) - # Pass arguments to `update_data_access_label` 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 data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. The data access label to update. - # - # The label's `name` field is used to identify the label to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description and definition - # fields are supported for update; an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new - # - # # Call the update_data_access_label method. - # result = client.update_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def update_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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.data_access_label&.name - header_params["data_access_label.name"] = request.data_access_label.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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :update_data_access_label, 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 data access label. When a label is deleted, new - # data that enters in the system will not receive the label, but the label - # will not be removed from old data that still refers to it. - # - # @overload delete_data_access_label(request, options = nil) - # Pass arguments to `delete_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::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_data_access_label(name: nil) - # Pass arguments to `delete_data_access_label` 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 ID of the data access label to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new - # - # # Call the delete_data_access_label method. - # result = client.delete_data_access_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :delete_data_access_label, 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 data access scope. - # Data access scope is a combination of allowed and denied labels attached - # to a permission group. If a scope has allowed labels A and B and denied - # labels C and D, then the group of people attached to the scope - # will have permissions to see all events labeled with A or B (or both) and - # not labeled with either C or D. - # - # @overload create_data_access_scope(request, options = nil) - # Pass arguments to `create_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) - # Pass arguments to `create_data_access_scope` 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 parent resource where this Data Access Scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. Data access scope to create. - # @param data_access_scope_id [::String] - # Required. The user provided scope id which will become the last part of the - # name of the scope resource. Needs to be compliant with - # https://google.aip.dev/122 - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new - # - # # Call the create_data_access_scope method. - # result = client.create_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def create_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :create_data_access_scope, 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 - - ## - # Retrieves an existing data access scope. - # - # @overload get_data_access_scope(request, options = nil) - # Pass arguments to `get_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::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_data_access_scope(name: nil) - # Pass arguments to `get_data_access_scope` 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 ID of the data access scope to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new - # - # # Call the get_data_access_scope method. - # result = client.get_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def get_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :get_data_access_scope, 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 all existing data access scopes for the customer. - # - # @overload list_data_access_scopes(request, options = nil) - # Pass arguments to `list_data_access_scopes` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_scopes` 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 parent resource where this data access scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access scopes to return. The service may return - # fewer than this value. If unspecified, at most 100 data access scopes will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessScopesRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessScope and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new - # - # # Call the list_data_access_scopes method. - # result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. - # p item - # end - # - def list_data_access_scopes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest - - # 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_data_access_scopes.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::Chronicle::V1::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_data_access_scopes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_access_scopes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :list_data_access_scopes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_scopes, 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 data access scope. - # - # @overload update_data_access_scope(request, options = nil) - # Pass arguments to `update_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::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_data_access_scope(data_access_scope: nil, update_mask: nil) - # Pass arguments to `update_data_access_scope` 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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. The data access scope to update. - # - # The scope's `name` field is used to identify the scope to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description, the allowed - # and denied labels list fields are supported for update; - # an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new - # - # # Call the update_data_access_scope method. - # result = client.update_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def update_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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.data_access_scope&.name - header_params["data_access_scope.name"] = request.data_access_scope.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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :update_data_access_scope, 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 data access scope. - # - # @overload delete_data_access_scope(request, options = nil) - # Pass arguments to `delete_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::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_data_access_scope(name: nil) - # Pass arguments to `delete_data_access_scope` 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 ID of the data access scope to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new - # - # # Call the delete_data_access_scope method. - # result = client.delete_data_access_scope request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :delete_data_access_scope, 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 - - ## - # Configuration class for the DataAccessControlService API. - # - # This class represents the configuration for DataAccessControlService, - # 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::Chronicle::V1::DataAccessControlService::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_data_access_label to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.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::Chronicle::V1::DataAccessControlService::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. - # * `: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 = "chronicle.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 DataAccessControlService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_label - ## - # RPC-specific configuration for `get_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_label - ## - # RPC-specific configuration for `list_data_access_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_labels - ## - # RPC-specific configuration for `update_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_label - ## - # RPC-specific configuration for `delete_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_label - ## - # RPC-specific configuration for `create_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_scope - ## - # RPC-specific configuration for `get_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_scope - ## - # RPC-specific configuration for `list_data_access_scopes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_scopes - ## - # RPC-specific configuration for `update_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_scope - ## - # RPC-specific configuration for `delete_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_scope - - # @private - def initialize parent_rpcs = nil - create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label - @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config - get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label - @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config - list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels - @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config - update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label - @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config - delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label - @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config - create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope - @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config - get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope - @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config - list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes - @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config - update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope - @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config - delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope - @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb deleted file mode 100644 index 2e86b999c1a0..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - # Credentials for the DataAccessControlService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb deleted file mode 100644 index f3ec957a19df..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb +++ /dev/null @@ -1,94 +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 Chronicle - module V1 - module DataAccessControlService - # Path helper methods for the DataAccessControlService API. - module Paths - ## - # Create a fully-qualified DataAccessLabel resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_label [String] - # - # @return [::String] - def data_access_label_path project:, location:, instance:, data_access_label: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessLabels/#{data_access_label}" - end - - ## - # Create a fully-qualified DataAccessScope resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_scope [String] - # - # @return [::String] - def data_access_scope_path project:, location:, instance:, data_access_scope: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb deleted file mode 100644 index e93f75e06d2d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/data_access_control_service/credentials" -require "google/cloud/chronicle/v1/data_access_control_service/paths" -require "google/cloud/chronicle/v1/data_access_control_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/data_access_control_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - module DataAccessControlService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/data_access_control_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb deleted file mode 100644 index 88d1752de0f5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb +++ /dev/null @@ -1,1318 +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/chronicle/v1/data_access_control_pb" -require "google/cloud/chronicle/v1/data_access_control_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - module Rest - ## - # REST client for the DataAccessControlService service. - # - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_access_control_service_stub - - ## - # Configure the DataAccessControlService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataAccessControlService clients - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] - 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_data_access_label.timeout = 60.0 - - default_config.rpcs.get_data_access_label.timeout = 60.0 - default_config.rpcs.get_data_access_label.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_labels.timeout = 60.0 - default_config.rpcs.list_data_access_labels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_label.timeout = 60.0 - - default_config.rpcs.delete_data_access_label.timeout = 60.0 - - default_config.rpcs.create_data_access_scope.timeout = 60.0 - - default_config.rpcs.get_data_access_scope.timeout = 60.0 - default_config.rpcs.get_data_access_scope.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_scopes.timeout = 60.0 - default_config.rpcs.list_data_access_scopes.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_scope.timeout = 60.0 - - default_config.rpcs.delete_data_access_scope.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 - @data_access_control_service_stub.universe_domain - end - - ## - # Create a new DataAccessControlService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataAccessControlService 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 - - @data_access_control_service_stub = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_access_control_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_access_control_service_stub.logger - end - - # Service calls - - ## - # Creates a data access label. - # Data access labels are applied to incoming event data and selected in data - # access scopes (another resource), and only users with scopes containing the - # label can see data with that label. Currently, the data access label - # resource only includes custom labels, which are labels that correspond - # to UDM queries over event data. - # - # @overload create_data_access_label(request, options = nil) - # Pass arguments to `create_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) - # Pass arguments to `create_data_access_label` 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 parent resource where this Data Access Label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. Data access label to create. - # @param data_access_label_id [::String] - # Required. The ID to use for the data access label, which will become the - # label's display name and the final component of the label's resource name. - # The maximum number of characters should be 63. Regex pattern is as per AIP: - # https://google.aip.dev/122#resource-id-segments - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new - # - # # Call the create_data_access_label method. - # result = client.create_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def create_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.create_data_access_label 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 data access label. - # - # @overload get_data_access_label(request, options = nil) - # Pass arguments to `get_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::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_data_access_label(name: nil) - # Pass arguments to `get_data_access_label` 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 ID of the data access label to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new - # - # # Call the get_data_access_label method. - # result = client.get_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def get_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.get_data_access_label 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 all data access labels for the customer. - # - # @overload list_data_access_labels(request, options = nil) - # Pass arguments to `list_data_access_labels` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_labels` 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 parent resource where this data access label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access labels to return. The service may return - # fewer than this value. If unspecified, at most 100 data access labels will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessLabelsRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessLabel and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new - # - # # Call the list_data_access_labels method. - # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. - # p item - # end - # - def list_data_access_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest - - # 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_data_access_labels.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::Chronicle::V1::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_data_access_labels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_access_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.list_data_access_labels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, "data_access_labels", 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 data access label. - # - # @overload update_data_access_label(request, options = nil) - # Pass arguments to `update_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::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_data_access_label(data_access_label: nil, update_mask: nil) - # Pass arguments to `update_data_access_label` 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 data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. The data access label to update. - # - # The label's `name` field is used to identify the label to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description and definition - # fields are supported for update; an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new - # - # # Call the update_data_access_label method. - # result = client.update_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def update_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.update_data_access_label 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 data access label. When a label is deleted, new - # data that enters in the system will not receive the label, but the label - # will not be removed from old data that still refers to it. - # - # @overload delete_data_access_label(request, options = nil) - # Pass arguments to `delete_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::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_data_access_label(name: nil) - # Pass arguments to `delete_data_access_label` 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 ID of the data access label to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new - # - # # Call the delete_data_access_label method. - # result = client.delete_data_access_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest - - # 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_data_access_label.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::Chronicle::V1::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.delete_data_access_label 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 data access scope. - # Data access scope is a combination of allowed and denied labels attached - # to a permission group. If a scope has allowed labels A and B and denied - # labels C and D, then the group of people attached to the scope - # will have permissions to see all events labeled with A or B (or both) and - # not labeled with either C or D. - # - # @overload create_data_access_scope(request, options = nil) - # Pass arguments to `create_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) - # Pass arguments to `create_data_access_scope` 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 parent resource where this Data Access Scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. Data access scope to create. - # @param data_access_scope_id [::String] - # Required. The user provided scope id which will become the last part of the - # name of the scope resource. Needs to be compliant with - # https://google.aip.dev/122 - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new - # - # # Call the create_data_access_scope method. - # result = client.create_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def create_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.create_data_access_scope 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 - - ## - # Retrieves an existing data access scope. - # - # @overload get_data_access_scope(request, options = nil) - # Pass arguments to `get_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::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_data_access_scope(name: nil) - # Pass arguments to `get_data_access_scope` 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 ID of the data access scope to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new - # - # # Call the get_data_access_scope method. - # result = client.get_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def get_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.get_data_access_scope 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 all existing data access scopes for the customer. - # - # @overload list_data_access_scopes(request, options = nil) - # Pass arguments to `list_data_access_scopes` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_scopes` 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 parent resource where this data access scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access scopes to return. The service may return - # fewer than this value. If unspecified, at most 100 data access scopes will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessScopesRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessScope and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new - # - # # Call the list_data_access_scopes method. - # result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. - # p item - # end - # - def list_data_access_scopes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest - - # 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_data_access_scopes.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::Chronicle::V1::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_data_access_scopes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_access_scopes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.list_data_access_scopes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_scopes, "data_access_scopes", 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 data access scope. - # - # @overload update_data_access_scope(request, options = nil) - # Pass arguments to `update_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::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_data_access_scope(data_access_scope: nil, update_mask: nil) - # Pass arguments to `update_data_access_scope` 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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. The data access scope to update. - # - # The scope's `name` field is used to identify the scope to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description, the allowed - # and denied labels list fields are supported for update; - # an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new - # - # # Call the update_data_access_scope method. - # result = client.update_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def update_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.update_data_access_scope 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 data access scope. - # - # @overload delete_data_access_scope(request, options = nil) - # Pass arguments to `delete_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::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_data_access_scope(name: nil) - # Pass arguments to `delete_data_access_scope` 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 ID of the data access scope to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new - # - # # Call the delete_data_access_scope method. - # result = client.delete_data_access_scope request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest - - # 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_data_access_scope.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::Chronicle::V1::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.delete_data_access_scope 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 - - ## - # Configuration class for the DataAccessControlService REST API. - # - # This class represents the configuration for DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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_data_access_label to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.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. - # * `: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 = "chronicle.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 DataAccessControlService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_label - ## - # RPC-specific configuration for `get_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_label - ## - # RPC-specific configuration for `list_data_access_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_labels - ## - # RPC-specific configuration for `update_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_label - ## - # RPC-specific configuration for `delete_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_label - ## - # RPC-specific configuration for `create_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_scope - ## - # RPC-specific configuration for `get_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_scope - ## - # RPC-specific configuration for `list_data_access_scopes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_scopes - ## - # RPC-specific configuration for `update_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_scope - ## - # RPC-specific configuration for `delete_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_scope - - # @private - def initialize parent_rpcs = nil - create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label - @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config - get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label - @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config - list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels - @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config - update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label - @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config - delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label - @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config - create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope - @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config - get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope - @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config - list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes - @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config - update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope - @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config - delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope - @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb deleted file mode 100644 index c11b9f42da29..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb +++ /dev/null @@ -1,695 +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/chronicle/v1/data_access_control_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - module Rest - ## - # REST service stub for the DataAccessControlService 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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] - # 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::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # A result object deserialized from the server's reply - def create_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_label_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_data_access_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] - # 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::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # A result object deserialized from the server's reply - def get_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_label_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_data_access_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_labels REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] - # 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::Chronicle::V1::ListDataAccessLabelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse] - # A result object deserialized from the server's reply - def list_data_access_labels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_labels_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_data_access_labels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] - # 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::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # A result object deserialized from the server's reply - def update_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_label_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_data_access_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] - # 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_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_label_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_data_access_label", - 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 create_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] - # 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::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # A result object deserialized from the server's reply - def create_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_scope_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_data_access_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] - # 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::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # A result object deserialized from the server's reply - def get_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_scope_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_data_access_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scopes REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] - # 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::Chronicle::V1::ListDataAccessScopesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse] - # A result object deserialized from the server's reply - def list_data_access_scopes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_scopes_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_data_access_scopes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] - # 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::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # A result object deserialized from the server's reply - def update_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_scope_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_data_access_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] - # 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_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_scope_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_data_access_scope", - 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 - - ## - # @private - # - # GRPC transcoding helper method for the create_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataAccessLabels", - body: "data_access_label", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_access_labels REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] - # 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_data_access_labels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataAccessLabels", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_access_label.name}", - body: "data_access_label", - matches: [ - ["data_access_label.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataAccessScopes", - body: "data_access_scope", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_access_scopes REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] - # 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_data_access_scopes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataAccessScopes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_access_scope.name}", - body: "data_access_scope", - matches: [ - ["data_access_scope.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb deleted file mode 100644 index 0ef90feac2fc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb +++ /dev/null @@ -1,76 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/data_access_control.proto for package 'Google.Cloud.Chronicle.V1' -# 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/chronicle/v1/data_access_control_pb' - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - # DataAccessControlService exposes resources and endpoints related to data - # access control. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.DataAccessControlService' - - # Creates a data access label. - # Data access labels are applied to incoming event data and selected in data - # access scopes (another resource), and only users with scopes containing the - # label can see data with that label. Currently, the data access label - # resource only includes custom labels, which are labels that correspond - # to UDM queries over event data. - rpc :CreateDataAccessLabel, ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel - # Gets a data access label. - rpc :GetDataAccessLabel, ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel - # Lists all data access labels for the customer. - rpc :ListDataAccessLabels, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse - # Updates a data access label. - rpc :UpdateDataAccessLabel, ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel - # Deletes a data access label. When a label is deleted, new - # data that enters in the system will not receive the label, but the label - # will not be removed from old data that still refers to it. - rpc :DeleteDataAccessLabel, ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::Google::Protobuf::Empty - # Creates a data access scope. - # Data access scope is a combination of allowed and denied labels attached - # to a permission group. If a scope has allowed labels A and B and denied - # labels C and D, then the group of people attached to the scope - # will have permissions to see all events labeled with A or B (or both) and - # not labeled with either C or D. - rpc :CreateDataAccessScope, ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope - # Retrieves an existing data access scope. - rpc :GetDataAccessScope, ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope - # Lists all existing data access scopes for the customer. - rpc :ListDataAccessScopes, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse - # Updates a data access scope. - rpc :UpdateDataAccessScope, ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope - # Deletes a data access scope. - rpc :DeleteDataAccessScope, ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb deleted file mode 100644 index 7b754fbc9e2a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/data_table.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/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n*google/cloud/chronicle/v1/data_table.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xaf\x01\n\x16\x43reateDataTableRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/DataTable\x12=\n\ndata_table\x18\x02 \x01(\x0b\x32$.google.cloud.chronicle.v1.DataTableB\x03\xe0\x41\x02\x12\x1a\n\rdata_table_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"O\n\x13GetDataTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/DataTable\"\x8d\x01\n\x16UpdateDataTableRequest\x12=\n\ndata_table\x18\x01 \x01(\x0b\x32$.google.cloud.chronicle.v1.DataTableB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x9b\x01\n\x15ListDataTablesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/DataTable\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\"f\n\x16\x44\x65leteDataTableRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/DataTable\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"l\n\x16ListDataTablesResponse\x12\x39\n\x0b\x64\x61ta_tables\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.DataTable\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa0\x01\n\x19\x43reateDataTableRowRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12\x44\n\x0e\x64\x61ta_table_row\x18\x02 \x01(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRowB\x03\xe0\x41\x02\"\x97\x01\n\x19UpdateDataTableRowRequest\x12\x44\n\x0e\x64\x61ta_table_row\x18\x01 \x01(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRowB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xb6\x01\n\x18ListDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"{\n\x19ListDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"U\n\x16GetDataTableRowRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%chronicle.googleapis.com/DataTableRow\"X\n\x19\x44\x65leteDataTableRowRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%chronicle.googleapis.com/DataTableRow\"\xac\x01\n\x1e\x42ulkCreateDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.CreateDataTableRowRequestB\x03\xe0\x41\x02\"c\n\x1f\x42ulkCreateDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xa6\x01\n\x1b\x42ulkGetDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12H\n\x08requests\x18\x02 \x03(\x0b\x32\x31.google.cloud.chronicle.v1.GetDataTableRowRequestB\x03\xe0\x41\x02\"`\n\x1c\x42ulkGetDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xad\x01\n\x1f\x42ulkReplaceDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.CreateDataTableRowRequestB\x03\xe0\x41\x02\"d\n BulkReplaceDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"\xac\x01\n\x1e\x42ulkUpdateDataTableRowsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%chronicle.googleapis.com/DataTableRow\x12K\n\x08requests\x18\x02 \x03(\x0b\x32\x34.google.cloud.chronicle.v1.UpdateDataTableRowRequestB\x03\xe0\x41\x02\"c\n\x1f\x42ulkUpdateDataTableRowsResponse\x12@\n\x0f\x64\x61ta_table_rows\x18\x01 \x03(\x0b\x32\'.google.cloud.chronicle.v1.DataTableRow\"b\n\x12\x44\x61taTableScopeInfo\x12L\n\x12\x64\x61ta_access_scopes\x18\x01 \x03(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\x99\x06\n\tDataTable\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0b\x63olumn_info\x18\x06 \x03(\x0b\x32..google.cloud.chronicle.v1.DataTableColumnInfoB\x03\xe0\x41\x05\x12\x1c\n\x0f\x64\x61ta_table_uuid\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05rules\x18\x08 \x03(\tB\x03\xe0\x41\x03\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x1d\n\x10row_time_to_live\x18\n \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15\x61pproximate_row_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12\x46\n\nscope_info\x18\x0c \x01(\x0b\x32-.google.cloud.chronicle.v1.DataTableScopeInfoB\x03\xe0\x41\x01\x12L\n\rupdate_source\x18\r \x01(\x0e\x32\x30.google.cloud.chronicle.v1.DataTableUpdateSourceB\x03\xe0\x41\x03\x12\x45\n\x1crow_time_to_live_update_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:\x95\x01\xea\x41\x91\x01\n\"chronicle.googleapis.com/DataTable\x12Tprojects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}*\ndataTables2\tdataTable\"\x81\x03\n\x0c\x44\x61taTableRow\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x13\n\x06values\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1d\n\x10row_time_to_live\x18\x05 \x01(\tB\x03\xe0\x41\x01:\xbd\x01\xea\x41\xb9\x01\n%chronicle.googleapis.com/DataTableRow\x12sprojects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}*\rdataTableRows2\x0c\x64\x61taTableRow\"\xfa\x02\n\x13\x44\x61taTableColumnInfo\x12\x1c\n\x12mapped_column_path\x18\x03 \x01(\tH\x00\x12Y\n\x0b\x63olumn_type\x18\x04 \x01(\x0e\x32\x42.google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnTypeH\x00\x12\x19\n\x0c\x63olumn_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1c\n\x0foriginal_column\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nkey_column\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0frepeated_values\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"j\n\x13\x44\x61taTableColumnType\x12&\n\"DATA_TABLE_COLUMN_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\t\n\x05REGEX\x10\x02\x12\x08\n\x04\x43IDR\x10\x03\x12\n\n\x06NUMBER\x10\x04\x42\x0e\n\x0cpath_or_type\"m\n\"GetDataTableOperationErrorsRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1chronicle.googleapis.com/DataTableOperationErrors\"\xb8\x02\n\x18\x44\x61taTableOperationErrors\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12&\n\nrpc_errors\x18\x03 \x03(\x0b\x32\x12.google.rpc.Status:\xe0\x01\xea\x41\xdc\x01\n1chronicle.googleapis.com/DataTableOperationErrors\x12sprojects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}*\x18\x64\x61taTableOperationErrors2\x18\x64\x61taTableOperationErrors*a\n\x15\x44\x61taTableUpdateSource\x12(\n$DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x08\n\x04RULE\x10\x02\x12\n\n\x06SEARCH\x10\x03\x32\x89\x1c\n\x10\x44\x61taTableService\x12\xdc\x01\n\x0f\x43reateDataTable\x12\x31.google.cloud.chronicle.v1.CreateDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"p\xda\x41\x1fparent,data_table,data_table_id\x82\xd3\xe4\x93\x02H\":/v1/{parent=projects/*/locations/*/instances/*}/dataTables:\ndata_table\x12\xc2\x01\n\x0eListDataTables\x12\x30.google.cloud.chronicle.v1.ListDataTablesRequest\x1a\x31.google.cloud.chronicle.v1.ListDataTablesResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/dataTables\x12\xaf\x01\n\x0cGetDataTable\x12..google.cloud.chronicle.v1.GetDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/dataTables/*}\x12\xde\x01\n\x0fUpdateDataTable\x12\x31.google.cloud.chronicle.v1.UpdateDataTableRequest\x1a$.google.cloud.chronicle.v1.DataTable\"r\xda\x41\x16\x64\x61ta_table,update_mask\x82\xd3\xe4\x93\x02S2E/v1/{data_table.name=projects/*/locations/*/instances/*/dataTables/*}:\ndata_table\x12\xad\x01\n\x0f\x44\x65leteDataTable\x12\x31.google.cloud.chronicle.v1.DeleteDataTableRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\nname,force\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/dataTables/*}\x12\xef\x01\n\x12\x43reateDataTableRow\x12\x34.google.cloud.chronicle.v1.CreateDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"z\xda\x41\x15parent,data_table_row\x82\xd3\xe4\x93\x02\\\"J/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:\x0e\x64\x61ta_table_row\x12\x84\x02\n\x12UpdateDataTableRow\x12\x34.google.cloud.chronicle.v1.UpdateDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"\x8e\x01\xda\x41\x1a\x64\x61ta_table_row,update_mask\x82\xd3\xe4\x93\x02k2Y/v1/{data_table_row.name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}:\x0e\x64\x61ta_table_row\x12\xdb\x01\n\x11ListDataTableRows\x12\x33.google.cloud.chronicle.v1.ListDataTableRowsRequest\x1a\x34.google.cloud.chronicle.v1.ListDataTableRowsResponse\"[\xda\x41\x06parent\x82\xd3\xe4\x93\x02L\x12J/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows\x12\xc8\x01\n\x0fGetDataTableRow\x12\x31.google.cloud.chronicle.v1.GetDataTableRowRequest\x1a\'.google.cloud.chronicle.v1.DataTableRow\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L\x12J/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}\x12\xbd\x01\n\x12\x44\x65leteDataTableRow\x12\x34.google.cloud.chronicle.v1.DeleteDataTableRowRequest\x1a\x16.google.protobuf.Empty\"Y\xda\x41\x04name\x82\xd3\xe4\x93\x02L*J/v1/{name=projects/*/locations/*/instances/*/dataTables/*/dataTableRows/*}\x12\x84\x02\n\x17\x42ulkCreateDataTableRows\x12\x39.google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest\x1a:.google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse\"r\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02Z\"U/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkCreate:\x01*\x12\xf8\x01\n\x14\x42ulkGetDataTableRows\x12\x36.google.cloud.chronicle.v1.BulkGetDataTableRowsRequest\x1a\x37.google.cloud.chronicle.v1.BulkGetDataTableRowsResponse\"o\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02W\"R/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkGet:\x01*\x12\x88\x02\n\x18\x42ulkReplaceDataTableRows\x12:.google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest\x1a;.google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse\"s\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02[\"V/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkReplace:\x01*\x12\x84\x02\n\x17\x42ulkUpdateDataTableRows\x12\x39.google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest\x1a:.google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse\"r\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02Z\"U/v1/{parent=projects/*/locations/*/instances/*/dataTables/*}/dataTableRows:bulkUpdate:\x01*\x12\xea\x01\n\x1bGetDataTableOperationErrors\x12=.google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest\x1a\x33.google.cloud.chronicle.v1.DataTableOperationErrors\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\x12H/v1/{name=projects/*/locations/*/instances/*/dataTableOperationErrors/*}\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xc5\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0e\x44\x61taTableProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - CreateDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataTableRequest").msgclass - GetDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableRequest").msgclass - UpdateDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataTableRequest").msgclass - ListDataTablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTablesRequest").msgclass - DeleteDataTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataTableRequest").msgclass - ListDataTablesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTablesResponse").msgclass - CreateDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataTableRowRequest").msgclass - UpdateDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataTableRowRequest").msgclass - ListDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTableRowsRequest").msgclass - ListDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataTableRowsResponse").msgclass - GetDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableRowRequest").msgclass - DeleteDataTableRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataTableRowRequest").msgclass - BulkCreateDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkCreateDataTableRowsRequest").msgclass - BulkCreateDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkCreateDataTableRowsResponse").msgclass - BulkGetDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkGetDataTableRowsRequest").msgclass - BulkGetDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkGetDataTableRowsResponse").msgclass - BulkReplaceDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkReplaceDataTableRowsRequest").msgclass - BulkReplaceDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkReplaceDataTableRowsResponse").msgclass - BulkUpdateDataTableRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkUpdateDataTableRowsRequest").msgclass - BulkUpdateDataTableRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.BulkUpdateDataTableRowsResponse").msgclass - DataTableScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableScopeInfo").msgclass - DataTable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTable").msgclass - DataTableRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableRow").msgclass - DataTableColumnInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableColumnInfo").msgclass - DataTableColumnInfo::DataTableColumnType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableColumnInfo.DataTableColumnType").enummodule - GetDataTableOperationErrorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataTableOperationErrorsRequest").msgclass - DataTableOperationErrors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableOperationErrors").msgclass - DataTableUpdateSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataTableUpdateSource").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.rb deleted file mode 100644 index db30ac0f8aa8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/data_table_service/credentials" -require "google/cloud/chronicle/v1/data_table_service/paths" -require "google/cloud/chronicle/v1/data_table_service/client" -require "google/cloud/chronicle/v1/data_table_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # DataTableManager provides an interface for managing data tables. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/data_table_service" - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/data_table_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - module DataTableService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_table_service", "helpers.rb" -require "google/cloud/chronicle/v1/data_table_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb deleted file mode 100644 index 9575eeb78010..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/client.rb +++ /dev/null @@ -1,1915 +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/chronicle/v1/data_table_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DataTableService - ## - # Client for the DataTableService service. - # - # DataTableManager provides an interface for managing data tables. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_table_service_stub - - ## - # Configure the DataTableService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DataTableService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTableService clients - # ::Google::Cloud::Chronicle::V1::DataTableService::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", "Chronicle", "V1"] - 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_data_table.timeout = 600.0 - - default_config.rpcs.list_data_tables.timeout = 600.0 - default_config.rpcs.list_data_tables.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_table.timeout = 600.0 - default_config.rpcs.get_data_table.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_table.timeout = 600.0 - - default_config.rpcs.delete_data_table.timeout = 600.0 - - default_config.rpcs.create_data_table_row.timeout = 600.0 - - default_config.rpcs.update_data_table_row.timeout = 600.0 - - default_config.rpcs.list_data_table_rows.timeout = 600.0 - default_config.rpcs.list_data_table_rows.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_table_row.timeout = 600.0 - default_config.rpcs.get_data_table_row.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_data_table_row.timeout = 600.0 - - default_config.rpcs.bulk_create_data_table_rows.timeout = 600.0 - - default_config.rpcs.bulk_get_data_table_rows.timeout = 600.0 - default_config.rpcs.bulk_get_data_table_rows.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.bulk_replace_data_table_rows.timeout = 600.0 - - default_config.rpcs.bulk_update_data_table_rows.timeout = 600.0 - - default_config.rpcs.get_data_table_operation_errors.timeout = 600.0 - default_config.rpcs.get_data_table_operation_errors.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTableService 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::Chronicle::V1::DataTableService::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 - @data_table_service_stub.universe_domain - end - - ## - # Create a new DataTableService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTableService 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/chronicle/v1/data_table_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 - - @data_table_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::DataTableService::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 - ) - - @data_table_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_table_service_stub.logger - end - - # Service calls - - ## - # Create a new data table. - # - # @overload create_data_table(request, options = nil) - # Pass arguments to `create_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::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_data_table(parent: nil, data_table: nil, data_table_id: nil) - # Pass arguments to `create_data_table` 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 parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] - # Required. The data table being created. - # @param data_table_id [::String] - # Required. The ID to use for the data table. This is also the display name - # for the data table. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Must be unique and has length < 256. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new - # - # # Call the create_data_table method. - # result = client.create_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def create_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :create_data_table, 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 - - ## - # List data tables. - # - # @overload list_data_tables(request, options = nil) - # Pass arguments to `list_data_tables` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataTablesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::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_data_tables(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_data_tables` 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 parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param page_size [::Integer] - # Optional. The maximum number of data tables to return. The service may - # return fewer than this value. If unspecified, at most 100 data tables will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataTables` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to - # `ListDataTables` must match the call that provided the page - # token. - # @param order_by [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new - # - # # Call the list_data_tables method. - # result = client.list_data_tables 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::Chronicle::V1::DataTable. - # p item - # end - # - def list_data_tables request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTablesRequest - - # 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_data_tables.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::Chronicle::V1::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_data_tables.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_tables.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :list_data_tables, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_table_service_stub, :list_data_tables, 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 - - ## - # Get data table info. - # - # @overload get_data_table(request, options = nil) - # Pass arguments to `get_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::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_data_table(name: nil) - # Pass arguments to `get_data_table` 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 data table to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new - # - # # Call the get_data_table method. - # result = client.get_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def get_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :get_data_table, 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 - - ## - # Update data table. - # - # @overload update_data_table(request, options = nil) - # Pass arguments to `update_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::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_data_table(data_table: nil, update_mask: nil) - # Pass arguments to `update_data_table` 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 data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] - # Required. This field is used to identify the datatable to update. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of metadata fields to update. Currently data tables only - # support updating the `description`, `row_time_to_live` and `scope_info` - # fields. When no field mask is supplied, all non-empty fields will be - # updated. A field mask of "*" will update all fields, whether empty or not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new - # - # # Call the update_data_table method. - # result = client.update_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def update_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest - - # 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_data_table.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::Chronicle::V1::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.data_table&.name - header_params["data_table.name"] = request.data_table.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_data_table.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :update_data_table, 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 - - ## - # Delete data table. - # - # @overload delete_data_table(request, options = nil) - # Pass arguments to `delete_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::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_data_table(name: nil, force: nil) - # Pass arguments to `delete_data_table` 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 data table to delete. - # Format - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - # @param force [::Boolean] - # Optional. If set to true, any rows under this data table will also be - # deleted. (Otherwise, the request will only work if the data table has no - # rows.) - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new - # - # # Call the delete_data_table method. - # result = client.delete_data_table request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :delete_data_table, 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 - - ## - # Create a new data table row. - # - # @overload create_data_table_row(request, options = nil) - # Pass arguments to `create_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::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_data_table_row(parent: nil, data_table_row: nil) - # Pass arguments to `create_data_table_row` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] - # Required. The data table row to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new - # - # # Call the create_data_table_row method. - # result = client.create_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def create_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :create_data_table_row, 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 - - ## - # Update data table row - # - # @overload update_data_table_row(request, options = nil) - # Pass arguments to `update_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::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_data_table_row(data_table_row: nil, update_mask: nil) - # Pass arguments to `update_data_table_row` 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 data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] - # Required. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. Currently data table rows only - # support updating the `values` field. When no field mask is supplied, all - # non-empty fields will be updated. A field mask of "*" will update all - # fields, whether empty or not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new - # - # # Call the update_data_table_row method. - # result = client.update_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def update_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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.data_table_row&.name - header_params["data_table_row.name"] = request.data_table_row.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_data_table_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :update_data_table_row, 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 - - ## - # List data table rows. - # - # @overload list_data_table_rows(request, options = nil) - # Pass arguments to `list_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::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_data_table_rows(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_data_table_rows` 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 id of the data table. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @param page_size [::Integer] - # Optional. The maximum number of data table rows to return. The service may - # return fewer than this value. If unspecified, at most 100 data table rows - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataTableRows` call. - # @param order_by [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - # @param filter [::String] - # Optional. Filter facilitating search over data table rows. This filter - # performs a case-insensitive substring match on the row values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new - # - # # Call the list_data_table_rows method. - # result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. - # p item - # end - # - def list_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest - - # 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_data_table_rows.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::Chronicle::V1::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_data_table_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :list_data_table_rows, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_table_service_stub, :list_data_table_rows, 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 - - ## - # Get data table row - # - # @overload get_data_table_row(request, options = nil) - # Pass arguments to `get_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::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_data_table_row(name: nil) - # Pass arguments to `get_data_table_row` 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 data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new - # - # # Call the get_data_table_row method. - # result = client.get_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def get_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :get_data_table_row, 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 - - ## - # Delete data table row. - # - # @overload delete_data_table_row(request, options = nil) - # Pass arguments to `delete_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::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_data_table_row(name: nil) - # Pass arguments to `delete_data_table_row` 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 data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new - # - # # Call the delete_data_table_row method. - # result = client.delete_data_table_row request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :delete_data_table_row, 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 - - ## - # Create data table rows in bulk. - # - # @overload bulk_create_data_table_rows(request, options = nil) - # Pass arguments to `bulk_create_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::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 bulk_create_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_create_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] - # Required. Data table rows to create. A maximum of 1000 rows (for sync - # requests) or 2000 rows (for async requests) can be created in a single - # request. Total size of the rows should be less than 4MB. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new - # - # # Call the bulk_create_data_table_rows method. - # result = client.bulk_create_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. - # p result - # - def bulk_create_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest - - # 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.bulk_create_data_table_rows.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::Chronicle::V1::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.bulk_create_data_table_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_create_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :bulk_create_data_table_rows, 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 - - ## - # Get data table rows in bulk. - # - # @overload bulk_get_data_table_rows(request, options = nil) - # Pass arguments to `bulk_get_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::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 bulk_get_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_get_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Hash>] - # Required. Data table rows to get. At max 1,000 rows can be there in a - # request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new - # - # # Call the bulk_get_data_table_rows method. - # result = client.bulk_get_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. - # p result - # - def bulk_get_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest - - # 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.bulk_get_data_table_rows.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::Chronicle::V1::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.bulk_get_data_table_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_get_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :bulk_get_data_table_rows, 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 - - ## - # Replace all existing data table rows with new data table rows. - # - # @overload bulk_replace_data_table_rows(request, options = nil) - # Pass arguments to `bulk_replace_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::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 bulk_replace_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_replace_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] - # Required. Data table rows to replace the existing data table rows. A - # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) - # can be replaced in a single request. Total size of the rows should be less - # than 4MB. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new - # - # # Call the bulk_replace_data_table_rows method. - # result = client.bulk_replace_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. - # p result - # - def bulk_replace_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest - - # 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.bulk_replace_data_table_rows.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::Chronicle::V1::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.bulk_replace_data_table_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_replace_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :bulk_replace_data_table_rows, 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 - - ## - # Update data table rows in bulk. - # - # @overload bulk_update_data_table_rows(request, options = nil) - # Pass arguments to `bulk_update_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::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 bulk_update_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_update_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Hash>] - # Required. Data table rows to update. At max 1,000 rows (or rows with size - # less than 2MB) can be there in a request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new - # - # # Call the bulk_update_data_table_rows method. - # result = client.bulk_update_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. - # p result - # - def bulk_update_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest - - # 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.bulk_update_data_table_rows.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::Chronicle::V1::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.bulk_update_data_table_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_update_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :bulk_update_data_table_rows, 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 - - ## - # Get the error for a data table operation. - # - # @overload get_data_table_operation_errors(request, options = nil) - # Pass arguments to `get_data_table_operation_errors` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::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_data_table_operation_errors(name: nil) - # Pass arguments to `get_data_table_operation_errors` 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 data table operation errors. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new - # - # # Call the get_data_table_operation_errors method. - # result = client.get_data_table_operation_errors request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. - # p result - # - def get_data_table_operation_errors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest - - # 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_data_table_operation_errors.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::Chronicle::V1::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_data_table_operation_errors.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_table_operation_errors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.call_rpc :get_data_table_operation_errors, 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 - - ## - # Configuration class for the DataTableService API. - # - # This class represents the configuration for DataTableService, - # 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::Chronicle::V1::DataTableService::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_data_table to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DataTableService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_table.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_table.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::Chronicle::V1::DataTableService::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. - # * `: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 = "chronicle.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 DataTableService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_table - ## - # RPC-specific configuration for `list_data_tables` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_tables - ## - # RPC-specific configuration for `get_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table - ## - # RPC-specific configuration for `update_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_table - ## - # RPC-specific configuration for `delete_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_table - ## - # RPC-specific configuration for `create_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_table_row - ## - # RPC-specific configuration for `update_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_table_row - ## - # RPC-specific configuration for `list_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_table_rows - ## - # RPC-specific configuration for `get_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table_row - ## - # RPC-specific configuration for `delete_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_table_row - ## - # RPC-specific configuration for `bulk_create_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_create_data_table_rows - ## - # RPC-specific configuration for `bulk_get_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_get_data_table_rows - ## - # RPC-specific configuration for `bulk_replace_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_replace_data_table_rows - ## - # RPC-specific configuration for `bulk_update_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_update_data_table_rows - ## - # RPC-specific configuration for `get_data_table_operation_errors` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table_operation_errors - - # @private - def initialize parent_rpcs = nil - create_data_table_config = parent_rpcs.create_data_table if parent_rpcs.respond_to? :create_data_table - @create_data_table = ::Gapic::Config::Method.new create_data_table_config - list_data_tables_config = parent_rpcs.list_data_tables if parent_rpcs.respond_to? :list_data_tables - @list_data_tables = ::Gapic::Config::Method.new list_data_tables_config - get_data_table_config = parent_rpcs.get_data_table if parent_rpcs.respond_to? :get_data_table - @get_data_table = ::Gapic::Config::Method.new get_data_table_config - update_data_table_config = parent_rpcs.update_data_table if parent_rpcs.respond_to? :update_data_table - @update_data_table = ::Gapic::Config::Method.new update_data_table_config - delete_data_table_config = parent_rpcs.delete_data_table if parent_rpcs.respond_to? :delete_data_table - @delete_data_table = ::Gapic::Config::Method.new delete_data_table_config - create_data_table_row_config = parent_rpcs.create_data_table_row if parent_rpcs.respond_to? :create_data_table_row - @create_data_table_row = ::Gapic::Config::Method.new create_data_table_row_config - update_data_table_row_config = parent_rpcs.update_data_table_row if parent_rpcs.respond_to? :update_data_table_row - @update_data_table_row = ::Gapic::Config::Method.new update_data_table_row_config - list_data_table_rows_config = parent_rpcs.list_data_table_rows if parent_rpcs.respond_to? :list_data_table_rows - @list_data_table_rows = ::Gapic::Config::Method.new list_data_table_rows_config - get_data_table_row_config = parent_rpcs.get_data_table_row if parent_rpcs.respond_to? :get_data_table_row - @get_data_table_row = ::Gapic::Config::Method.new get_data_table_row_config - delete_data_table_row_config = parent_rpcs.delete_data_table_row if parent_rpcs.respond_to? :delete_data_table_row - @delete_data_table_row = ::Gapic::Config::Method.new delete_data_table_row_config - bulk_create_data_table_rows_config = parent_rpcs.bulk_create_data_table_rows if parent_rpcs.respond_to? :bulk_create_data_table_rows - @bulk_create_data_table_rows = ::Gapic::Config::Method.new bulk_create_data_table_rows_config - bulk_get_data_table_rows_config = parent_rpcs.bulk_get_data_table_rows if parent_rpcs.respond_to? :bulk_get_data_table_rows - @bulk_get_data_table_rows = ::Gapic::Config::Method.new bulk_get_data_table_rows_config - bulk_replace_data_table_rows_config = parent_rpcs.bulk_replace_data_table_rows if parent_rpcs.respond_to? :bulk_replace_data_table_rows - @bulk_replace_data_table_rows = ::Gapic::Config::Method.new bulk_replace_data_table_rows_config - bulk_update_data_table_rows_config = parent_rpcs.bulk_update_data_table_rows if parent_rpcs.respond_to? :bulk_update_data_table_rows - @bulk_update_data_table_rows = ::Gapic::Config::Method.new bulk_update_data_table_rows_config - get_data_table_operation_errors_config = parent_rpcs.get_data_table_operation_errors if parent_rpcs.respond_to? :get_data_table_operation_errors - @get_data_table_operation_errors = ::Gapic::Config::Method.new get_data_table_operation_errors_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb deleted file mode 100644 index 1ed772b14e1b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/credentials.rb +++ /dev/null @@ -1,49 +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 Chronicle - module V1 - module DataTableService - # Credentials for the DataTableService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/chronicle", - "https://www.googleapis.com/auth/chronicle.readonly", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb deleted file mode 100644 index 9d9e63d2bcae..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/paths.rb +++ /dev/null @@ -1,138 +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 Chronicle - module V1 - module DataTableService - # Path helper methods for the DataTableService API. - module Paths - ## - # Create a fully-qualified DataAccessScope resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_scope [String] - # - # @return [::String] - def data_access_scope_path project:, location:, instance:, data_access_scope: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" - end - - ## - # Create a fully-qualified DataTable resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_table [String] - # - # @return [::String] - def data_table_path project:, location:, instance:, data_table: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataTables/#{data_table}" - end - - ## - # Create a fully-qualified DataTableOperationErrors resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataTableOperationErrors/{data_table_operation_errors}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_table_operation_errors [String] - # - # @return [::String] - def data_table_operation_errors_path project:, location:, instance:, data_table_operation_errors: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataTableOperationErrors/#{data_table_operation_errors}" - end - - ## - # Create a fully-qualified DataTableRow resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataTables/{data_table}/dataTableRows/{data_table_row}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_table [String] - # @param data_table_row [String] - # - # @return [::String] - def data_table_row_path project:, location:, instance:, data_table:, data_table_row: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - raise ::ArgumentError, "data_table cannot contain /" if data_table.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataTables/#{data_table}/dataTableRows/#{data_table_row}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.rb deleted file mode 100644 index 9f355abee4eb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/data_table_service/credentials" -require "google/cloud/chronicle/v1/data_table_service/paths" -require "google/cloud/chronicle/v1/data_table_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # DataTableManager provides an interface for managing data tables. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/data_table_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - module DataTableService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/data_table_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb deleted file mode 100644 index 30ed96d59257..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/client.rb +++ /dev/null @@ -1,1767 +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/chronicle/v1/data_table_pb" -require "google/cloud/chronicle/v1/data_table_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module DataTableService - module Rest - ## - # REST client for the DataTableService service. - # - # DataTableManager provides an interface for managing data tables. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_table_service_stub - - ## - # Configure the DataTableService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTableService clients - # ::Google::Cloud::Chronicle::V1::DataTableService::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", "Chronicle", "V1"] - 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_data_table.timeout = 600.0 - - default_config.rpcs.list_data_tables.timeout = 600.0 - default_config.rpcs.list_data_tables.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_table.timeout = 600.0 - default_config.rpcs.get_data_table.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_table.timeout = 600.0 - - default_config.rpcs.delete_data_table.timeout = 600.0 - - default_config.rpcs.create_data_table_row.timeout = 600.0 - - default_config.rpcs.update_data_table_row.timeout = 600.0 - - default_config.rpcs.list_data_table_rows.timeout = 600.0 - default_config.rpcs.list_data_table_rows.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_table_row.timeout = 600.0 - default_config.rpcs.get_data_table_row.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_data_table_row.timeout = 600.0 - - default_config.rpcs.bulk_create_data_table_rows.timeout = 600.0 - - default_config.rpcs.bulk_get_data_table_rows.timeout = 600.0 - default_config.rpcs.bulk_get_data_table_rows.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.bulk_replace_data_table_rows.timeout = 600.0 - - default_config.rpcs.bulk_update_data_table_rows.timeout = 600.0 - - default_config.rpcs.get_data_table_operation_errors.timeout = 600.0 - default_config.rpcs.get_data_table_operation_errors.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTableService 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::Chronicle::V1::DataTableService::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 - @data_table_service_stub.universe_domain - end - - ## - # Create a new DataTableService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTableService 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 - - @data_table_service_stub = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_table_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_table_service_stub.logger - end - - # Service calls - - ## - # Create a new data table. - # - # @overload create_data_table(request, options = nil) - # Pass arguments to `create_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::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_data_table(parent: nil, data_table: nil, data_table_id: nil) - # Pass arguments to `create_data_table` 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 parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] - # Required. The data table being created. - # @param data_table_id [::String] - # Required. The ID to use for the data table. This is also the display name - # for the data table. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Must be unique and has length < 256. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new - # - # # Call the create_data_table method. - # result = client.create_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def create_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.create_data_table 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 - - ## - # List data tables. - # - # @overload list_data_tables(request, options = nil) - # Pass arguments to `list_data_tables` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataTablesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::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_data_tables(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_data_tables` 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 parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param page_size [::Integer] - # Optional. The maximum number of data tables to return. The service may - # return fewer than this value. If unspecified, at most 100 data tables will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataTables` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to - # `ListDataTables` must match the call that provided the page - # token. - # @param order_by [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTable>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new - # - # # Call the list_data_tables method. - # result = client.list_data_tables 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::Chronicle::V1::DataTable. - # p item - # end - # - def list_data_tables request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTablesRequest - - # 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_data_tables.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::Chronicle::V1::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_data_tables.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_tables.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.list_data_tables request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_table_service_stub, :list_data_tables, "data_tables", 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 - - ## - # Get data table info. - # - # @overload get_data_table(request, options = nil) - # Pass arguments to `get_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::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_data_table(name: nil) - # Pass arguments to `get_data_table` 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 data table to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new - # - # # Call the get_data_table method. - # result = client.get_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def get_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.get_data_table 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 - - ## - # Update data table. - # - # @overload update_data_table(request, options = nil) - # Pass arguments to `update_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::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_data_table(data_table: nil, update_mask: nil) - # Pass arguments to `update_data_table` 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 data_table [::Google::Cloud::Chronicle::V1::DataTable, ::Hash] - # Required. This field is used to identify the datatable to update. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of metadata fields to update. Currently data tables only - # support updating the `description`, `row_time_to_live` and `scope_info` - # fields. When no field mask is supplied, all non-empty fields will be - # updated. A field mask of "*" will update all fields, whether empty or not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new - # - # # Call the update_data_table method. - # result = client.update_data_table request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - # p result - # - def update_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.update_data_table 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 - - ## - # Delete data table. - # - # @overload delete_data_table(request, options = nil) - # Pass arguments to `delete_data_table` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataTableRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::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_data_table(name: nil, force: nil) - # Pass arguments to `delete_data_table` 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 data table to delete. - # Format - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - # @param force [::Boolean] - # Optional. If set to true, any rows under this data table will also be - # deleted. (Otherwise, the request will only work if the data table has no - # rows.) - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new - # - # # Call the delete_data_table method. - # result = client.delete_data_table request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_table request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest - - # 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_data_table.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::Chronicle::V1::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_data_table.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_table.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.delete_data_table 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 - - ## - # Create a new data table row. - # - # @overload create_data_table_row(request, options = nil) - # Pass arguments to `create_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::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_data_table_row(parent: nil, data_table_row: nil) - # Pass arguments to `create_data_table_row` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] - # Required. The data table row to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new - # - # # Call the create_data_table_row method. - # result = client.create_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def create_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.create_data_table_row 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 - - ## - # Update data table row - # - # @overload update_data_table_row(request, options = nil) - # Pass arguments to `update_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::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_data_table_row(data_table_row: nil, update_mask: nil) - # Pass arguments to `update_data_table_row` 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 data_table_row [::Google::Cloud::Chronicle::V1::DataTableRow, ::Hash] - # Required. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. Currently data table rows only - # support updating the `values` field. When no field mask is supplied, all - # non-empty fields will be updated. A field mask of "*" will update all - # fields, whether empty or not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new - # - # # Call the update_data_table_row method. - # result = client.update_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def update_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.update_data_table_row 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 - - ## - # List data table rows. - # - # @overload list_data_table_rows(request, options = nil) - # Pass arguments to `list_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::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_data_table_rows(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_data_table_rows` 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 id of the data table. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @param page_size [::Integer] - # Optional. The maximum number of data table rows to return. The service may - # return fewer than this value. If unspecified, at most 100 data table rows - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDataTableRows` call. - # @param order_by [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - # @param filter [::String] - # Optional. Filter facilitating search over data table rows. This filter - # performs a case-insensitive substring match on the row values. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataTableRow>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new - # - # # Call the list_data_table_rows method. - # result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. - # p item - # end - # - def list_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest - - # 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_data_table_rows.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::Chronicle::V1::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_data_table_rows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.list_data_table_rows request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_table_service_stub, :list_data_table_rows, "data_table_rows", 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 - - ## - # Get data table row - # - # @overload get_data_table_row(request, options = nil) - # Pass arguments to `get_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::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_data_table_row(name: nil) - # Pass arguments to `get_data_table_row` 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 data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new - # - # # Call the get_data_table_row method. - # result = client.get_data_table_row request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - # p result - # - def get_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.get_data_table_row 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 - - ## - # Delete data table row. - # - # @overload delete_data_table_row(request, options = nil) - # Pass arguments to `delete_data_table_row` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::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_data_table_row(name: nil) - # Pass arguments to `delete_data_table_row` 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 data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new - # - # # Call the delete_data_table_row method. - # result = client.delete_data_table_row request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_table_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest - - # 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_data_table_row.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::Chronicle::V1::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_data_table_row.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_table_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.delete_data_table_row 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 - - ## - # Create data table rows in bulk. - # - # @overload bulk_create_data_table_rows(request, options = nil) - # Pass arguments to `bulk_create_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::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 bulk_create_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_create_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] - # Required. Data table rows to create. A maximum of 1000 rows (for sync - # requests) or 2000 rows (for async requests) can be created in a single - # request. Total size of the rows should be less than 4MB. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new - # - # # Call the bulk_create_data_table_rows method. - # result = client.bulk_create_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. - # p result - # - def bulk_create_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest - - # 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.bulk_create_data_table_rows.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::Chronicle::V1::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.bulk_create_data_table_rows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_create_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.bulk_create_data_table_rows 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 - - ## - # Get data table rows in bulk. - # - # @overload bulk_get_data_table_rows(request, options = nil) - # Pass arguments to `bulk_get_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::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 bulk_get_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_get_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Hash>] - # Required. Data table rows to get. At max 1,000 rows can be there in a - # request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new - # - # # Call the bulk_get_data_table_rows method. - # result = client.bulk_get_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. - # p result - # - def bulk_get_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest - - # 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.bulk_get_data_table_rows.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::Chronicle::V1::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.bulk_get_data_table_rows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_get_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.bulk_get_data_table_rows 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 - - ## - # Replace all existing data table rows with new data table rows. - # - # @overload bulk_replace_data_table_rows(request, options = nil) - # Pass arguments to `bulk_replace_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::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 bulk_replace_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_replace_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Hash>] - # Required. Data table rows to replace the existing data table rows. A - # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) - # can be replaced in a single request. Total size of the rows should be less - # than 4MB. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new - # - # # Call the bulk_replace_data_table_rows method. - # result = client.bulk_replace_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. - # p result - # - def bulk_replace_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest - - # 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.bulk_replace_data_table_rows.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::Chronicle::V1::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.bulk_replace_data_table_rows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_replace_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.bulk_replace_data_table_rows 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 - - ## - # Update data table rows in bulk. - # - # @overload bulk_update_data_table_rows(request, options = nil) - # Pass arguments to `bulk_update_data_table_rows` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::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 bulk_update_data_table_rows(parent: nil, requests: nil) - # Pass arguments to `bulk_update_data_table_rows` 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 id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @param requests [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Hash>] - # Required. Data table rows to update. At max 1,000 rows (or rows with size - # less than 2MB) can be there in a request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new - # - # # Call the bulk_update_data_table_rows method. - # result = client.bulk_update_data_table_rows request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. - # p result - # - def bulk_update_data_table_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest - - # 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.bulk_update_data_table_rows.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::Chronicle::V1::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.bulk_update_data_table_rows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_update_data_table_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.bulk_update_data_table_rows 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 - - ## - # Get the error for a data table operation. - # - # @overload get_data_table_operation_errors(request, options = nil) - # Pass arguments to `get_data_table_operation_errors` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::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_data_table_operation_errors(name: nil) - # Pass arguments to `get_data_table_operation_errors` 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 data table operation errors. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new - # - # # Call the get_data_table_operation_errors method. - # result = client.get_data_table_operation_errors request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. - # p result - # - def get_data_table_operation_errors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest - - # 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_data_table_operation_errors.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::Chronicle::V1::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_data_table_operation_errors.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_table_operation_errors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_table_service_stub.get_data_table_operation_errors 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 - - ## - # Configuration class for the DataTableService REST API. - # - # This class represents the configuration for DataTableService 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::Chronicle::V1::DataTableService::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_data_table to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_table.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_table.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. - # * `: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 = "chronicle.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 DataTableService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_table - ## - # RPC-specific configuration for `list_data_tables` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_tables - ## - # RPC-specific configuration for `get_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table - ## - # RPC-specific configuration for `update_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_table - ## - # RPC-specific configuration for `delete_data_table` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_table - ## - # RPC-specific configuration for `create_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_table_row - ## - # RPC-specific configuration for `update_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_table_row - ## - # RPC-specific configuration for `list_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_table_rows - ## - # RPC-specific configuration for `get_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table_row - ## - # RPC-specific configuration for `delete_data_table_row` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_table_row - ## - # RPC-specific configuration for `bulk_create_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_create_data_table_rows - ## - # RPC-specific configuration for `bulk_get_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_get_data_table_rows - ## - # RPC-specific configuration for `bulk_replace_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_replace_data_table_rows - ## - # RPC-specific configuration for `bulk_update_data_table_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_update_data_table_rows - ## - # RPC-specific configuration for `get_data_table_operation_errors` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_table_operation_errors - - # @private - def initialize parent_rpcs = nil - create_data_table_config = parent_rpcs.create_data_table if parent_rpcs.respond_to? :create_data_table - @create_data_table = ::Gapic::Config::Method.new create_data_table_config - list_data_tables_config = parent_rpcs.list_data_tables if parent_rpcs.respond_to? :list_data_tables - @list_data_tables = ::Gapic::Config::Method.new list_data_tables_config - get_data_table_config = parent_rpcs.get_data_table if parent_rpcs.respond_to? :get_data_table - @get_data_table = ::Gapic::Config::Method.new get_data_table_config - update_data_table_config = parent_rpcs.update_data_table if parent_rpcs.respond_to? :update_data_table - @update_data_table = ::Gapic::Config::Method.new update_data_table_config - delete_data_table_config = parent_rpcs.delete_data_table if parent_rpcs.respond_to? :delete_data_table - @delete_data_table = ::Gapic::Config::Method.new delete_data_table_config - create_data_table_row_config = parent_rpcs.create_data_table_row if parent_rpcs.respond_to? :create_data_table_row - @create_data_table_row = ::Gapic::Config::Method.new create_data_table_row_config - update_data_table_row_config = parent_rpcs.update_data_table_row if parent_rpcs.respond_to? :update_data_table_row - @update_data_table_row = ::Gapic::Config::Method.new update_data_table_row_config - list_data_table_rows_config = parent_rpcs.list_data_table_rows if parent_rpcs.respond_to? :list_data_table_rows - @list_data_table_rows = ::Gapic::Config::Method.new list_data_table_rows_config - get_data_table_row_config = parent_rpcs.get_data_table_row if parent_rpcs.respond_to? :get_data_table_row - @get_data_table_row = ::Gapic::Config::Method.new get_data_table_row_config - delete_data_table_row_config = parent_rpcs.delete_data_table_row if parent_rpcs.respond_to? :delete_data_table_row - @delete_data_table_row = ::Gapic::Config::Method.new delete_data_table_row_config - bulk_create_data_table_rows_config = parent_rpcs.bulk_create_data_table_rows if parent_rpcs.respond_to? :bulk_create_data_table_rows - @bulk_create_data_table_rows = ::Gapic::Config::Method.new bulk_create_data_table_rows_config - bulk_get_data_table_rows_config = parent_rpcs.bulk_get_data_table_rows if parent_rpcs.respond_to? :bulk_get_data_table_rows - @bulk_get_data_table_rows = ::Gapic::Config::Method.new bulk_get_data_table_rows_config - bulk_replace_data_table_rows_config = parent_rpcs.bulk_replace_data_table_rows if parent_rpcs.respond_to? :bulk_replace_data_table_rows - @bulk_replace_data_table_rows = ::Gapic::Config::Method.new bulk_replace_data_table_rows_config - bulk_update_data_table_rows_config = parent_rpcs.bulk_update_data_table_rows if parent_rpcs.respond_to? :bulk_update_data_table_rows - @bulk_update_data_table_rows = ::Gapic::Config::Method.new bulk_update_data_table_rows_config - get_data_table_operation_errors_config = parent_rpcs.get_data_table_operation_errors if parent_rpcs.respond_to? :get_data_table_operation_errors - @get_data_table_operation_errors = ::Gapic::Config::Method.new get_data_table_operation_errors_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb deleted file mode 100644 index 110794e9d528..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_service/rest/service_stub.rb +++ /dev/null @@ -1,1004 +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/chronicle/v1/data_table_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DataTableService - module Rest - ## - # REST service stub for the DataTableService 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_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRequest] - # 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::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # A result object deserialized from the server's reply - def create_data_table request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_table_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_data_table", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_tables REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTablesRequest] - # 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::Chronicle::V1::ListDataTablesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListDataTablesResponse] - # A result object deserialized from the server's reply - def list_data_tables request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_tables_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_data_tables", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.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_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRequest] - # 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::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # A result object deserialized from the server's reply - def get_data_table request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_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_data_table", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest] - # 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::Chronicle::V1::DataTable] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # A result object deserialized from the server's reply - def update_data_table request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_table_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_data_table", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest] - # 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_data_table request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_table_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_data_table", - 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 create_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest] - # 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::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # A result object deserialized from the server's reply - def create_data_table_row request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_table_row_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_data_table_row", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest] - # 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::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # A result object deserialized from the server's reply - def update_data_table_row request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_table_row_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_data_table_row", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest] - # 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::Chronicle::V1::ListDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse] - # A result object deserialized from the server's reply - def list_data_table_rows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_table_rows_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_data_table_rows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.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_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest] - # 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::Chronicle::V1::DataTableRow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # A result object deserialized from the server's reply - def get_data_table_row request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_row_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_data_table_row", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest] - # 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_data_table_row request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_table_row_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_data_table_row", - 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 bulk_create_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest] - # 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::Chronicle::V1::BulkCreateDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse] - # A result object deserialized from the server's reply - def bulk_create_data_table_rows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_create_data_table_rows_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: "bulk_create_data_table_rows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the bulk_get_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest] - # 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::Chronicle::V1::BulkGetDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse] - # A result object deserialized from the server's reply - def bulk_get_data_table_rows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_get_data_table_rows_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: "bulk_get_data_table_rows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the bulk_replace_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest] - # 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::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse] - # A result object deserialized from the server's reply - def bulk_replace_data_table_rows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_replace_data_table_rows_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: "bulk_replace_data_table_rows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the bulk_update_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest] - # 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::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse] - # A result object deserialized from the server's reply - def bulk_update_data_table_rows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_update_data_table_rows_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: "bulk_update_data_table_rows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.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_data_table_operation_errors REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest] - # 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::Chronicle::V1::DataTableOperationErrors] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataTableOperationErrors] - # A result object deserialized from the server's reply - def get_data_table_operation_errors request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_table_operation_errors_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_data_table_operation_errors", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.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_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRequest] - # 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_data_table_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTables", - body: "data_table", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_tables REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTablesRequest] - # 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_data_tables_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataTables", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRequest] - # 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_data_table_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRequest] - # 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_data_table_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_table.name}", - body: "data_table", - matches: [ - ["data_table.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_table REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRequest] - # 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_data_table_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest] - # 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_data_table_row_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTableRows", - body: "data_table_row", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest] - # 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_data_table_row_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_table_row.name}", - body: "data_table_row", - matches: [ - ["data_table_row.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest] - # 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_data_table_rows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataTableRows", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableRowRequest] - # 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_data_table_row_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_table_row REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest] - # 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_data_table_row_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/dataTableRows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_create_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_create_data_table_rows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTableRows:bulkCreate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_get_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_get_data_table_rows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTableRows:bulkGet", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_replace_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_replace_data_table_rows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTableRows:bulkReplace", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_update_data_table_rows REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_update_data_table_rows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataTableRows:bulkUpdate", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTables/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_table_operation_errors REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest] - # 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_data_table_operation_errors_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataTableOperationErrors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb deleted file mode 100644 index 39896c092027..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_table_services_pb.rb +++ /dev/null @@ -1,73 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/data_table.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# 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 -# -# 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/chronicle/v1/data_table_pb' - -module Google - module Cloud - module Chronicle - module V1 - module DataTableService - # DataTableManager provides an interface for managing data tables. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.DataTableService' - - # Create a new data table. - rpc :CreateDataTable, ::Google::Cloud::Chronicle::V1::CreateDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable - # List data tables. - rpc :ListDataTables, ::Google::Cloud::Chronicle::V1::ListDataTablesRequest, ::Google::Cloud::Chronicle::V1::ListDataTablesResponse - # Get data table info. - rpc :GetDataTable, ::Google::Cloud::Chronicle::V1::GetDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable - # Update data table. - rpc :UpdateDataTable, ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, ::Google::Cloud::Chronicle::V1::DataTable - # Delete data table. - rpc :DeleteDataTable, ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, ::Google::Protobuf::Empty - # Create a new data table row. - rpc :CreateDataTableRow, ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow - # Update data table row - rpc :UpdateDataTableRow, ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow - # List data table rows. - rpc :ListDataTableRows, ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse - # Get data table row - rpc :GetDataTableRow, ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, ::Google::Cloud::Chronicle::V1::DataTableRow - # Delete data table row. - rpc :DeleteDataTableRow, ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, ::Google::Protobuf::Empty - # Create data table rows in bulk. - rpc :BulkCreateDataTableRows, ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse - # Get data table rows in bulk. - rpc :BulkGetDataTableRows, ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse - # Replace all existing data table rows with new data table rows. - rpc :BulkReplaceDataTableRows, ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse - # Update data table rows in bulk. - rpc :BulkUpdateDataTableRows, ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse - # Get the error for a data table operation. - rpc :GetDataTableOperationErrors, ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, ::Google::Cloud::Chronicle::V1::DataTableOperationErrors - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb deleted file mode 100644 index 80fdf542b870..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/entity.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/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/chronicle/v1/entity.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\x06\n\tWatchlist\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12multiplying_factor\x18\x05 \x01(\x02\x42\x03\xe0\x41\x01\x12h\n\x1b\x65ntity_population_mechanism\x18\x06 \x01(\x0b\x32>.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanismB\x03\xe0\x41\x02\x12K\n\x0c\x65ntity_count\x18\x07 \x01(\x0b\x32\x30.google.cloud.chronicle.v1.Watchlist.EntityCountB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\\\n\x1awatchlist_user_preferences\x18\n \x01(\x0b\x32\x33.google.cloud.chronicle.v1.WatchlistUserPreferencesB\x03\xe0\x41\x01\x1a\x90\x01\n\x19\x45ntityPopulationMechanism\x12\\\n\x06manual\x18\x01 \x01(\x0b\x32\x45.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.ManualB\x03\xe0\x41\x01H\x00\x1a\x08\n\x06ManualB\x0b\n\tmechanism\x1a\x34\n\x0b\x45ntityCount\x12\x11\n\x04user\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x12\n\x05\x61sset\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03:\x94\x01\xea\x41\x90\x01\n\"chronicle.googleapis.com/Watchlist\x12Sprojects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}*\nwatchlists2\twatchlist\"/\n\x18WatchlistUserPreferences\x12\x13\n\x06pinned\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x13GetWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\"\x99\x01\n\x15ListWatchlistsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"u\n\x16ListWatchlistsResponse\x12=\n\nwatchlists\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n\x16\x43reateWatchlistRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\x12\x19\n\x0cwatchlist_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12<\n\twatchlist\x18\x03 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\"\x8c\x01\n\x16UpdateWatchlistRequest\x12<\n\twatchlist\x18\x01 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x16\x44\x65leteWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x32\xbe\x08\n\rEntityService\x12\xaf\x01\n\x0cGetWatchlist\x12..google.cloud.chronicle.v1.GetWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x12\xc2\x01\n\x0eListWatchlists\x12\x30.google.cloud.chronicle.v1.ListWatchlistsRequest\x1a\x31.google.cloud.chronicle.v1.ListWatchlistsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/watchlists\x12\xd9\x01\n\x0f\x43reateWatchlist\x12\x31.google.cloud.chronicle.v1.CreateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"m\xda\x41\x1dparent,watchlist,watchlist_id\x82\xd3\xe4\x93\x02G\":/v1/{parent=projects/*/locations/*/instances/*}/watchlists:\twatchlist\x12\xdb\x01\n\x0fUpdateWatchlist\x12\x31.google.cloud.chronicle.v1.UpdateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"o\xda\x41\x15watchlist,update_mask\x82\xd3\xe4\x93\x02Q2D/v1/{watchlist.name=projects/*/locations/*/instances/*/watchlists/*}:\twatchlist\x12\xad\x01\n\x0f\x44\x65leteWatchlist\x12\x31.google.cloud.chronicle.v1.DeleteWatchlistRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\nname,force\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc2\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0b\x45ntityProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - Watchlist = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist").msgclass - Watchlist::EntityPopulationMechanism = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism").msgclass - Watchlist::EntityPopulationMechanism::Manual = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual").msgclass - Watchlist::EntityCount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityCount").msgclass - WatchlistUserPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.WatchlistUserPreferences").msgclass - GetWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetWatchlistRequest").msgclass - ListWatchlistsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsRequest").msgclass - ListWatchlistsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsResponse").msgclass - CreateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateWatchlistRequest").msgclass - UpdateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateWatchlistRequest").msgclass - DeleteWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteWatchlistRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb deleted file mode 100644 index 5dd703d38f49..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/entity_service/credentials" -require "google/cloud/chronicle/v1/entity_service/paths" -require "google/cloud/chronicle/v1/entity_service/client" -require "google/cloud/chronicle/v1/entity_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # EntityService contains apis for finding entities. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/entity_service" - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/entity_service/rest" - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - module EntityService - end - end - end - end -end - -helper_path = ::File.join __dir__, "entity_service", "helpers.rb" -require "google/cloud/chronicle/v1/entity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb deleted file mode 100644 index 58bdcbe09913..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb +++ /dev/null @@ -1,908 +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/chronicle/v1/entity_pb" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - ## - # Client for the EntityService service. - # - # EntityService contains apis for finding entities. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :entity_service_stub - - ## - # Configure the EntityService Client class. - # - # See {::Google::Cloud::Chronicle::V1::EntityService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EntityService clients - # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] - 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.get_watchlist.timeout = 90.0 - default_config.rpcs.get_watchlist.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_watchlists.timeout = 90.0 - default_config.rpcs.list_watchlists.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_watchlist.timeout = 90.0 - - default_config.rpcs.update_watchlist.timeout = 90.0 - - default_config.rpcs.delete_watchlist.timeout = 90.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EntityService 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::Chronicle::V1::EntityService::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 - @entity_service_stub.universe_domain - end - - ## - # Create a new EntityService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EntityService 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/chronicle/v1/entity_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 - - @entity_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::EntityService::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 - ) - - @entity_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @entity_service_stub.logger - end - - # Service calls - - ## - # Gets watchlist details for the given watchlist ID. - # - # @overload get_watchlist(request, options = nil) - # Pass arguments to `get_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::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_watchlist(name: nil) - # Pass arguments to `get_watchlist` 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 parent, which owns this collection of watchlists. - # The name of the watchlist to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new - # - # # Call the get_watchlist method. - # result = client.get_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def get_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :get_watchlist, 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 all watchlists for the given instance. - # - # @overload list_watchlists(request, options = nil) - # Pass arguments to `list_watchlists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_watchlists` 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 parent, which owns this collection of watchlists. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # Optional. The maximum number of watchlists to return. - # The service may return fewer than this value. - # If unspecified, at most 200 watchlists will be returned. - # The maximum value is 200; values above 200 will be coerced to 200. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListWatchlists` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListWatchlists` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Which watchlist to return in aip.dev/160 form. - # Currently, only the following filters are supported: - # - `watchlist_user_preferences.pinned=true` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new - # - # # Call the list_watchlists method. - # result = client.list_watchlists 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::Chronicle::V1::Watchlist. - # p item - # end - # - def list_watchlists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest - - # 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_watchlists.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::Chronicle::V1::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_watchlists.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_watchlists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :list_watchlists, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @entity_service_stub, :list_watchlists, 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 - - ## - # Creates a watchlist for the given instance. - # Note that there can be at most 200 watchlists per instance. - # - # @overload create_watchlist(request, options = nil) - # Pass arguments to `create_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) - # Pass arguments to `create_watchlist` 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 parent resource where this watchlist will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param watchlist_id [::String] - # Optional. The ID to use for the watchlist, - # which will become the final component of the watchlist's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new - # - # # Call the create_watchlist method. - # result = client.create_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def create_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :create_watchlist, 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 - - ## - # Updates the watchlist for the given instance. - # - # @overload update_watchlist(request, options = nil) - # Pass arguments to `update_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::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_watchlist(watchlist: nil, update_mask: nil) - # Pass arguments to `update_watchlist` 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 watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to update. - # - # The watchlist's `name` field is used to identify the watchlist to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new - # - # # Call the update_watchlist method. - # result = client.update_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def update_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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.watchlist&.name - header_params["watchlist.name"] = request.watchlist.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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :update_watchlist, 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 the watchlist for the given instance. - # - # @overload delete_watchlist(request, options = nil) - # Pass arguments to `delete_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::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_watchlist(name: nil, force: nil) - # Pass arguments to `delete_watchlist` 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 name of the watchlist to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param force [::Boolean] - # Optional. If set to true, any entities under this watchlist will also be - # deleted. (Otherwise, the request will only work if the watchlist has no - # entities.) - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new - # - # # Call the delete_watchlist method. - # result = client.delete_watchlist request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :delete_watchlist, 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 - - ## - # Configuration class for the EntityService API. - # - # This class represents the configuration for EntityService, - # 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::Chronicle::V1::EntityService::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 - # # get_watchlist to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::EntityService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.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::Chronicle::V1::EntityService::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. - # * `: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 = "chronicle.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 EntityService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :get_watchlist - ## - # RPC-specific configuration for `list_watchlists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_watchlists - ## - # RPC-specific configuration for `create_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :create_watchlist - ## - # RPC-specific configuration for `update_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :update_watchlist - ## - # RPC-specific configuration for `delete_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_watchlist - - # @private - def initialize parent_rpcs = nil - get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist - @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config - list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists - @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config - create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist - @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config - update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist - @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config - delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist - @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb deleted file mode 100644 index d22648b53244..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - # Credentials for the EntityService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb deleted file mode 100644 index 21433575930f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.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 Chronicle - module V1 - module EntityService - # Path helper methods for the EntityService API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified Watchlist resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param watchlist [String] - # - # @return [::String] - def watchlist_path project:, location:, instance:, watchlist: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/watchlists/#{watchlist}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb deleted file mode 100644 index 5e1f8b48cf66..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/entity_service/credentials" -require "google/cloud/chronicle/v1/entity_service/paths" -require "google/cloud/chronicle/v1/entity_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # EntityService contains apis for finding entities. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/entity_service/rest" - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - module EntityService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/entity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb deleted file mode 100644 index fc82038f4319..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb +++ /dev/null @@ -1,830 +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/chronicle/v1/entity_pb" -require "google/cloud/chronicle/v1/entity_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - module Rest - ## - # REST client for the EntityService service. - # - # EntityService contains apis for finding entities. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :entity_service_stub - - ## - # Configure the EntityService Client class. - # - # See {::Google::Cloud::Chronicle::V1::EntityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EntityService clients - # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] - 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.get_watchlist.timeout = 90.0 - default_config.rpcs.get_watchlist.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_watchlists.timeout = 90.0 - default_config.rpcs.list_watchlists.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_watchlist.timeout = 90.0 - - default_config.rpcs.update_watchlist.timeout = 90.0 - - default_config.rpcs.delete_watchlist.timeout = 90.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EntityService 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::Chronicle::V1::EntityService::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 - @entity_service_stub.universe_domain - end - - ## - # Create a new EntityService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EntityService 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 - - @entity_service_stub = ::Google::Cloud::Chronicle::V1::EntityService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @entity_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @entity_service_stub.logger - end - - # Service calls - - ## - # Gets watchlist details for the given watchlist ID. - # - # @overload get_watchlist(request, options = nil) - # Pass arguments to `get_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::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_watchlist(name: nil) - # Pass arguments to `get_watchlist` 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 parent, which owns this collection of watchlists. - # The name of the watchlist to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new - # - # # Call the get_watchlist method. - # result = client.get_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def get_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.get_watchlist 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 all watchlists for the given instance. - # - # @overload list_watchlists(request, options = nil) - # Pass arguments to `list_watchlists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_watchlists` 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 parent, which owns this collection of watchlists. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # Optional. The maximum number of watchlists to return. - # The service may return fewer than this value. - # If unspecified, at most 200 watchlists will be returned. - # The maximum value is 200; values above 200 will be coerced to 200. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListWatchlists` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListWatchlists` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Which watchlist to return in aip.dev/160 form. - # Currently, only the following filters are supported: - # - `watchlist_user_preferences.pinned=true` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new - # - # # Call the list_watchlists method. - # result = client.list_watchlists 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::Chronicle::V1::Watchlist. - # p item - # end - # - def list_watchlists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest - - # 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_watchlists.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::Chronicle::V1::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_watchlists.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_watchlists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.list_watchlists request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @entity_service_stub, :list_watchlists, "watchlists", 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 - - ## - # Creates a watchlist for the given instance. - # Note that there can be at most 200 watchlists per instance. - # - # @overload create_watchlist(request, options = nil) - # Pass arguments to `create_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) - # Pass arguments to `create_watchlist` 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 parent resource where this watchlist will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param watchlist_id [::String] - # Optional. The ID to use for the watchlist, - # which will become the final component of the watchlist's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new - # - # # Call the create_watchlist method. - # result = client.create_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def create_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.create_watchlist 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 - - ## - # Updates the watchlist for the given instance. - # - # @overload update_watchlist(request, options = nil) - # Pass arguments to `update_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::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_watchlist(watchlist: nil, update_mask: nil) - # Pass arguments to `update_watchlist` 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 watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to update. - # - # The watchlist's `name` field is used to identify the watchlist to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new - # - # # Call the update_watchlist method. - # result = client.update_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def update_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.update_watchlist 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 the watchlist for the given instance. - # - # @overload delete_watchlist(request, options = nil) - # Pass arguments to `delete_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::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_watchlist(name: nil, force: nil) - # Pass arguments to `delete_watchlist` 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 name of the watchlist to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param force [::Boolean] - # Optional. If set to true, any entities under this watchlist will also be - # deleted. (Otherwise, the request will only work if the watchlist has no - # entities.) - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new - # - # # Call the delete_watchlist method. - # result = client.delete_watchlist request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest - - # 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_watchlist.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::Chronicle::V1::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.delete_watchlist 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 - - ## - # Configuration class for the EntityService REST API. - # - # This class represents the configuration for EntityService 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::Chronicle::V1::EntityService::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 - # # get_watchlist to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.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. - # * `: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 = "chronicle.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 EntityService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :get_watchlist - ## - # RPC-specific configuration for `list_watchlists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_watchlists - ## - # RPC-specific configuration for `create_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :create_watchlist - ## - # RPC-specific configuration for `update_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :update_watchlist - ## - # RPC-specific configuration for `delete_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_watchlist - - # @private - def initialize parent_rpcs = nil - get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist - @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config - list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists - @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config - create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist - @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config - update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist - @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config - delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist - @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb deleted file mode 100644 index 526e1e685af9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb +++ /dev/null @@ -1,388 +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/chronicle/v1/entity_pb" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - module Rest - ## - # REST service stub for the EntityService 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 get_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] - # 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::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # A result object deserialized from the server's reply - def get_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_watchlist_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_watchlist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] - # 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::Chronicle::V1::ListWatchlistsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListWatchlistsResponse] - # A result object deserialized from the server's reply - def list_watchlists request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_watchlists_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_watchlists", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] - # 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::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # A result object deserialized from the server's reply - def create_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_watchlist_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_watchlist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] - # 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::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # A result object deserialized from the server's reply - def update_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_watchlist_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_watchlist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] - # 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_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_watchlist_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_watchlist", - 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 - - ## - # @private - # - # GRPC transcoding helper method for the get_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_watchlists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] - # 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_watchlists_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/watchlists", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/watchlists", - body: "watchlist", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{watchlist.name}", - body: "watchlist", - matches: [ - ["watchlist.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb deleted file mode 100644 index c59e9b0b6f56..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/entity.proto for package 'Google.Cloud.Chronicle.V1' -# 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/chronicle/v1/entity_pb' - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - # EntityService contains apis for finding entities. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.EntityService' - - # Gets watchlist details for the given watchlist ID. - rpc :GetWatchlist, ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist - # Lists all watchlists for the given instance. - rpc :ListWatchlists, ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse - # Creates a watchlist for the given instance. - # Note that there can be at most 200 watchlists per instance. - rpc :CreateWatchlist, ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist - # Updates the watchlist for the given instance. - rpc :UpdateWatchlist, ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist - # Deletes the watchlist for the given instance. - rpc :DeleteWatchlist, ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb deleted file mode 100644 index 3248928b99dd..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_metadata_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/featured_content_metadata.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n9google/cloud/chronicle/v1/featured_content_metadata.proto\x12\x19google.cloud.chronicle.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x92\x04\n\x17\x46\x65\x61turedContentMetadata\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tcertified\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\ncategories\x18\x08 \x03(\tB\x03\xe0\x41\x03\x12\x14\n\x07version\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\x08verified\x18\n \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12^\n\x0bsource_type\x18\x0b \x01(\x0e\x32\x44.google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceTypeB\x03\xe0\x41\x03\"`\n\x11\x43ontentSourceType\x12#\n\x1f\x43ONTENT_SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GOOGLE\x10\x01\x12\r\n\tCOMMUNITY\x10\x02\x12\x0b\n\x07PARTNER\x10\x03\x42\x0b\n\t_verifiedB\xd3\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x1c\x46\x65\x61turedContentMetadataProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - FeaturedContentMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FeaturedContentMetadata").msgclass - FeaturedContentMetadata::ContentSourceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FeaturedContentMetadata.ContentSourceType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb deleted file mode 100644 index bd3faf5f2172..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/featured_content_native_dashboard.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/chronicle/v1/featured_content_metadata_pb' -require 'google/cloud/chronicle/v1/native_dashboard_pb' - - -descriptor_data = "\nAgoogle/cloud/chronicle/v1/featured_content_native_dashboard.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x39google/cloud/chronicle/v1/featured_content_metadata.proto\x1a\x30google/cloud/chronicle/v1/native_dashboard.proto\"\xf5\x03\n\x1e\x46\x65\x61turedContentNativeDashboard\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12Q\n\x10\x63ontent_metadata\x18\x02 \x01(\x0b\x32\x32.google.cloud.chronicle.v1.FeaturedContentMetadataB\x03\xe0\x41\x03\x12^\n\x11\x64\x61shboard_content\x18\x03 \x01(\x0b\x32>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueriesB\x03\xe0\x41\x01:\x8c\x02\xea\x41\x88\x02\n7chronicle.googleapis.com/FeaturedContentNativeDashboard\x12\x8b\x01projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}*\x1f\x66\x65\x61turedContentNativeDashboards2\x1e\x66\x65\x61turedContentNativeDashboard\"y\n(GetFeaturedContentNativeDashboardRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7chronicle.googleapis.com/FeaturedContentNativeDashboard\"\xc3\x01\n*ListFeaturedContentNativeDashboardsRequest\x12O\n\x06parent\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\x12\x37\x63hronicle.googleapis.com/FeaturedContentNativeDashboard\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n+ListFeaturedContentNativeDashboardsResponse\x12\x65\n\"featured_content_native_dashboards\x18\x01 \x03(\x0b\x32\x39.google.cloud.chronicle.v1.FeaturedContentNativeDashboard\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe8\x01\n,InstallFeaturedContentNativeDashboardRequest\x12M\n\x04name\x18\x01 \x01(\tB?\xe0\x41\x02\xfa\x41\x39\n7chronicle.googleapis.com/FeaturedContentNativeDashboard\x12i\n!featured_content_native_dashboard\x18\x02 \x01(\x0b\x32\x39.google.cloud.chronicle.v1.FeaturedContentNativeDashboardB\x03\xe0\x41\x01\"{\n-InstallFeaturedContentNativeDashboardResponse\x12J\n\x10native_dashboard\x18\x01 \x01(\tB0\xe0\x41\x01\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard2\xbc\x08\n%FeaturedContentNativeDashboardService\x12\x8e\x02\n!GetFeaturedContentNativeDashboard\x12\x43.google.cloud.chronicle.v1.GetFeaturedContentNativeDashboardRequest\x1a\x39.google.cloud.chronicle.v1.FeaturedContentNativeDashboard\"i\xda\x41\x04name\x82\xd3\xe4\x93\x02\\\x12Z/v1/{name=projects/*/locations/*/instances/*/contentHub/featuredContentNativeDashboards/*}\x12\xa1\x02\n#ListFeaturedContentNativeDashboards\x12\x45.google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsRequest\x1a\x46.google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsResponse\"k\xda\x41\x06parent\x82\xd3\xe4\x93\x02\\\x12Z/v1/{parent=projects/*/locations/*/instances/*/contentHub}/featuredContentNativeDashboards\x12\xb0\x02\n%InstallFeaturedContentNativeDashboard\x12G.google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardRequest\x1aH.google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardResponse\"t\xda\x41\x04name\x82\xd3\xe4\x93\x02g\"b/v1/{name=projects/*/locations/*/instances/*/contentHub/featuredContentNativeDashboards/*}:install:\x01*\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xe4\x02\n\x1d\x63om.google.cloud.chronicle.v1B#FeaturedContentNativeDashboardProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1\xea\x41\x86\x01\n#chronicle.googleapis.com/ContentHub\x12Gprojects/{project}/locations/{location}/instances/{instance}/contentHub*\ncontentHub2\ncontentHubb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - FeaturedContentNativeDashboard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.FeaturedContentNativeDashboard").msgclass - GetFeaturedContentNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetFeaturedContentNativeDashboardRequest").msgclass - ListFeaturedContentNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsRequest").msgclass - ListFeaturedContentNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListFeaturedContentNativeDashboardsResponse").msgclass - InstallFeaturedContentNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardRequest").msgclass - InstallFeaturedContentNativeDashboardResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InstallFeaturedContentNativeDashboardResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.rb deleted file mode 100644 index d9b60adfefbe..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/client" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # This service provides functionality for managing - # FeaturedContentNativeDashboard. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" - # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" - # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new - # - module FeaturedContentNativeDashboardService - end - end - end - end -end - -helper_path = ::File.join __dir__, "featured_content_native_dashboard_service", "helpers.rb" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb deleted file mode 100644 index 5da633a058dc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/client.rb +++ /dev/null @@ -1,717 +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/chronicle/v1/featured_content_native_dashboard_pb" - -module Google - module Cloud - module Chronicle - module V1 - module FeaturedContentNativeDashboardService - ## - # Client for the FeaturedContentNativeDashboardService service. - # - # This service provides functionality for managing - # FeaturedContentNativeDashboard. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :featured_content_native_dashboard_service_stub - - ## - # Configure the FeaturedContentNativeDashboardService Client class. - # - # See {::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all FeaturedContentNativeDashboardService clients - # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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", "Chronicle", "V1"] - 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.get_featured_content_native_dashboard.timeout = 60.0 - default_config.rpcs.get_featured_content_native_dashboard.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_featured_content_native_dashboards.timeout = 60.0 - default_config.rpcs.list_featured_content_native_dashboards.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 - @featured_content_native_dashboard_service_stub.universe_domain - end - - ## - # Create a new FeaturedContentNativeDashboardService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the FeaturedContentNativeDashboardService 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/chronicle/v1/featured_content_native_dashboard_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 - - @featured_content_native_dashboard_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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 - ) - - @featured_content_native_dashboard_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @featured_content_native_dashboard_service_stub.logger - end - - # Service calls - - ## - # Get a native dashboard featured content. - # - # @overload get_featured_content_native_dashboard(request, options = nil) - # Pass arguments to `get_featured_content_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, ::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_featured_content_native_dashboard(name: nil) - # Pass arguments to `get_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to - # retrieve. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new - # - # # Call the get_featured_content_native_dashboard method. - # result = client.get_featured_content_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard. - # p result - # - def get_featured_content_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest - - # 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_featured_content_native_dashboard.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::Chronicle::V1::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_featured_content_native_dashboard.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_featured_content_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @featured_content_native_dashboard_service_stub.call_rpc :get_featured_content_native_dashboard, 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 - - ## - # List all native dashboards featured content. - # - # @overload list_featured_content_native_dashboards(request, options = nil) - # Pass arguments to `list_featured_content_native_dashboards` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, ::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_featured_content_native_dashboards(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_featured_content_native_dashboards` 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 parent, which owns this collection of - # FeaturedContentNativeDashboards. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub - # @param page_size [::Integer] - # Optional. The maximum number of FeaturedContentNativeDashboards to return. - # The service may return fewer than this value. If unspecified, at most 100 - # FeaturedContentNativeDashboards will be returned. The maximum value is 100; - # values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListFeaturedContentNativeDashboards` must match the call that provided the - # page token. - # @param filter [::String] - # Optional. The filter to apply to list the FeaturedContentNativeDashboards. - # - # The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. - # - # Supported fields for filtering: - # - # * `name`: The resource name of the featured content. - # * `content_metadata.description`: The description of the featured - # content. - # - # When a literal value is provided without a field, it will perform a - # substring search across both `name` and `content_metadata.description`. - # - # Examples: - # - # * `"test"`: Matches featured content where either the name or description - # contains "test" as a substring. - # * `name="test"`: Matches featured content where the name contains "test". - # * `content_metadata.description="test"`: Matches featured content where - # the description contains "test". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new - # - # # Call the list_featured_content_native_dashboards method. - # result = client.list_featured_content_native_dashboards 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::Chronicle::V1::FeaturedContentNativeDashboard. - # p item - # end - # - def list_featured_content_native_dashboards request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest - - # 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_featured_content_native_dashboards.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::Chronicle::V1::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_featured_content_native_dashboards.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_featured_content_native_dashboards.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @featured_content_native_dashboard_service_stub.call_rpc :list_featured_content_native_dashboards, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @featured_content_native_dashboard_service_stub, :list_featured_content_native_dashboards, 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 - - ## - # Install a native dashboard featured content. - # - # @overload install_featured_content_native_dashboard(request, options = nil) - # Pass arguments to `install_featured_content_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, ::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 install_featured_content_native_dashboard(name: nil, featured_content_native_dashboard: nil) - # Pass arguments to `install_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to - # install. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} - # @param featured_content_native_dashboard [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard, ::Hash] - # Optional. The FeaturedContentNativeDashboard to install. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new - # - # # Call the install_featured_content_native_dashboard method. - # result = client.install_featured_content_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse. - # p result - # - def install_featured_content_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest - - # 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.install_featured_content_native_dashboard.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::Chronicle::V1::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.install_featured_content_native_dashboard.timeout, - metadata: metadata, - retry_policy: @config.rpcs.install_featured_content_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @featured_content_native_dashboard_service_stub.call_rpc :install_featured_content_native_dashboard, 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 - - ## - # Configuration class for the FeaturedContentNativeDashboardService API. - # - # This class represents the configuration for FeaturedContentNativeDashboardService, - # 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 - # # get_featured_content_native_dashboard to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_featured_content_native_dashboard.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_featured_content_native_dashboard.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::Chronicle::V1::FeaturedContentNativeDashboardService::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. - # * `: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 = "chronicle.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 FeaturedContentNativeDashboardService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_featured_content_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :get_featured_content_native_dashboard - ## - # RPC-specific configuration for `list_featured_content_native_dashboards` - # @return [::Gapic::Config::Method] - # - attr_reader :list_featured_content_native_dashboards - ## - # RPC-specific configuration for `install_featured_content_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :install_featured_content_native_dashboard - - # @private - def initialize parent_rpcs = nil - get_featured_content_native_dashboard_config = parent_rpcs.get_featured_content_native_dashboard if parent_rpcs.respond_to? :get_featured_content_native_dashboard - @get_featured_content_native_dashboard = ::Gapic::Config::Method.new get_featured_content_native_dashboard_config - list_featured_content_native_dashboards_config = parent_rpcs.list_featured_content_native_dashboards if parent_rpcs.respond_to? :list_featured_content_native_dashboards - @list_featured_content_native_dashboards = ::Gapic::Config::Method.new list_featured_content_native_dashboards_config - install_featured_content_native_dashboard_config = parent_rpcs.install_featured_content_native_dashboard if parent_rpcs.respond_to? :install_featured_content_native_dashboard - @install_featured_content_native_dashboard = ::Gapic::Config::Method.new install_featured_content_native_dashboard_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb deleted file mode 100644 index 2989f4bffb1d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials.rb +++ /dev/null @@ -1,49 +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 Chronicle - module V1 - module FeaturedContentNativeDashboardService - # Credentials for the FeaturedContentNativeDashboardService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/chronicle", - "https://www.googleapis.com/auth/chronicle.readonly", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb deleted file mode 100644 index a71c8d10fcf5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths.rb +++ /dev/null @@ -1,136 +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 Chronicle - module V1 - module FeaturedContentNativeDashboardService - # Path helper methods for the FeaturedContentNativeDashboardService API. - module Paths - ## - # Create a fully-qualified ContentHub resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/contentHub` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def content_hub_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/contentHub" - end - - ## - # Create a fully-qualified DashboardChart resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param chart [String] - # - # @return [::String] - def dashboard_chart_path project:, location:, instance:, chart: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" - end - - ## - # Create a fully-qualified DashboardQuery resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param query [String] - # - # @return [::String] - def dashboard_query_path project:, location:, instance:, query: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardQueries/#{query}" - end - - ## - # Create a fully-qualified FeaturedContentNativeDashboard resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/contentHub/featuredContentNativeDashboards/{featured_content_native_dashboard}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param featured_content_native_dashboard [String] - # - # @return [::String] - def featured_content_native_dashboard_path project:, location:, instance:, featured_content_native_dashboard: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/contentHub/featuredContentNativeDashboards/#{featured_content_native_dashboard}" - end - - ## - # Create a fully-qualified NativeDashboard resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param dashboard [String] - # - # @return [::String] - def native_dashboard_path project:, location:, instance:, dashboard: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/nativeDashboards/#{dashboard}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.rb deleted file mode 100644 index f3fc177c90e7..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/credentials" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/paths" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # This service provides functionality for managing - # FeaturedContentNativeDashboard. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" - # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new - # - module FeaturedContentNativeDashboardService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb deleted file mode 100644 index 77ac512963a7..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/client.rb +++ /dev/null @@ -1,653 +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/chronicle/v1/featured_content_native_dashboard_pb" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module FeaturedContentNativeDashboardService - module Rest - ## - # REST client for the FeaturedContentNativeDashboardService service. - # - # This service provides functionality for managing - # FeaturedContentNativeDashboard. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :featured_content_native_dashboard_service_stub - - ## - # Configure the FeaturedContentNativeDashboardService Client class. - # - # See {::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all FeaturedContentNativeDashboardService clients - # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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", "Chronicle", "V1"] - 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.get_featured_content_native_dashboard.timeout = 60.0 - default_config.rpcs.get_featured_content_native_dashboard.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_featured_content_native_dashboards.timeout = 60.0 - default_config.rpcs.list_featured_content_native_dashboards.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 - @featured_content_native_dashboard_service_stub.universe_domain - end - - ## - # Create a new FeaturedContentNativeDashboardService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the FeaturedContentNativeDashboardService 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 - - @featured_content_native_dashboard_service_stub = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @featured_content_native_dashboard_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @featured_content_native_dashboard_service_stub.logger - end - - # Service calls - - ## - # Get a native dashboard featured content. - # - # @overload get_featured_content_native_dashboard(request, options = nil) - # Pass arguments to `get_featured_content_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, ::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_featured_content_native_dashboard(name: nil) - # Pass arguments to `get_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to - # retrieve. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new - # - # # Call the get_featured_content_native_dashboard method. - # result = client.get_featured_content_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard. - # p result - # - def get_featured_content_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest - - # 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_featured_content_native_dashboard.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::Chronicle::V1::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_featured_content_native_dashboard.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_featured_content_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @featured_content_native_dashboard_service_stub.get_featured_content_native_dashboard 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 - - ## - # List all native dashboards featured content. - # - # @overload list_featured_content_native_dashboards(request, options = nil) - # Pass arguments to `list_featured_content_native_dashboards` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, ::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_featured_content_native_dashboards(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_featured_content_native_dashboards` 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 parent, which owns this collection of - # FeaturedContentNativeDashboards. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub - # @param page_size [::Integer] - # Optional. The maximum number of FeaturedContentNativeDashboards to return. - # The service may return fewer than this value. If unspecified, at most 100 - # FeaturedContentNativeDashboards will be returned. The maximum value is 100; - # values above 100 will be coerced to 100. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListFeaturedContentNativeDashboards` must match the call that provided the - # page token. - # @param filter [::String] - # Optional. The filter to apply to list the FeaturedContentNativeDashboards. - # - # The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. - # - # Supported fields for filtering: - # - # * `name`: The resource name of the featured content. - # * `content_metadata.description`: The description of the featured - # content. - # - # When a literal value is provided without a field, it will perform a - # substring search across both `name` and `content_metadata.description`. - # - # Examples: - # - # * `"test"`: Matches featured content where either the name or description - # contains "test" as a substring. - # * `name="test"`: Matches featured content where the name contains "test". - # * `content_metadata.description="test"`: Matches featured content where - # the description contains "test". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new - # - # # Call the list_featured_content_native_dashboards method. - # result = client.list_featured_content_native_dashboards 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::Chronicle::V1::FeaturedContentNativeDashboard. - # p item - # end - # - def list_featured_content_native_dashboards request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest - - # 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_featured_content_native_dashboards.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::Chronicle::V1::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_featured_content_native_dashboards.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_featured_content_native_dashboards.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @featured_content_native_dashboard_service_stub.list_featured_content_native_dashboards request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @featured_content_native_dashboard_service_stub, :list_featured_content_native_dashboards, "featured_content_native_dashboards", 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 - - ## - # Install a native dashboard featured content. - # - # @overload install_featured_content_native_dashboard(request, options = nil) - # Pass arguments to `install_featured_content_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, ::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 install_featured_content_native_dashboard(name: nil, featured_content_native_dashboard: nil) - # Pass arguments to `install_featured_content_native_dashboard` 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 FeaturedContentNativeDashboard to - # install. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} - # @param featured_content_native_dashboard [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard, ::Hash] - # Optional. The FeaturedContentNativeDashboard to install. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new - # - # # Call the install_featured_content_native_dashboard method. - # result = client.install_featured_content_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse. - # p result - # - def install_featured_content_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest - - # 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.install_featured_content_native_dashboard.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::Chronicle::V1::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.install_featured_content_native_dashboard.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.install_featured_content_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @featured_content_native_dashboard_service_stub.install_featured_content_native_dashboard 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 - - ## - # Configuration class for the FeaturedContentNativeDashboardService REST API. - # - # This class represents the configuration for FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::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 - # # get_featured_content_native_dashboard to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_featured_content_native_dashboard.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_featured_content_native_dashboard.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. - # * `: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 = "chronicle.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 FeaturedContentNativeDashboardService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_featured_content_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :get_featured_content_native_dashboard - ## - # RPC-specific configuration for `list_featured_content_native_dashboards` - # @return [::Gapic::Config::Method] - # - attr_reader :list_featured_content_native_dashboards - ## - # RPC-specific configuration for `install_featured_content_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :install_featured_content_native_dashboard - - # @private - def initialize parent_rpcs = nil - get_featured_content_native_dashboard_config = parent_rpcs.get_featured_content_native_dashboard if parent_rpcs.respond_to? :get_featured_content_native_dashboard - @get_featured_content_native_dashboard = ::Gapic::Config::Method.new get_featured_content_native_dashboard_config - list_featured_content_native_dashboards_config = parent_rpcs.list_featured_content_native_dashboards if parent_rpcs.respond_to? :list_featured_content_native_dashboards - @list_featured_content_native_dashboards = ::Gapic::Config::Method.new list_featured_content_native_dashboards_config - install_featured_content_native_dashboard_config = parent_rpcs.install_featured_content_native_dashboard if parent_rpcs.respond_to? :install_featured_content_native_dashboard - @install_featured_content_native_dashboard = ::Gapic::Config::Method.new install_featured_content_native_dashboard_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb deleted file mode 100644 index 87f450115dc7..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest/service_stub.rb +++ /dev/null @@ -1,265 +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/chronicle/v1/featured_content_native_dashboard_pb" - -module Google - module Cloud - module Chronicle - module V1 - module FeaturedContentNativeDashboardService - module Rest - ## - # REST service stub for the FeaturedContentNativeDashboardService 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 get_featured_content_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest] - # 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::Chronicle::V1::FeaturedContentNativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] - # A result object deserialized from the server's reply - def get_featured_content_native_dashboard request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_featured_content_native_dashboard_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_featured_content_native_dashboard", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard.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_featured_content_native_dashboards REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest] - # 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::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse] - # A result object deserialized from the server's reply - def list_featured_content_native_dashboards request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_featured_content_native_dashboards_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_featured_content_native_dashboards", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the install_featured_content_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest] - # 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::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse] - # A result object deserialized from the server's reply - def install_featured_content_native_dashboard request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_install_featured_content_native_dashboard_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: "install_featured_content_native_dashboard", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse.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 get_featured_content_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest] - # 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_featured_content_native_dashboard_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/contentHub/featuredContentNativeDashboards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_featured_content_native_dashboards REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest] - # 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_featured_content_native_dashboards_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/featuredContentNativeDashboards", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/contentHub/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the install_featured_content_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_install_featured_content_native_dashboard_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:install", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/contentHub/featuredContentNativeDashboards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb deleted file mode 100644 index 8f949b5ddb61..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/featured_content_native_dashboard_services_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/featured_content_native_dashboard.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# 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 -# -# 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/chronicle/v1/featured_content_native_dashboard_pb' - -module Google - module Cloud - module Chronicle - module V1 - module FeaturedContentNativeDashboardService - # This service provides functionality for managing - # FeaturedContentNativeDashboard. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.FeaturedContentNativeDashboardService' - - # Get a native dashboard featured content. - rpc :GetFeaturedContentNativeDashboard, ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard - # List all native dashboards featured content. - rpc :ListFeaturedContentNativeDashboards, ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse - # Install a native dashboard featured content. - rpc :InstallFeaturedContentNativeDashboard, ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb deleted file mode 100644 index 93db557b2ce9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/instance.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' - - -descriptor_data = "\n(google/cloud/chronicle/v1/instance.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x01\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:y\xea\x41v\n!chronicle.googleapis.com/Instance\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the InstanceService API. - # - # This class represents the configuration for InstanceService, - # 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::Chronicle::V1::InstanceService::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 - # # get_instance to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::InstanceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.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::Chronicle::V1::InstanceService::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. - # * `: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 = "chronicle.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 InstanceService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - - # @private - def initialize parent_rpcs = nil - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb deleted file mode 100644 index 63fbe3b5b5fb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - # Credentials for the InstanceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb deleted file mode 100644 index 71d7213a0c6d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_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 Chronicle - module V1 - module InstanceService - # Path helper methods for the InstanceService API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb deleted file mode 100644 index 40b1913eead4..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/instance_service/credentials" -require "google/cloud/chronicle/v1/instance_service/paths" -require "google/cloud/chronicle/v1/instance_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # InstanceService provides the entry interface for the Chronicle API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/instance_service/rest" - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new - # - module InstanceService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/instance_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb deleted file mode 100644 index 4b6f95ea6cbb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb +++ /dev/null @@ -1,431 +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/chronicle/v1/instance_pb" -require "google/cloud/chronicle/v1/instance_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - module Rest - ## - # REST client for the InstanceService service. - # - # InstanceService provides the entry interface for the Chronicle API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :instance_service_stub - - ## - # Configure the InstanceService Client class. - # - # See {::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all InstanceService clients - # ::Google::Cloud::Chronicle::V1::InstanceService::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", "Chronicle", "V1"] - 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.get_instance.timeout = 60.0 - default_config.rpcs.get_instance.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the InstanceService 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::Chronicle::V1::InstanceService::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 - @instance_service_stub.universe_domain - end - - ## - # Create a new InstanceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the InstanceService 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 - - @instance_service_stub = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @instance_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @instance_service_stub.logger - end - - # Service calls - - ## - # Gets a Instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::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_instance(name: nil) - # Pass arguments to `get_instance` 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 name of the instance to retrieve. - # Format: - # `projects/{project_id}/locations/{location}/instances/{instance}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetInstanceRequest - - # 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_instance.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::Chronicle::V1::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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_service_stub.get_instance 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 - - ## - # Configuration class for the InstanceService REST API. - # - # This class represents the configuration for InstanceService 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::Chronicle::V1::InstanceService::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 - # # get_instance to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.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. - # * `: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 = "chronicle.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 InstanceService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - - # @private - def initialize parent_rpcs = nil - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb deleted file mode 100644 index 54fc5b580ded..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb +++ /dev/null @@ -1,142 +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/chronicle/v1/instance_pb" - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - module Rest - ## - # REST service stub for the InstanceService 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 get_instance REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] - # 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::Chronicle::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_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_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Instance.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 get_instance REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb deleted file mode 100644 index 3465f58ac427..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/instance.proto for package 'Google.Cloud.Chronicle.V1' -# 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/chronicle/v1/instance_pb' - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - # InstanceService provides the entry interface for the Chronicle API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.InstanceService' - - # Gets a Instance. - rpc :GetInstance, ::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::Google::Cloud::Chronicle::V1::Instance - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb deleted file mode 100644 index d5d773013043..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/native_dashboard.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/chronicle/v1/dashboard_chart_pb' -require 'google/cloud/chronicle/v1/dashboard_query_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n0google/cloud/chronicle/v1/native_dashboard.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a/google/cloud/chronicle/v1/dashboard_chart.proto\x1a/google/cloud/chronicle/v1/dashboard_query.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"u\n\x1d\x45xportNativeDashboardsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12\x12\n\x05names\x18\x02 \x03(\tB\x03\xe0\x41\x02\"{\n\x1e\x45xportNativeDashboardsResponse\x12J\n\x12inline_destination\x18\x01 \x01(\x0b\x32,.google.cloud.chronicle.v1.InlineDestinationH\x00\x42\r\n\x0b\x64\x65stination\"g\n\x11InlineDestination\x12R\n\ndashboards\x18\x01 \x03(\x0b\x32>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries\"\xfe\x01\n#NativeDashboardWithChartsAndQueries\x12\x42\n\tdashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x01\x12H\n\x10\x64\x61shboard_charts\x18\x02 \x03(\x0b\x32).google.cloud.chronicle.v1.DashboardChartB\x03\xe0\x41\x01\x12I\n\x11\x64\x61shboard_queries\x18\x03 \x03(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x01\"\xb5\x01\n\x1dImportNativeDashboardsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12R\n\x06source\x18\x02 \x01(\x0b\x32=.google.cloud.chronicle.v1.ImportNativeDashboardsInlineSourceB\x03\xe0\x41\x02\"}\n\"ImportNativeDashboardsInlineSource\x12W\n\ndashboards\x18\x01 \x03(\x0b\x32>.google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueriesB\x03\xe0\x41\x02\"e\n\x1eImportNativeDashboardsResponse\x12\x43\n\x07results\x18\x01 \x03(\x0b\x32-.google.cloud.chronicle.v1.ImportExportStatusB\x03\xe0\x41\x03\"P\n\x12ImportExportStatus\x12\x11\n\tdashboard\x18\x01 \x01(\t\x12\'\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\"\x85\x06\n\x0fNativeDashboard\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12G\n\ndefinition\x18\x04 \x01(\x0b\x32..google.cloud.chronicle.v1.DashboardDefinitionB\x03\xe0\x41\x01\x12;\n\x04type\x18\x05 \x01(\x0e\x32(.google.cloud.chronicle.v1.DashboardTypeB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0e\x63reate_user_id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0eupdate_user_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12N\n\x13\x64\x61shboard_user_data\x18\n \x01(\x0b\x32,.google.cloud.chronicle.v1.DashboardUserDataB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12?\n\x06\x61\x63\x63\x65ss\x18\x0c \x01(\x0e\x32*.google.cloud.chronicle.v1.DashboardAccessB\x03\xe0\x41\x03:\xac\x01\xea\x41\xa8\x01\n(chronicle.googleapis.com/NativeDashboard\x12Yprojects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}*\x10nativeDashboards2\x0fnativeDashboard\"\xab\x01\n\x1c\x43reateNativeDashboardRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12I\n\x10native_dashboard\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x02\"\x9e\x01\n\x19GetNativeDashboardRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12\x41\n\x04view\x18\x02 \x01(\x0e\x32..google.cloud.chronicle.v1.NativeDashboardViewB\x03\xe0\x41\x01\"\xd3\x01\n\x1bListNativeDashboardsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/NativeDashboard\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x41\n\x04view\x18\x04 \x01(\x0e\x32..google.cloud.chronicle.v1.NativeDashboardViewB\x03\xe0\x41\x01\"~\n\x1cListNativeDashboardsResponse\x12\x45\n\x11native_dashboards\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9f\x01\n\x1cUpdateNativeDashboardRequest\x12I\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\xac\x01\n\x1f\x44uplicateNativeDashboardRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12I\n\x10native_dashboard\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboardB\x03\xe0\x41\x02\"^\n\x1c\x44\x65leteNativeDashboardRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\"\xc6\x02\n\x0f\x41\x64\x64\x43hartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12G\n\x0f\x64\x61shboard_query\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x01\x12G\n\x0f\x64\x61shboard_chart\x18\x03 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChartB\x03\xe0\x41\x02\x12\x61\n\x0c\x63hart_layout\x18\x04 \x01(\x0b\x32\x46.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayoutB\x03\xe0\x41\x02\"\x9c\x01\n\x10\x41\x64\x64\x43hartResponse\x12\x44\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x42\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChart\"\xe4\x02\n\x10\x45\x64itChartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12G\n\x0f\x64\x61shboard_query\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardQueryB\x03\xe0\x41\x01\x12G\n\x0f\x64\x61shboard_chart\x18\x03 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChartB\x03\xe0\x41\x01\x12\x32\n\tedit_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12J\n\x11language_features\x18\x05 \x03(\x0e\x32*.google.cloud.chronicle.v1.LanguageFeatureB\x03\xe0\x41\x01\"\x9d\x01\n\x11\x45\x64itChartResponse\x12\x44\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x42\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChart\"\x9e\x01\n\x12RemoveChartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12H\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"\xa1\x01\n\x15\x44uplicateChartRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/NativeDashboard\x12H\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\"\xa2\x01\n\x16\x44uplicateChartResponse\x12\x44\n\x10native_dashboard\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.NativeDashboard\x12\x42\n\x0f\x64\x61shboard_chart\x18\x02 \x01(\x0b\x32).google.cloud.chronicle.v1.DashboardChart\"\\\n\x11\x44\x61shboardUserData\x12\x34\n\x10last_viewed_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\tis_pinned\x18\x02 \x01(\x08\"\xf3\x03\n\x13\x44\x61shboardDefinition\x12;\n\x07\x66ilters\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DashboardFilter\x12\x13\n\x0b\x66ingerprint\x18\x02 \x01(\t\x12J\n\x06\x63harts\x18\x04 \x03(\x0b\x32:.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig\x1a\xbd\x02\n\x0b\x43hartConfig\x12H\n\x0f\x64\x61shboard_chart\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'chronicle.googleapis.com/DashboardChart\x12\\\n\x0c\x63hart_layout\x18\x02 \x01(\x0b\x32\x46.google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout\x12\x13\n\x0b\x66ilters_ids\x18\x04 \x03(\t\x1aq\n\x0b\x43hartLayout\x12\x14\n\x07start_x\x18\t \x01(\x05H\x00\x88\x01\x01\x12\x0e\n\x06span_x\x18\n \x01(\x05\x12\x14\n\x07start_y\x18\x0b \x01(\x05H\x01\x88\x01\x01\x12\x0e\n\x06span_y\x18\x0c \x01(\x05\x42\n\n\x08_start_xB\n\n\x08_start_y*r\n\rDashboardType\x12\x1e\n\x1a\x44\x41SHBOARD_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x43URATED\x10\x01\x12\x0b\n\x07PRIVATE\x10\x02\x12\n\n\x06PUBLIC\x10\x03\x12\n\n\x06\x43USTOM\x10\x04\x12\x0f\n\x0bMARKETPLACE\x10\x05*`\n\x0f\x44\x61shboardAccess\x12 \n\x1c\x44\x41SHBOARD_ACCESS_UNSPECIFIED\x10\x00\x12\x15\n\x11\x44\x41SHBOARD_PRIVATE\x10\x01\x12\x14\n\x10\x44\x41SHBOARD_PUBLIC\x10\x02*}\n\x13NativeDashboardView\x12%\n!NATIVE_DASHBOARD_VIEW_UNSPECIFIED\x10\x00\x12\x1f\n\x1bNATIVE_DASHBOARD_VIEW_BASIC\x10\x01\x12\x1e\n\x1aNATIVE_DASHBOARD_VIEW_FULL\x10\x02\x32\x86\x17\n\x16NativeDashboardService\x12\xf2\x01\n\x15\x43reateNativeDashboard\x12\x37.google.cloud.chronicle.v1.CreateNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"t\xda\x41\x17parent,native_dashboard\x82\xd3\xe4\x93\x02T\"@/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:\x10native_dashboard\x12\xc7\x01\n\x12GetNativeDashboard\x12\x34.google.cloud.chronicle.v1.GetNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}\x12\xda\x01\n\x14ListNativeDashboards\x12\x36.google.cloud.chronicle.v1.ListNativeDashboardsRequest\x1a\x37.google.cloud.chronicle.v1.ListNativeDashboardsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards\x12\x89\x02\n\x15UpdateNativeDashboard\x12\x37.google.cloud.chronicle.v1.UpdateNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"\x8a\x01\xda\x41\x1cnative_dashboard,update_mask\x82\xd3\xe4\x93\x02\x65\x32Q/v1/{native_dashboard.name=projects/*/locations/*/instances/*/nativeDashboards/*}:\x10native_dashboard\x12\xf2\x01\n\x18\x44uplicateNativeDashboard\x12:.google.cloud.chronicle.v1.DuplicateNativeDashboardRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"n\xda\x41\x16name, native_dashboard\x82\xd3\xe4\x93\x02O\"J/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:duplicate:\x01*\x12\xb9\x01\n\x15\x44\x65leteNativeDashboard\x12\x37.google.cloud.chronicle.v1.DeleteNativeDashboardRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}\x12\xe2\x01\n\x08\x41\x64\x64\x43hart\x12*.google.cloud.chronicle.v1.AddChartRequest\x1a+.google.cloud.chronicle.v1.AddChartResponse\"}\xda\x41&name, dashboard_query, dashboard_chart\x82\xd3\xe4\x93\x02N\"I/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:addChart:\x01*\x12\xc8\x01\n\x0bRemoveChart\x12-.google.cloud.chronicle.v1.RemoveChartRequest\x1a*.google.cloud.chronicle.v1.NativeDashboard\"^\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\"L/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:removeChart:\x01*\x12\xf2\x01\n\tEditChart\x12+.google.cloud.chronicle.v1.EditChartRequest\x1a,.google.cloud.chronicle.v1.EditChartResponse\"\x89\x01\xda\x41\x31name, dashboard_query, dashboard_chart, edit_mask\x82\xd3\xe4\x93\x02O\"J/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:editChart:\x01*\x12\xd8\x01\n\x0e\x44uplicateChart\x12\x30.google.cloud.chronicle.v1.DuplicateChartRequest\x1a\x31.google.cloud.chronicle.v1.DuplicateChartResponse\"a\xda\x41\x04name\x82\xd3\xe4\x93\x02T\"O/v1/{name=projects/*/locations/*/instances/*/nativeDashboards/*}:duplicateChart:\x01*\x12\xf1\x01\n\x16\x45xportNativeDashboards\x12\x38.google.cloud.chronicle.v1.ExportNativeDashboardsRequest\x1a\x39.google.cloud.chronicle.v1.ExportNativeDashboardsResponse\"b\xda\x41\rparent, names\x82\xd3\xe4\x93\x02L\"G/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:export:\x01*\x12\xf1\x01\n\x16ImportNativeDashboards\x12\x38.google.cloud.chronicle.v1.ImportNativeDashboardsRequest\x1a\x39.google.cloud.chronicle.v1.ImportNativeDashboardsResponse\"b\xda\x41\rparent,source\x82\xd3\xe4\x93\x02L\"G/v1/{parent=projects/*/locations/*/instances/*}/nativeDashboards:import:\x01*\x1a\xaa\x01\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/chronicle,https://www.googleapis.com/auth/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\xcb\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x14NativeDashboardProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - ExportNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExportNativeDashboardsRequest").msgclass - ExportNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ExportNativeDashboardsResponse").msgclass - InlineDestination = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InlineDestination").msgclass - NativeDashboardWithChartsAndQueries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.NativeDashboardWithChartsAndQueries").msgclass - ImportNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportNativeDashboardsRequest").msgclass - ImportNativeDashboardsInlineSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportNativeDashboardsInlineSource").msgclass - ImportNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportNativeDashboardsResponse").msgclass - ImportExportStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ImportExportStatus").msgclass - NativeDashboard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.NativeDashboard").msgclass - CreateNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateNativeDashboardRequest").msgclass - GetNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetNativeDashboardRequest").msgclass - ListNativeDashboardsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListNativeDashboardsRequest").msgclass - ListNativeDashboardsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListNativeDashboardsResponse").msgclass - UpdateNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateNativeDashboardRequest").msgclass - DuplicateNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DuplicateNativeDashboardRequest").msgclass - DeleteNativeDashboardRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteNativeDashboardRequest").msgclass - AddChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AddChartRequest").msgclass - AddChartResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.AddChartResponse").msgclass - EditChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.EditChartRequest").msgclass - EditChartResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.EditChartResponse").msgclass - RemoveChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RemoveChartRequest").msgclass - DuplicateChartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DuplicateChartRequest").msgclass - DuplicateChartResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DuplicateChartResponse").msgclass - DashboardUserData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardUserData").msgclass - DashboardDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardDefinition").msgclass - DashboardDefinition::ChartConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardDefinition.ChartConfig").msgclass - DashboardDefinition::ChartConfig::ChartLayout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardDefinition.ChartConfig.ChartLayout").msgclass - DashboardType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardType").enummodule - DashboardAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DashboardAccess").enummodule - NativeDashboardView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.NativeDashboardView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.rb deleted file mode 100644 index f3a0d86312bc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/native_dashboard_service/credentials" -require "google/cloud/chronicle/v1/native_dashboard_service/paths" -require "google/cloud/chronicle/v1/native_dashboard_service/client" -require "google/cloud/chronicle/v1/native_dashboard_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # A service providing functionality for managing native dashboards. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/native_dashboard_service" - # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/native_dashboard_service/rest" - # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - module NativeDashboardService - end - end - end - end -end - -helper_path = ::File.join __dir__, "native_dashboard_service", "helpers.rb" -require "google/cloud/chronicle/v1/native_dashboard_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb deleted file mode 100644 index 4c00e3fd8a9d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/client.rb +++ /dev/null @@ -1,1611 +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/chronicle/v1/native_dashboard_pb" - -module Google - module Cloud - module Chronicle - module V1 - module NativeDashboardService - ## - # Client for the NativeDashboardService service. - # - # A service providing functionality for managing native dashboards. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :native_dashboard_service_stub - - ## - # Configure the NativeDashboardService Client class. - # - # See {::Google::Cloud::Chronicle::V1::NativeDashboardService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NativeDashboardService clients - # ::Google::Cloud::Chronicle::V1::NativeDashboardService::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", "Chronicle", "V1"] - 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_native_dashboard.timeout = 60.0 - - default_config.rpcs.get_native_dashboard.timeout = 60.0 - default_config.rpcs.get_native_dashboard.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_native_dashboards.timeout = 60.0 - default_config.rpcs.list_native_dashboards.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_native_dashboard.timeout = 60.0 - - default_config.rpcs.duplicate_native_dashboard.timeout = 60.0 - - default_config.rpcs.delete_native_dashboard.timeout = 60.0 - - default_config.rpcs.add_chart.timeout = 60.0 - - default_config.rpcs.remove_chart.timeout = 60.0 - - default_config.rpcs.edit_chart.timeout = 60.0 - - default_config.rpcs.duplicate_chart.timeout = 60.0 - - default_config.rpcs.export_native_dashboards.timeout = 60.0 - default_config.rpcs.export_native_dashboards.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.import_native_dashboards.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::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 - @native_dashboard_service_stub.universe_domain - end - - ## - # Create a new NativeDashboardService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NativeDashboardService 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/chronicle/v1/native_dashboard_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 - - @native_dashboard_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::NativeDashboardService::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 - ) - - @native_dashboard_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @native_dashboard_service_stub.logger - end - - # Service calls - - ## - # Create a dashboard. - # - # @overload create_native_dashboard(request, options = nil) - # Pass arguments to `create_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, ::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_native_dashboard(parent: nil, native_dashboard: nil) - # Pass arguments to `create_native_dashboard` 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 parent resource where this dashboard will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] - # Required. The dashboard to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new - # - # # Call the create_native_dashboard method. - # result = client.create_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - # p result - # - def create_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest - - # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :create_native_dashboard, 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 - - ## - # Get a dashboard. - # - # @overload get_native_dashboard(request, options = nil) - # Pass arguments to `get_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, ::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_native_dashboard(name: nil, view: nil) - # Pass arguments to `get_native_dashboard` 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 dashboard name to fetch. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] - # Optional. View indicates the scope of fields to populate when returning the - # dashboard resource. If unspecified, defaults to the basic view. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new - # - # # Call the get_native_dashboard method. - # result = client.get_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - # p result - # - def get_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest - - # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :get_native_dashboard, 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 - - ## - # List all dashboards. - # - # @overload list_native_dashboards(request, options = nil) - # Pass arguments to `list_native_dashboards` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, ::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_native_dashboards(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_native_dashboards` 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 parent owning this dashboard collection. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param page_size [::Integer] - # Optional. The maximum number of dashboards to return. The service may - # return fewer than this value. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDashboards` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDashboards` must - # match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] - # Optional. View indicates the scope of fields to populate when returning the - # dashboard resource. If unspecified, defaults to the basic view. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new - # - # # Call the list_native_dashboards method. - # result = client.list_native_dashboards 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::Chronicle::V1::NativeDashboard. - # p item - # end - # - def list_native_dashboards request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest - - # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_native_dashboards.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :list_native_dashboards, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @native_dashboard_service_stub, :list_native_dashboards, 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 - - ## - # Update a dashboard. - # - # @overload update_native_dashboard(request, options = nil) - # Pass arguments to `update_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, ::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_native_dashboard(native_dashboard: nil, update_mask: nil) - # Pass arguments to `update_native_dashboard` 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 native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] - # Required. The dashboard to update. - # - # The dashboard's `name` field is used to identify the dashboard to update. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. LINT.IfChange(update_mask_values) - # The list of fields to update. - # Supported paths are - - # display_name - # description - # definition.filters - # definition.charts - # type - # access - # dashboard_user_data.is_pinned - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new - # - # # Call the update_native_dashboard method. - # result = client.update_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - # p result - # - def update_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest - - # 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_native_dashboard.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::Chronicle::V1::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.native_dashboard&.name - header_params["native_dashboard.name"] = request.native_dashboard.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_native_dashboard.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :update_native_dashboard, 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 - - ## - # Duplicate a dashboard. - # - # @overload duplicate_native_dashboard(request, options = nil) - # Pass arguments to `duplicate_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, ::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 duplicate_native_dashboard(name: nil, native_dashboard: nil) - # Pass arguments to `duplicate_native_dashboard` 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 dashboard name to duplicate. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] - # Required. Any fields that need modification can be passed through this like - # name, description etc. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new - # - # # Call the duplicate_native_dashboard method. - # result = client.duplicate_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - # p result - # - def duplicate_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest - - # 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.duplicate_native_dashboard.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::Chronicle::V1::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.duplicate_native_dashboard.timeout, - metadata: metadata, - retry_policy: @config.rpcs.duplicate_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :duplicate_native_dashboard, 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 - - ## - # Delete a dashboard. - # - # @overload delete_native_dashboard(request, options = nil) - # Pass arguments to `delete_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, ::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_native_dashboard(name: nil) - # Pass arguments to `delete_native_dashboard` 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 dashboard name to delete. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new - # - # # Call the delete_native_dashboard method. - # result = client.delete_native_dashboard request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest - - # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :delete_native_dashboard, 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 - - ## - # Add chart in a dashboard. - # - # @overload add_chart(request, options = nil) - # Pass arguments to `add_chart` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::AddChartRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::AddChartRequest, ::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 add_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, chart_layout: nil) - # Pass arguments to `add_chart` 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 dashboard name to add chart in. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] - # Optional. Query used to create the chart. - # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] - # Required. Chart to be added to the dashboard. - # @param chart_layout [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout, ::Hash] - # Required. ChartLayout for newly added chart. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::AddChartResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::AddChartResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::AddChartRequest.new - # - # # Call the add_chart method. - # result = client.add_chart request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::AddChartResponse. - # p result - # - def add_chart request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::AddChartRequest - - # 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.add_chart.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::Chronicle::V1::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.add_chart.timeout, - metadata: metadata, - retry_policy: @config.rpcs.add_chart.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :add_chart, 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 - - ## - # Remove chart from a dashboard. - # - # @overload remove_chart(request, options = nil) - # Pass arguments to `remove_chart` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::RemoveChartRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::RemoveChartRequest, ::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 remove_chart(name: nil, dashboard_chart: nil) - # Pass arguments to `remove_chart` 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 dashboard name to remove chart from. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param dashboard_chart [::String] - # Required. The dashboard chart name to remove. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::RemoveChartRequest.new - # - # # Call the remove_chart method. - # result = client.remove_chart request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - # p result - # - def remove_chart request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::RemoveChartRequest - - # 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.remove_chart.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::Chronicle::V1::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.remove_chart.timeout, - metadata: metadata, - retry_policy: @config.rpcs.remove_chart.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :remove_chart, 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 - - ## - # Edit chart in a dashboard. - # - # @overload edit_chart(request, options = nil) - # Pass arguments to `edit_chart` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::EditChartRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::EditChartRequest, ::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 edit_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, edit_mask: nil, language_features: nil) - # Pass arguments to `edit_chart` 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 dashboard name to edit chart in. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] - # Optional. Query for the edited chart. - # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] - # Optional. Edited chart. - # @param edit_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to edit for chart and query. - # Supported paths in chart are - - # dashboard_chart.display_name - # dashboard_chart.description - # dashboard_chart.chart_datasource.data_sources - # dashboard_chart.visualization - # dashboard_chart.visualization.button - # dashboard_chart.visualization.markdown - # dashboard_chart.drill_down_config - # Supported paths in query are - - # dashboard_query.query - # dashboard_query.input - # @param language_features [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] - # Optional. Language Features present in the query. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::EditChartResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::EditChartResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::EditChartRequest.new - # - # # Call the edit_chart method. - # result = client.edit_chart request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::EditChartResponse. - # p result - # - def edit_chart request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::EditChartRequest - - # 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.edit_chart.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::Chronicle::V1::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.edit_chart.timeout, - metadata: metadata, - retry_policy: @config.rpcs.edit_chart.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :edit_chart, 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 - - ## - # Duplicate chart in a dashboard. - # - # @overload duplicate_chart(request, options = nil) - # Pass arguments to `duplicate_chart` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DuplicateChartRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DuplicateChartRequest, ::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 duplicate_chart(name: nil, dashboard_chart: nil) - # Pass arguments to `duplicate_chart` 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 dashboard name that involves chart duplication. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param dashboard_chart [::String] - # Required. The dashboard chart name to duplicate. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DuplicateChartRequest.new - # - # # Call the duplicate_chart method. - # result = client.duplicate_chart request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DuplicateChartResponse. - # p result - # - def duplicate_chart request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateChartRequest - - # 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.duplicate_chart.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::Chronicle::V1::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.duplicate_chart.timeout, - metadata: metadata, - retry_policy: @config.rpcs.duplicate_chart.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :duplicate_chart, 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 - - ## - # Exports the dashboards. - # - # @overload export_native_dashboards(request, options = nil) - # Pass arguments to `export_native_dashboards` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, names: nil) - # Pass arguments to `export_native_dashboards` 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 parent resource that the dashboards to be exported belong to. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param names [::Array<::String>] - # Required. The resource names of the dashboards to export. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new - # - # # Call the export_native_dashboards method. - # result = client.export_native_dashboards request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse. - # p result - # - def export_native_dashboards request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest - - # 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_native_dashboards.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::Chronicle::V1::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.export_native_dashboards.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_native_dashboards.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :export_native_dashboards, 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 - - ## - # Imports the dashboards. - # - # @overload import_native_dashboards(request, options = nil) - # Pass arguments to `import_native_dashboards` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, source: nil) - # Pass arguments to `import_native_dashboards` 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 parent resource where this dashboard will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param source [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource, ::Hash] - # Required. The data will imported from this proto. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new - # - # # Call the import_native_dashboards method. - # result = client.import_native_dashboards request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse. - # p result - # - def import_native_dashboards request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest - - # 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_native_dashboards.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::Chronicle::V1::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.import_native_dashboards.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_native_dashboards.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.call_rpc :import_native_dashboards, 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 - - ## - # Configuration class for the NativeDashboardService API. - # - # This class represents the configuration for NativeDashboardService, - # 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::Chronicle::V1::NativeDashboardService::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_native_dashboard to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_native_dashboard.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_native_dashboard.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::Chronicle::V1::NativeDashboardService::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. - # * `: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 = "chronicle.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 NativeDashboardService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :create_native_dashboard - ## - # RPC-specific configuration for `get_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :get_native_dashboard - ## - # RPC-specific configuration for `list_native_dashboards` - # @return [::Gapic::Config::Method] - # - attr_reader :list_native_dashboards - ## - # RPC-specific configuration for `update_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :update_native_dashboard - ## - # RPC-specific configuration for `duplicate_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :duplicate_native_dashboard - ## - # RPC-specific configuration for `delete_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_native_dashboard - ## - # RPC-specific configuration for `add_chart` - # @return [::Gapic::Config::Method] - # - attr_reader :add_chart - ## - # RPC-specific configuration for `remove_chart` - # @return [::Gapic::Config::Method] - # - attr_reader :remove_chart - ## - # RPC-specific configuration for `edit_chart` - # @return [::Gapic::Config::Method] - # - attr_reader :edit_chart - ## - # RPC-specific configuration for `duplicate_chart` - # @return [::Gapic::Config::Method] - # - attr_reader :duplicate_chart - ## - # RPC-specific configuration for `export_native_dashboards` - # @return [::Gapic::Config::Method] - # - attr_reader :export_native_dashboards - ## - # RPC-specific configuration for `import_native_dashboards` - # @return [::Gapic::Config::Method] - # - attr_reader :import_native_dashboards - - # @private - def initialize parent_rpcs = nil - create_native_dashboard_config = parent_rpcs.create_native_dashboard if parent_rpcs.respond_to? :create_native_dashboard - @create_native_dashboard = ::Gapic::Config::Method.new create_native_dashboard_config - get_native_dashboard_config = parent_rpcs.get_native_dashboard if parent_rpcs.respond_to? :get_native_dashboard - @get_native_dashboard = ::Gapic::Config::Method.new get_native_dashboard_config - list_native_dashboards_config = parent_rpcs.list_native_dashboards if parent_rpcs.respond_to? :list_native_dashboards - @list_native_dashboards = ::Gapic::Config::Method.new list_native_dashboards_config - update_native_dashboard_config = parent_rpcs.update_native_dashboard if parent_rpcs.respond_to? :update_native_dashboard - @update_native_dashboard = ::Gapic::Config::Method.new update_native_dashboard_config - duplicate_native_dashboard_config = parent_rpcs.duplicate_native_dashboard if parent_rpcs.respond_to? :duplicate_native_dashboard - @duplicate_native_dashboard = ::Gapic::Config::Method.new duplicate_native_dashboard_config - delete_native_dashboard_config = parent_rpcs.delete_native_dashboard if parent_rpcs.respond_to? :delete_native_dashboard - @delete_native_dashboard = ::Gapic::Config::Method.new delete_native_dashboard_config - add_chart_config = parent_rpcs.add_chart if parent_rpcs.respond_to? :add_chart - @add_chart = ::Gapic::Config::Method.new add_chart_config - remove_chart_config = parent_rpcs.remove_chart if parent_rpcs.respond_to? :remove_chart - @remove_chart = ::Gapic::Config::Method.new remove_chart_config - edit_chart_config = parent_rpcs.edit_chart if parent_rpcs.respond_to? :edit_chart - @edit_chart = ::Gapic::Config::Method.new edit_chart_config - duplicate_chart_config = parent_rpcs.duplicate_chart if parent_rpcs.respond_to? :duplicate_chart - @duplicate_chart = ::Gapic::Config::Method.new duplicate_chart_config - export_native_dashboards_config = parent_rpcs.export_native_dashboards if parent_rpcs.respond_to? :export_native_dashboards - @export_native_dashboards = ::Gapic::Config::Method.new export_native_dashboards_config - import_native_dashboards_config = parent_rpcs.import_native_dashboards if parent_rpcs.respond_to? :import_native_dashboards - @import_native_dashboards = ::Gapic::Config::Method.new import_native_dashboards_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb deleted file mode 100644 index ac3f7512afa5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/credentials.rb +++ /dev/null @@ -1,49 +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 Chronicle - module V1 - module NativeDashboardService - # Credentials for the NativeDashboardService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/chronicle", - "https://www.googleapis.com/auth/chronicle.readonly", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb deleted file mode 100644 index 0b8f9b39f7ea..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/paths.rb +++ /dev/null @@ -1,115 +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 Chronicle - module V1 - module NativeDashboardService - # Path helper methods for the NativeDashboardService API. - module Paths - ## - # Create a fully-qualified DashboardChart resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dashboardCharts/{chart}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param chart [String] - # - # @return [::String] - def dashboard_chart_path project:, location:, instance:, chart: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardCharts/#{chart}" - end - - ## - # Create a fully-qualified DashboardQuery resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dashboardQueries/{query}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param query [String] - # - # @return [::String] - def dashboard_query_path project:, location:, instance:, query: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dashboardQueries/#{query}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified NativeDashboard resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/nativeDashboards/{dashboard}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param dashboard [String] - # - # @return [::String] - def native_dashboard_path project:, location:, instance:, dashboard: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/nativeDashboards/#{dashboard}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.rb deleted file mode 100644 index 2a050c29ca53..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/native_dashboard_service/credentials" -require "google/cloud/chronicle/v1/native_dashboard_service/paths" -require "google/cloud/chronicle/v1/native_dashboard_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # A service providing functionality for managing native dashboards. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/native_dashboard_service/rest" - # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - module NativeDashboardService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/native_dashboard_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb deleted file mode 100644 index 0445e075d588..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/client.rb +++ /dev/null @@ -1,1484 +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/chronicle/v1/native_dashboard_pb" -require "google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module NativeDashboardService - module Rest - ## - # REST client for the NativeDashboardService service. - # - # A service providing functionality for managing native dashboards. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :native_dashboard_service_stub - - ## - # Configure the NativeDashboardService Client class. - # - # See {::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all NativeDashboardService clients - # ::Google::Cloud::Chronicle::V1::NativeDashboardService::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", "Chronicle", "V1"] - 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_native_dashboard.timeout = 60.0 - - default_config.rpcs.get_native_dashboard.timeout = 60.0 - default_config.rpcs.get_native_dashboard.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_native_dashboards.timeout = 60.0 - default_config.rpcs.list_native_dashboards.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_native_dashboard.timeout = 60.0 - - default_config.rpcs.duplicate_native_dashboard.timeout = 60.0 - - default_config.rpcs.delete_native_dashboard.timeout = 60.0 - - default_config.rpcs.add_chart.timeout = 60.0 - - default_config.rpcs.remove_chart.timeout = 60.0 - - default_config.rpcs.edit_chart.timeout = 60.0 - - default_config.rpcs.duplicate_chart.timeout = 60.0 - - default_config.rpcs.export_native_dashboards.timeout = 60.0 - default_config.rpcs.export_native_dashboards.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.import_native_dashboards.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::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 - @native_dashboard_service_stub.universe_domain - end - - ## - # Create a new NativeDashboardService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the NativeDashboardService 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 - - @native_dashboard_service_stub = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @native_dashboard_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @native_dashboard_service_stub.logger - end - - # Service calls - - ## - # Create a dashboard. - # - # @overload create_native_dashboard(request, options = nil) - # Pass arguments to `create_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, ::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_native_dashboard(parent: nil, native_dashboard: nil) - # Pass arguments to `create_native_dashboard` 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 parent resource where this dashboard will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] - # Required. The dashboard to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new - # - # # Call the create_native_dashboard method. - # result = client.create_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - # p result - # - def create_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest - - # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.create_native_dashboard 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 - - ## - # Get a dashboard. - # - # @overload get_native_dashboard(request, options = nil) - # Pass arguments to `get_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, ::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_native_dashboard(name: nil, view: nil) - # Pass arguments to `get_native_dashboard` 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 dashboard name to fetch. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] - # Optional. View indicates the scope of fields to populate when returning the - # dashboard resource. If unspecified, defaults to the basic view. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new - # - # # Call the get_native_dashboard method. - # result = client.get_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - # p result - # - def get_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest - - # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.get_native_dashboard 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 - - ## - # List all dashboards. - # - # @overload list_native_dashboards(request, options = nil) - # Pass arguments to `list_native_dashboards` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, ::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_native_dashboards(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_native_dashboards` 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 parent owning this dashboard collection. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param page_size [::Integer] - # Optional. The maximum number of dashboards to return. The service may - # return fewer than this value. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDashboards` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDashboards` must - # match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::NativeDashboardView] - # Optional. View indicates the scope of fields to populate when returning the - # dashboard resource. If unspecified, defaults to the basic view. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::NativeDashboard>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new - # - # # Call the list_native_dashboards method. - # result = client.list_native_dashboards 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::Chronicle::V1::NativeDashboard. - # p item - # end - # - def list_native_dashboards request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest - - # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_native_dashboards.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.list_native_dashboards request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @native_dashboard_service_stub, :list_native_dashboards, "native_dashboards", 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 - - ## - # Update a dashboard. - # - # @overload update_native_dashboard(request, options = nil) - # Pass arguments to `update_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, ::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_native_dashboard(native_dashboard: nil, update_mask: nil) - # Pass arguments to `update_native_dashboard` 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 native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] - # Required. The dashboard to update. - # - # The dashboard's `name` field is used to identify the dashboard to update. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. LINT.IfChange(update_mask_values) - # The list of fields to update. - # Supported paths are - - # display_name - # description - # definition.filters - # definition.charts - # type - # access - # dashboard_user_data.is_pinned - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new - # - # # Call the update_native_dashboard method. - # result = client.update_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - # p result - # - def update_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest - - # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.update_native_dashboard 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 - - ## - # Duplicate a dashboard. - # - # @overload duplicate_native_dashboard(request, options = nil) - # Pass arguments to `duplicate_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, ::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 duplicate_native_dashboard(name: nil, native_dashboard: nil) - # Pass arguments to `duplicate_native_dashboard` 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 dashboard name to duplicate. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param native_dashboard [::Google::Cloud::Chronicle::V1::NativeDashboard, ::Hash] - # Required. Any fields that need modification can be passed through this like - # name, description etc. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new - # - # # Call the duplicate_native_dashboard method. - # result = client.duplicate_native_dashboard request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - # p result - # - def duplicate_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest - - # 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.duplicate_native_dashboard.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::Chronicle::V1::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.duplicate_native_dashboard.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.duplicate_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.duplicate_native_dashboard 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 - - ## - # Delete a dashboard. - # - # @overload delete_native_dashboard(request, options = nil) - # Pass arguments to `delete_native_dashboard` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, ::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_native_dashboard(name: nil) - # Pass arguments to `delete_native_dashboard` 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 dashboard name to delete. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new - # - # # Call the delete_native_dashboard method. - # result = client.delete_native_dashboard request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_native_dashboard request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest - - # 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_native_dashboard.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::Chronicle::V1::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_native_dashboard.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_native_dashboard.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.delete_native_dashboard 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 - - ## - # Add chart in a dashboard. - # - # @overload add_chart(request, options = nil) - # Pass arguments to `add_chart` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::AddChartRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::AddChartRequest, ::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 add_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, chart_layout: nil) - # Pass arguments to `add_chart` 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 dashboard name to add chart in. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] - # Optional. Query used to create the chart. - # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] - # Required. Chart to be added to the dashboard. - # @param chart_layout [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout, ::Hash] - # Required. ChartLayout for newly added chart. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::AddChartResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::AddChartResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::AddChartRequest.new - # - # # Call the add_chart method. - # result = client.add_chart request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::AddChartResponse. - # p result - # - def add_chart request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::AddChartRequest - - # 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.add_chart.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::Chronicle::V1::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.add_chart.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.add_chart.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.add_chart 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 - - ## - # Remove chart from a dashboard. - # - # @overload remove_chart(request, options = nil) - # Pass arguments to `remove_chart` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::RemoveChartRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::RemoveChartRequest, ::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 remove_chart(name: nil, dashboard_chart: nil) - # Pass arguments to `remove_chart` 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 dashboard name to remove chart from. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param dashboard_chart [::String] - # Required. The dashboard chart name to remove. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::RemoveChartRequest.new - # - # # Call the remove_chart method. - # result = client.remove_chart request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - # p result - # - def remove_chart request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::RemoveChartRequest - - # 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.remove_chart.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::Chronicle::V1::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.remove_chart.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.remove_chart.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.remove_chart 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 - - ## - # Edit chart in a dashboard. - # - # @overload edit_chart(request, options = nil) - # Pass arguments to `edit_chart` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::EditChartRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::EditChartRequest, ::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 edit_chart(name: nil, dashboard_query: nil, dashboard_chart: nil, edit_mask: nil, language_features: nil) - # Pass arguments to `edit_chart` 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 dashboard name to edit chart in. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param dashboard_query [::Google::Cloud::Chronicle::V1::DashboardQuery, ::Hash] - # Optional. Query for the edited chart. - # @param dashboard_chart [::Google::Cloud::Chronicle::V1::DashboardChart, ::Hash] - # Optional. Edited chart. - # @param edit_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to edit for chart and query. - # Supported paths in chart are - - # dashboard_chart.display_name - # dashboard_chart.description - # dashboard_chart.chart_datasource.data_sources - # dashboard_chart.visualization - # dashboard_chart.visualization.button - # dashboard_chart.visualization.markdown - # dashboard_chart.drill_down_config - # Supported paths in query are - - # dashboard_query.query - # dashboard_query.input - # @param language_features [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] - # Optional. Language Features present in the query. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::EditChartResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::EditChartResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::EditChartRequest.new - # - # # Call the edit_chart method. - # result = client.edit_chart request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::EditChartResponse. - # p result - # - def edit_chart request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::EditChartRequest - - # 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.edit_chart.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::Chronicle::V1::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.edit_chart.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.edit_chart.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.edit_chart 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 - - ## - # Duplicate chart in a dashboard. - # - # @overload duplicate_chart(request, options = nil) - # Pass arguments to `duplicate_chart` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DuplicateChartRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DuplicateChartRequest, ::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 duplicate_chart(name: nil, dashboard_chart: nil) - # Pass arguments to `duplicate_chart` 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 dashboard name that involves chart duplication. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @param dashboard_chart [::String] - # Required. The dashboard chart name to duplicate. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DuplicateChartRequest.new - # - # # Call the duplicate_chart method. - # result = client.duplicate_chart request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DuplicateChartResponse. - # p result - # - def duplicate_chart request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DuplicateChartRequest - - # 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.duplicate_chart.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::Chronicle::V1::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.duplicate_chart.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.duplicate_chart.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.duplicate_chart 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 - - ## - # Exports the dashboards. - # - # @overload export_native_dashboards(request, options = nil) - # Pass arguments to `export_native_dashboards` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, names: nil) - # Pass arguments to `export_native_dashboards` 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 parent resource that the dashboards to be exported belong to. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param names [::Array<::String>] - # Required. The resource names of the dashboards to export. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new - # - # # Call the export_native_dashboards method. - # result = client.export_native_dashboards request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse. - # p result - # - def export_native_dashboards request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest - - # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_native_dashboards.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.export_native_dashboards 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 - - ## - # Imports the dashboards. - # - # @overload import_native_dashboards(request, options = nil) - # Pass arguments to `import_native_dashboards` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, ::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_native_dashboards(parent: nil, source: nil) - # Pass arguments to `import_native_dashboards` 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 parent resource where this dashboard will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @param source [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource, ::Hash] - # Required. The data will imported from this proto. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new - # - # # Call the import_native_dashboards method. - # result = client.import_native_dashboards request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse. - # p result - # - def import_native_dashboards request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest - - # 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_native_dashboards.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::Chronicle::V1::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_native_dashboards.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_native_dashboards.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @native_dashboard_service_stub.import_native_dashboards 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 - - ## - # Configuration class for the NativeDashboardService REST API. - # - # This class represents the configuration for NativeDashboardService 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::Chronicle::V1::NativeDashboardService::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_native_dashboard to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_native_dashboard.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_native_dashboard.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. - # * `: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 = "chronicle.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 NativeDashboardService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :create_native_dashboard - ## - # RPC-specific configuration for `get_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :get_native_dashboard - ## - # RPC-specific configuration for `list_native_dashboards` - # @return [::Gapic::Config::Method] - # - attr_reader :list_native_dashboards - ## - # RPC-specific configuration for `update_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :update_native_dashboard - ## - # RPC-specific configuration for `duplicate_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :duplicate_native_dashboard - ## - # RPC-specific configuration for `delete_native_dashboard` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_native_dashboard - ## - # RPC-specific configuration for `add_chart` - # @return [::Gapic::Config::Method] - # - attr_reader :add_chart - ## - # RPC-specific configuration for `remove_chart` - # @return [::Gapic::Config::Method] - # - attr_reader :remove_chart - ## - # RPC-specific configuration for `edit_chart` - # @return [::Gapic::Config::Method] - # - attr_reader :edit_chart - ## - # RPC-specific configuration for `duplicate_chart` - # @return [::Gapic::Config::Method] - # - attr_reader :duplicate_chart - ## - # RPC-specific configuration for `export_native_dashboards` - # @return [::Gapic::Config::Method] - # - attr_reader :export_native_dashboards - ## - # RPC-specific configuration for `import_native_dashboards` - # @return [::Gapic::Config::Method] - # - attr_reader :import_native_dashboards - - # @private - def initialize parent_rpcs = nil - create_native_dashboard_config = parent_rpcs.create_native_dashboard if parent_rpcs.respond_to? :create_native_dashboard - @create_native_dashboard = ::Gapic::Config::Method.new create_native_dashboard_config - get_native_dashboard_config = parent_rpcs.get_native_dashboard if parent_rpcs.respond_to? :get_native_dashboard - @get_native_dashboard = ::Gapic::Config::Method.new get_native_dashboard_config - list_native_dashboards_config = parent_rpcs.list_native_dashboards if parent_rpcs.respond_to? :list_native_dashboards - @list_native_dashboards = ::Gapic::Config::Method.new list_native_dashboards_config - update_native_dashboard_config = parent_rpcs.update_native_dashboard if parent_rpcs.respond_to? :update_native_dashboard - @update_native_dashboard = ::Gapic::Config::Method.new update_native_dashboard_config - duplicate_native_dashboard_config = parent_rpcs.duplicate_native_dashboard if parent_rpcs.respond_to? :duplicate_native_dashboard - @duplicate_native_dashboard = ::Gapic::Config::Method.new duplicate_native_dashboard_config - delete_native_dashboard_config = parent_rpcs.delete_native_dashboard if parent_rpcs.respond_to? :delete_native_dashboard - @delete_native_dashboard = ::Gapic::Config::Method.new delete_native_dashboard_config - add_chart_config = parent_rpcs.add_chart if parent_rpcs.respond_to? :add_chart - @add_chart = ::Gapic::Config::Method.new add_chart_config - remove_chart_config = parent_rpcs.remove_chart if parent_rpcs.respond_to? :remove_chart - @remove_chart = ::Gapic::Config::Method.new remove_chart_config - edit_chart_config = parent_rpcs.edit_chart if parent_rpcs.respond_to? :edit_chart - @edit_chart = ::Gapic::Config::Method.new edit_chart_config - duplicate_chart_config = parent_rpcs.duplicate_chart if parent_rpcs.respond_to? :duplicate_chart - @duplicate_chart = ::Gapic::Config::Method.new duplicate_chart_config - export_native_dashboards_config = parent_rpcs.export_native_dashboards if parent_rpcs.respond_to? :export_native_dashboards - @export_native_dashboards = ::Gapic::Config::Method.new export_native_dashboards_config - import_native_dashboards_config = parent_rpcs.import_native_dashboards if parent_rpcs.respond_to? :import_native_dashboards - @import_native_dashboards = ::Gapic::Config::Method.new import_native_dashboards_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb deleted file mode 100644 index 86cf453f442d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_service/rest/service_stub.rb +++ /dev/null @@ -1,822 +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/chronicle/v1/native_dashboard_pb" - -module Google - module Cloud - module Chronicle - module V1 - module NativeDashboardService - module Rest - ## - # REST service stub for the NativeDashboardService 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_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest] - # 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::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # A result object deserialized from the server's reply - def create_native_dashboard request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_native_dashboard_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_native_dashboard", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::NativeDashboard.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_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest] - # 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::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # A result object deserialized from the server's reply - def get_native_dashboard request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_native_dashboard_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_native_dashboard", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::NativeDashboard.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_native_dashboards REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest] - # 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::Chronicle::V1::ListNativeDashboardsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse] - # A result object deserialized from the server's reply - def list_native_dashboards request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_native_dashboards_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_native_dashboards", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse.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_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest] - # 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::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # A result object deserialized from the server's reply - def update_native_dashboard request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_native_dashboard_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_native_dashboard", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::NativeDashboard.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the duplicate_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest] - # 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::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # A result object deserialized from the server's reply - def duplicate_native_dashboard request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_duplicate_native_dashboard_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: "duplicate_native_dashboard", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::NativeDashboard.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_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest] - # 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_native_dashboard request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_native_dashboard_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_native_dashboard", - 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 add_chart REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::AddChartRequest] - # 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::Chronicle::V1::AddChartResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::AddChartResponse] - # A result object deserialized from the server's reply - def add_chart request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_add_chart_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: "add_chart", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::AddChartResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the remove_chart REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::RemoveChartRequest] - # 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::Chronicle::V1::NativeDashboard] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # A result object deserialized from the server's reply - def remove_chart request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_remove_chart_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: "remove_chart", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::NativeDashboard.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the edit_chart REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::EditChartRequest] - # 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::Chronicle::V1::EditChartResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::EditChartResponse] - # A result object deserialized from the server's reply - def edit_chart request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_edit_chart_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: "edit_chart", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::EditChartResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the duplicate_chart REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateChartRequest] - # 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::Chronicle::V1::DuplicateChartResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DuplicateChartResponse] - # A result object deserialized from the server's reply - def duplicate_chart request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_duplicate_chart_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: "duplicate_chart", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DuplicateChartResponse.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_native_dashboards REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest] - # 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::Chronicle::V1::ExportNativeDashboardsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse] - # A result object deserialized from the server's reply - def export_native_dashboards request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_native_dashboards_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_native_dashboards", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse.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_native_dashboards REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest] - # 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::Chronicle::V1::ImportNativeDashboardsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse] - # A result object deserialized from the server's reply - def import_native_dashboards request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_native_dashboards_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_native_dashboards", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse.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_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest] - # 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_native_dashboard_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/nativeDashboards", - body: "native_dashboard", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest] - # 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_native_dashboard_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_native_dashboards REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest] - # 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_native_dashboards_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/nativeDashboards", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest] - # 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_native_dashboard_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{native_dashboard.name}", - body: "native_dashboard", - matches: [ - ["native_dashboard.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the duplicate_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_duplicate_native_dashboard_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:duplicate", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_native_dashboard REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest] - # 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_native_dashboard_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the add_chart REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::AddChartRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_add_chart_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:addChart", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the remove_chart REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::RemoveChartRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_remove_chart_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:removeChart", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the edit_chart REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::EditChartRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_edit_chart_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:editChart", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the duplicate_chart REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DuplicateChartRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_duplicate_chart_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:duplicateChart", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/nativeDashboards/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_native_dashboards REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest] - # 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_native_dashboards_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/nativeDashboards:export", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_native_dashboards REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest] - # 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_native_dashboards_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/nativeDashboards:import", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb deleted file mode 100644 index c0256a88d967..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/native_dashboard_services_pb.rb +++ /dev/null @@ -1,67 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/native_dashboard.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# 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 -# -# 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/chronicle/v1/native_dashboard_pb' - -module Google - module Cloud - module Chronicle - module V1 - module NativeDashboardService - # A service providing functionality for managing native dashboards. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.NativeDashboardService' - - # Create a dashboard. - rpc :CreateNativeDashboard, ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard - # Get a dashboard. - rpc :GetNativeDashboard, ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard - # List all dashboards. - rpc :ListNativeDashboards, ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse - # Update a dashboard. - rpc :UpdateNativeDashboard, ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard - # Duplicate a dashboard. - rpc :DuplicateNativeDashboard, ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard - # Delete a dashboard. - rpc :DeleteNativeDashboard, ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, ::Google::Protobuf::Empty - # Add chart in a dashboard. - rpc :AddChart, ::Google::Cloud::Chronicle::V1::AddChartRequest, ::Google::Cloud::Chronicle::V1::AddChartResponse - # Remove chart from a dashboard. - rpc :RemoveChart, ::Google::Cloud::Chronicle::V1::RemoveChartRequest, ::Google::Cloud::Chronicle::V1::NativeDashboard - # Edit chart in a dashboard. - rpc :EditChart, ::Google::Cloud::Chronicle::V1::EditChartRequest, ::Google::Cloud::Chronicle::V1::EditChartResponse - # Duplicate chart in a dashboard. - rpc :DuplicateChart, ::Google::Cloud::Chronicle::V1::DuplicateChartRequest, ::Google::Cloud::Chronicle::V1::DuplicateChartResponse - # Exports the dashboards. - rpc :ExportNativeDashboards, ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse - # Imports the dashboards. - rpc :ImportNativeDashboards, ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb deleted file mode 100644 index 7cd0fc43edd1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/reference_list.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/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/chronicle/v1/reference_list.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"]\n\tScopeInfo\x12P\n\x14reference_list_scope\x18\x02 \x01(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListScopeB\x03\xe0\x41\x02\".\n\x12ReferenceListScope\x12\x18\n\x0bscope_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x93\x01\n\x17GetReferenceListRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12:\n\x04view\x18\x02 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"\xbe\x01\n\x19ListReferenceListsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12:\n\x04view\x18\x04 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"x\n\x1aListReferenceListsResponse\x12\x41\n\x0freference_lists\x18\x01 \x03(\x0b\x32(.google.cloud.chronicle.v1.ReferenceList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1a\x43reateReferenceListRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x45\n\x0ereference_list\x18\x02 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12\x1e\n\x11reference_list_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1aUpdateReferenceListRequest\x12\x45\n\x0ereference_list\x18\x01 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xaa\x04\n\rReferenceList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07\x65ntries\x18\x05 \x03(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xe0\x41\x02\x12\x12\n\x05rules\x18\x06 \x03(\tB\x03\xe0\x41\x03\x12L\n\x0bsyntax_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xe0\x41\x02\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x38\n\nscope_info\x18\x0b \x01(\x0b\x32$.google.cloud.chronicle.v1.ScopeInfo:\x8a\x01\xea\x41\x86\x01\n&chronicle.googleapis.com/ReferenceList\x12\\projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}\"(\n\x12ReferenceListEntry\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02*\xc2\x01\n\x17ReferenceListSyntaxType\x12*\n&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\x10\x00\x12\x30\n,REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\x10\x01\x12$\n REFERENCE_LIST_SYNTAX_TYPE_REGEX\x10\x02\x12#\n\x1fREFERENCE_LIST_SYNTAX_TYPE_CIDR\x10\x03*u\n\x11ReferenceListView\x12#\n\x1fREFERENCE_LIST_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19REFERENCE_LIST_VIEW_BASIC\x10\x01\x12\x1c\n\x18REFERENCE_LIST_VIEW_FULL\x10\x02\x32\xf5\x07\n\x14ReferenceListService\x12\xbf\x01\n\x10GetReferenceList\x12\x32.google.cloud.chronicle.v1.GetReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\x12\xd2\x01\n\x12ListReferenceLists\x12\x34.google.cloud.chronicle.v1.ListReferenceListsRequest\x1a\x35.google.cloud.chronicle.v1.ListReferenceListsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/referenceLists\x12\xf9\x01\n\x13\x43reateReferenceList\x12\x35.google.cloud.chronicle.v1.CreateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x80\x01\xda\x41\'parent,reference_list,reference_list_id\x82\xd3\xe4\x93\x02P\">/v1/{parent=projects/*/locations/*/instances/*}/referenceLists:\x0ereference_list\x12\xfb\x01\n\x13UpdateReferenceList\x12\x35.google.cloud.chronicle.v1.UpdateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x82\x01\xda\x41\x1areference_list,update_mask\x82\xd3\xe4\x93\x02_2M/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}:\x0ereference_list\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc9\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x12ReferenceListProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - ScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ScopeInfo").msgclass - ReferenceListScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListScope").msgclass - GetReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetReferenceListRequest").msgclass - ListReferenceListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsRequest").msgclass - ListReferenceListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsResponse").msgclass - CreateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateReferenceListRequest").msgclass - UpdateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateReferenceListRequest").msgclass - ReferenceList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceList").msgclass - ReferenceListEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListEntry").msgclass - ReferenceListSyntaxType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListSyntaxType").enummodule - ReferenceListView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb deleted file mode 100644 index e88bb3a15142..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/reference_list_service/credentials" -require "google/cloud/chronicle/v1/reference_list_service/paths" -require "google/cloud/chronicle/v1/reference_list_service/client" -require "google/cloud/chronicle/v1/reference_list_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # ReferenceListService provides an interface for managing reference lists. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/reference_list_service" - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/reference_list_service/rest" - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - module ReferenceListService - end - end - end - end -end - -helper_path = ::File.join __dir__, "reference_list_service", "helpers.rb" -require "google/cloud/chronicle/v1/reference_list_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb deleted file mode 100644 index 7472a7315b5a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb +++ /dev/null @@ -1,809 +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/chronicle/v1/reference_list_pb" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - ## - # Client for the ReferenceListService service. - # - # ReferenceListService provides an interface for managing reference lists. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reference_list_service_stub - - ## - # Configure the ReferenceListService Client class. - # - # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReferenceListService clients - # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] - 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.get_reference_list.timeout = 60.0 - default_config.rpcs.get_reference_list.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_reference_lists.timeout = 60.0 - default_config.rpcs.list_reference_lists.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_reference_list.timeout = 60.0 - - default_config.rpcs.update_reference_list.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 - @reference_list_service_stub.universe_domain - end - - ## - # Create a new ReferenceListService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReferenceListService 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/chronicle/v1/reference_list_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 - - @reference_list_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::ReferenceListService::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 - ) - - @reference_list_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reference_list_service_stub.logger - end - - # Service calls - - ## - # Gets a single reference list. - # - # @overload get_reference_list(request, options = nil) - # Pass arguments to `get_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::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_reference_list(name: nil, view: nil) - # Pass arguments to `get_reference_list` 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 reference list to retrieve. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of the ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_FULL. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new - # - # # Call the get_reference_list method. - # result = client.get_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def get_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :get_reference_list, 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 a collection of reference lists. - # - # @overload list_reference_lists(request, options = nil) - # Pass arguments to `list_reference_lists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_reference_lists` 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 parent, which owns this collection of reference lists. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of reference lists to return. - # The service may return fewer than this value. - # If unspecified, at most 100 reference lists will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListReferenceLists` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListReferenceLists` must - # match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of each ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new - # - # # Call the list_reference_lists method. - # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. - # p item - # end - # - def list_reference_lists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest - - # 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_reference_lists.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::Chronicle::V1::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_reference_lists.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reference_lists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :list_reference_lists, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, 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 - - ## - # Creates a new reference list. - # - # @overload create_reference_list(request, options = nil) - # Pass arguments to `create_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) - # Pass arguments to `create_reference_list` 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 parent resource where this reference list will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to create. - # @param reference_list_id [::String] - # Required. The ID to use for the reference list. This is also the display - # name for the reference list. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Has length less than 256. - # - Must be unique. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new - # - # # Call the create_reference_list method. - # result = client.create_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def create_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :create_reference_list, 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 - - ## - # Updates an existing reference list. - # - # @overload update_reference_list(request, options = nil) - # Pass arguments to `update_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::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_reference_list(reference_list: nil, update_mask: nil) - # Pass arguments to `update_reference_list` 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 reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to update. - # - # The reference list's `name` field is used to identify the reference list to - # update. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # When no field mask is supplied, all non-empty fields will be updated. - # A field mask of "*" will update all fields, whether empty or not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new - # - # # Call the update_reference_list method. - # result = client.update_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def update_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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.reference_list&.name - header_params["reference_list.name"] = request.reference_list.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_reference_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :update_reference_list, 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 - - ## - # Configuration class for the ReferenceListService API. - # - # This class represents the configuration for ReferenceListService, - # 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::Chronicle::V1::ReferenceListService::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 - # # get_reference_list to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.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::Chronicle::V1::ReferenceListService::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. - # * `: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 = "chronicle.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 ReferenceListService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reference_list - ## - # RPC-specific configuration for `list_reference_lists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reference_lists - ## - # RPC-specific configuration for `create_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reference_list - ## - # RPC-specific configuration for `update_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :update_reference_list - - # @private - def initialize parent_rpcs = nil - get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list - @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config - list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists - @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config - create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list - @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config - update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list - @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb deleted file mode 100644 index bc9bb656539c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - # Credentials for the ReferenceListService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb deleted file mode 100644 index 0655f1b591bb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.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 Chronicle - module V1 - module ReferenceListService - # Path helper methods for the ReferenceListService API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified ReferenceList resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param reference_list [String] - # - # @return [::String] - def reference_list_path project:, location:, instance:, reference_list: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb deleted file mode 100644 index 72c3da5feecc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/reference_list_service/credentials" -require "google/cloud/chronicle/v1/reference_list_service/paths" -require "google/cloud/chronicle/v1/reference_list_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # ReferenceListService provides an interface for managing reference lists. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/reference_list_service/rest" - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - module ReferenceListService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/reference_list_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb deleted file mode 100644 index 31d0d82a8c4c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb +++ /dev/null @@ -1,738 +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/chronicle/v1/reference_list_pb" -require "google/cloud/chronicle/v1/reference_list_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - module Rest - ## - # REST client for the ReferenceListService service. - # - # ReferenceListService provides an interface for managing reference lists. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reference_list_service_stub - - ## - # Configure the ReferenceListService Client class. - # - # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReferenceListService clients - # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] - 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.get_reference_list.timeout = 60.0 - default_config.rpcs.get_reference_list.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_reference_lists.timeout = 60.0 - default_config.rpcs.list_reference_lists.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_reference_list.timeout = 60.0 - - default_config.rpcs.update_reference_list.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 - @reference_list_service_stub.universe_domain - end - - ## - # Create a new ReferenceListService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReferenceListService 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 - - @reference_list_service_stub = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @reference_list_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reference_list_service_stub.logger - end - - # Service calls - - ## - # Gets a single reference list. - # - # @overload get_reference_list(request, options = nil) - # Pass arguments to `get_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::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_reference_list(name: nil, view: nil) - # Pass arguments to `get_reference_list` 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 reference list to retrieve. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of the ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_FULL. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new - # - # # Call the get_reference_list method. - # result = client.get_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def get_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.get_reference_list 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 a collection of reference lists. - # - # @overload list_reference_lists(request, options = nil) - # Pass arguments to `list_reference_lists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_reference_lists` 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 parent, which owns this collection of reference lists. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of reference lists to return. - # The service may return fewer than this value. - # If unspecified, at most 100 reference lists will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListReferenceLists` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListReferenceLists` must - # match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of each ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new - # - # # Call the list_reference_lists method. - # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. - # p item - # end - # - def list_reference_lists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest - - # 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_reference_lists.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::Chronicle::V1::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_reference_lists.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reference_lists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.list_reference_lists request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, "reference_lists", 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 - - ## - # Creates a new reference list. - # - # @overload create_reference_list(request, options = nil) - # Pass arguments to `create_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) - # Pass arguments to `create_reference_list` 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 parent resource where this reference list will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to create. - # @param reference_list_id [::String] - # Required. The ID to use for the reference list. This is also the display - # name for the reference list. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Has length less than 256. - # - Must be unique. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new - # - # # Call the create_reference_list method. - # result = client.create_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def create_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.create_reference_list 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 - - ## - # Updates an existing reference list. - # - # @overload update_reference_list(request, options = nil) - # Pass arguments to `update_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::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_reference_list(reference_list: nil, update_mask: nil) - # Pass arguments to `update_reference_list` 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 reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to update. - # - # The reference list's `name` field is used to identify the reference list to - # update. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # When no field mask is supplied, all non-empty fields will be updated. - # A field mask of "*" will update all fields, whether empty or not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new - # - # # Call the update_reference_list method. - # result = client.update_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def update_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest - - # 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_reference_list.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::Chronicle::V1::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_reference_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.update_reference_list 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 - - ## - # Configuration class for the ReferenceListService REST API. - # - # This class represents the configuration for ReferenceListService 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::Chronicle::V1::ReferenceListService::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 - # # get_reference_list to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.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. - # * `: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 = "chronicle.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 ReferenceListService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reference_list - ## - # RPC-specific configuration for `list_reference_lists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reference_lists - ## - # RPC-specific configuration for `create_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reference_list - ## - # RPC-specific configuration for `update_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :update_reference_list - - # @private - def initialize parent_rpcs = nil - get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list - @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config - list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists - @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config - create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list - @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config - update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list - @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb deleted file mode 100644 index 718ce68bd0d6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb +++ /dev/null @@ -1,327 +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/chronicle/v1/reference_list_pb" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - module Rest - ## - # REST service stub for the ReferenceListService 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 get_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] - # 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::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # A result object deserialized from the server's reply - def get_reference_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_reference_list_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_reference_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_lists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] - # 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::Chronicle::V1::ListReferenceListsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListReferenceListsResponse] - # A result object deserialized from the server's reply - def list_reference_lists request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reference_lists_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_reference_lists", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] - # 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::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # A result object deserialized from the server's reply - def create_reference_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_reference_list_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_reference_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] - # 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::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # A result object deserialized from the server's reply - def update_reference_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_reference_list_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_reference_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ReferenceList.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 get_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] - # 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_reference_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reference_lists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] - # 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_reference_lists_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/referenceLists", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] - # 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_reference_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/referenceLists", - body: "reference_list", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] - # 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_reference_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{reference_list.name}", - body: "reference_list", - matches: [ - ["reference_list.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb deleted file mode 100644 index aa0cb32e7359..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/reference_list.proto for package 'Google.Cloud.Chronicle.V1' -# 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/chronicle/v1/reference_list_pb' - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - # ReferenceListService provides an interface for managing reference lists. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.ReferenceListService' - - # Gets a single reference list. - rpc :GetReferenceList, ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList - # Lists a collection of reference lists. - rpc :ListReferenceLists, ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse - # Creates a new reference list. - rpc :CreateReferenceList, ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList - # Updates an existing reference list. - rpc :UpdateReferenceList, ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb deleted file mode 100644 index 12e0531e651f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.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! - -require "google/cloud/chronicle/v1/big_query_export_service/rest" -require "google/cloud/chronicle/v1/dashboard_query_service/rest" -require "google/cloud/chronicle/v1/dashboard_chart_service/rest" -require "google/cloud/chronicle/v1/data_access_control_service/rest" -require "google/cloud/chronicle/v1/data_table_service/rest" -require "google/cloud/chronicle/v1/entity_service/rest" -require "google/cloud/chronicle/v1/native_dashboard_service/rest" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" -require "google/cloud/chronicle/v1/instance_service/rest" -require "google/cloud/chronicle/v1/reference_list_service/rest" -require "google/cloud/chronicle/v1/rule_service/rest" -require "google/cloud/chronicle/v1/version" - -module Google - module Cloud - module Chronicle - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/chronicle/v1/rest" - # client = ::Google::Cloud::Chronicle::V1::BigQueryExportService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb deleted file mode 100644 index e4b4236afdf1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/rule.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/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n$google/cloud/chronicle/v1/rule.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\x91\t\n\x04Rule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04text\x18\x04 \x01(\t\x12\x13\n\x06\x61uthor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12:\n\x08severity\x18\x06 \x01(\x0b\x32#.google.cloud.chronicle.v1.SeverityB\x03\xe0\x41\x03\x12\x44\n\x08metadata\x18\x07 \x03(\x0b\x32-.google.cloud.chronicle.v1.Rule.MetadataEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x11\x63ompilation_state\x18\n \x01(\x0e\x32\x30.google.cloud.chronicle.v1.Rule.CompilationStateB\x03\xe0\x41\x03\x12\x36\n\x04type\x18\x0c \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleTypeB\x03\xe0\x41\x03\x12G\n\x0freference_lists\x18\r \x03(\tB.\xe0\x41\x03\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12M\n\x17\x61llowed_run_frequencies\x18\x0e \x03(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequencyB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0f \x01(\t\x12<\n\x05scope\x18\x10 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12V\n\x17\x63ompilation_diagnostics\x18\x11 \x03(\x0b\x32\x30.google.cloud.chronicle.v1.CompilationDiagnosticB\x03\xe0\x41\x03\x12.\n!near_real_time_live_rule_eligible\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0binputs_used\x18\x14 \x01(\x0b\x32%.google.cloud.chronicle.v1.InputsUsedB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"P\n\x10\x43ompilationState\x12!\n\x1d\x43OMPILATION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02:m\xea\x41j\n\x1d\x63hronicle.googleapis.com/Rule\x12Iprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}\"\xcb\x05\n\x0eRuleDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x12\x10\n\x08\x61lerting\x18\x03 \x01(\x08\x12\x10\n\x08\x61rchived\x18\x04 \x01(\x08\x12\x35\n\x0c\x61rchive_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\rrun_frequency\x18\x06 \x01(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequency\x12V\n\x0f\x65xecution_state\x18\x07 \x01(\x0e\x32\x38.google.cloud.chronicle.v1.RuleDeployment.ExecutionStateB\x03\xe0\x41\x03\x12=\n\x0eproducer_rules\x18\x08 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12=\n\x0e\x63onsumer_rules\x18\t \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x46\n\x1dlast_alert_status_change_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"W\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0b\n\x07LIMITED\x10\x02\x12\n\n\x06PAUSED\x10\x03:\x82\x01\xea\x41\x7f\n\'chronicle.googleapis.com/RuleDeployment\x12Tprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment\"\xc8\x03\n\tRetrohunt\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x10process_interval\x18\x02 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x36\n\x12\x65xecution_interval\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.cloud.chronicle.v1.Retrohunt.StateB\x03\xe0\x41\x03\x12 \n\x13progress_percentage\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\"P\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x8a\x01\xea\x41\x86\x01\n\"chronicle.googleapis.com/Retrohunt\x12`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}\"~\n\x11\x43reateRuleRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x32\n\x04rule\x18\x02 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\"x\n\x0eGetRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"\xb3\x01\n\x10ListRulesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\\\n\x11ListRulesResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x11UpdateRuleRequest\x12\x32\n\x04rule\x18\x01 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\\\n\x11\x44\x65leteRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa9\x01\n\x18ListRuleRevisionsRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"d\n\x19ListRuleRevisionsResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x01\n\x16\x43reateRetrohuntRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\x12<\n\tretrohunt\x18\x02 \x01(\x0b\x32$.google.cloud.chronicle.v1.RetrohuntB\x03\xe0\x41\x02\"O\n\x13GetRetrohuntRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Retrohunt\"\x8a\x01\n\x15ListRetrohuntsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"k\n\x16ListRetrohuntsResponse\x12\x38\n\nretrohunts\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.Retrohunt\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x18GetRuleDeploymentRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/RuleDeployment\"\x94\x01\n\x1aListRuleDeploymentsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/RuleDeployment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"{\n\x1bListRuleDeploymentsResponse\x12\x43\n\x10rule_deployments\x18\x01 \x03(\x0b\x32).google.cloud.chronicle.v1.RuleDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9c\x01\n\x1bUpdateRuleDeploymentRequest\x12G\n\x0frule_deployment\x18\x01 \x01(\x0b\x32).google.cloud.chronicle.v1.RuleDeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"y\n\x13\x43ompilationPosition\x12\x17\n\nstart_line\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cstart_column\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_line\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nend_column\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\"\x96\x02\n\x15\x43ompilationDiagnostic\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x08position\x18\x02 \x01(\x0b\x32..google.cloud.chronicle.v1.CompilationPositionB\x03\xe0\x41\x03\x12P\n\x08severity\x18\x03 \x01(\x0e\x32\x39.google.cloud.chronicle.v1.CompilationDiagnostic.SeverityB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x05 \x01(\tB\x03\xe0\x41\x03\"<\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\" \n\x08Severity\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\"\x9a\x01\n\x11RetrohuntMetadata\x12\x35\n\tretrohunt\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x12\x65xecution_interval\x18\x02 \x01(\x0b\x32\x15.google.type.Interval\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x02\"Z\n\nInputsUsed\x12\x15\n\x08uses_udm\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0buses_entity\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0euses_detection\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01*N\n\x0cRunFrequency\x12\x1d\n\x19RUN_FREQUENCY_UNSPECIFIED\x10\x00\x12\x08\n\x04LIVE\x10\x01\x12\n\n\x06HOURLY\x10\x02\x12\t\n\x05\x44\x41ILY\x10\x03*H\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSINGLE_EVENT\x10\x01\x12\x0f\n\x0bMULTI_EVENT\x10\x02*V\n\x08RuleView\x12\x19\n\x15RULE_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\x1a\n\x16REVISION_METADATA_ONLY\x10\x03\x32\xa9\x13\n\x0bRuleService\x12\xae\x01\n\nCreateRule\x12,.google.cloud.chronicle.v1.CreateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"Q\xda\x41\x0bparent,rule\x82\xd3\xe4\x93\x02=\"5/v1/{parent=projects/*/locations/*/instances/*}/rules:\x04rule\x12\x9b\x01\n\x07GetRule\x12).google.cloud.chronicle.v1.GetRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xae\x01\n\tListRules\x12+.google.cloud.chronicle.v1.ListRulesRequest\x1a,.google.cloud.chronicle.v1.ListRulesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*/instances/*}/rules\x12\xb8\x01\n\nUpdateRule\x12,.google.cloud.chronicle.v1.UpdateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"[\xda\x41\x10rule,update_mask\x82\xd3\xe4\x93\x02\x42\x32:/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}:\x04rule\x12\x98\x01\n\nDeleteRule\x12,.google.cloud.chronicle.v1.DeleteRuleRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xd2\x01\n\x11ListRuleRevisions\x12\x33.google.cloud.chronicle.v1.ListRuleRevisionsRequest\x1a\x34.google.cloud.chronicle.v1.ListRuleRevisionsResponse\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{name=projects/*/locations/*/instances/*/rules/*}:listRevisions\x12\xef\x01\n\x0f\x43reateRetrohunt\x12\x31.google.cloud.chronicle.v1.CreateRetrohuntRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1e\n\tRetrohunt\x12\x11RetrohuntMetadata\xda\x41\x10parent,retrohunt\x82\xd3\xe4\x93\x02O\"B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts:\tretrohunt\x12\xb7\x01\n\x0cGetRetrohunt\x12..google.cloud.chronicle.v1.GetRetrohuntRequest\x1a$.google.cloud.chronicle.v1.Retrohunt\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}\x12\xca\x01\n\x0eListRetrohunts\x12\x30.google.cloud.chronicle.v1.ListRetrohuntsRequest\x1a\x31.google.cloud.chronicle.v1.ListRetrohuntsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts\x12\xc4\x01\n\x11GetRuleDeployment\x12\x33.google.cloud.chronicle.v1.GetRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}\x12\xda\x01\n\x13ListRuleDeployments\x12\x35.google.cloud.chronicle.v1.ListRuleDeploymentsRequest\x1a\x36.google.cloud.chronicle.v1.ListRuleDeploymentsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments\x12\x83\x02\n\x14UpdateRuleDeployment\x12\x36.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"\x87\x01\xda\x41\x1brule_deployment,update_mask\x82\xd3\xe4\x93\x02\x63\x32P/v1/{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}:\x0frule_deployment\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc0\x01\n\x1d\x63om.google.cloud.chronicle.v1B\tRuleProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule").msgclass - Rule::CompilationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule.CompilationState").enummodule - RuleDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment").msgclass - RuleDeployment::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment.ExecutionState").enummodule - Retrohunt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt").msgclass - Retrohunt::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt.State").enummodule - CreateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRuleRequest").msgclass - GetRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleRequest").msgclass - ListRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesRequest").msgclass - ListRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesResponse").msgclass - UpdateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleRequest").msgclass - DeleteRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteRuleRequest").msgclass - ListRuleRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsRequest").msgclass - ListRuleRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsResponse").msgclass - CreateRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRetrohuntRequest").msgclass - GetRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRetrohuntRequest").msgclass - ListRetrohuntsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsRequest").msgclass - ListRetrohuntsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsResponse").msgclass - GetRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleDeploymentRequest").msgclass - ListRuleDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsRequest").msgclass - ListRuleDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsResponse").msgclass - UpdateRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleDeploymentRequest").msgclass - CompilationPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationPosition").msgclass - CompilationDiagnostic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic").msgclass - CompilationDiagnostic::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic.Severity").enummodule - Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Severity").msgclass - RetrohuntMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RetrohuntMetadata").msgclass - InputsUsed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InputsUsed").msgclass - RunFrequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RunFrequency").enummodule - RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleType").enummodule - RuleView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb deleted file mode 100644 index e84fdd68ca88..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.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/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/rule_service/credentials" -require "google/cloud/chronicle/v1/rule_service/paths" -require "google/cloud/chronicle/v1/rule_service/operations" -require "google/cloud/chronicle/v1/rule_service/client" -require "google/cloud/chronicle/v1/rule_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # RuleService provides interface for user-created rules. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/rule_service" - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/rule_service/rest" - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - module RuleService - end - end - end - end -end - -helper_path = ::File.join __dir__, "rule_service", "helpers.rb" -require "google/cloud/chronicle/v1/rule_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb deleted file mode 100644 index 53a82998663a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb +++ /dev/null @@ -1,1691 +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/chronicle/v1/rule_pb" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - ## - # Client for the RuleService service. - # - # RuleService provides interface for user-created rules. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :rule_service_stub - - ## - # Configure the RuleService Client class. - # - # See {::Google::Cloud::Chronicle::V1::RuleService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RuleService clients - # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] - 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_rule.timeout = 60.0 - - default_config.rpcs.get_rule.timeout = 60.0 - default_config.rpcs.get_rule.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rules.timeout = 600.0 - default_config.rpcs.list_rules.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule.timeout = 600.0 - - default_config.rpcs.delete_rule.timeout = 60.0 - - default_config.rpcs.list_rule_revisions.timeout = 600.0 - default_config.rpcs.list_rule_revisions.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_retrohunt.timeout = 600.0 - - default_config.rpcs.get_retrohunt.timeout = 60.0 - default_config.rpcs.get_retrohunt.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_retrohunts.timeout = 60.0 - default_config.rpcs.list_retrohunts.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_rule_deployment.timeout = 600.0 - default_config.rpcs.get_rule_deployment.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rule_deployments.timeout = 600.0 - default_config.rpcs.list_rule_deployments.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule_deployment.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RuleService 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::Chronicle::V1::RuleService::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 - @rule_service_stub.universe_domain - end - - ## - # Create a new RuleService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RuleService 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/chronicle/v1/rule_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 - - @rule_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::RuleService::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 - ) - - @rule_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::Chronicle::V1::RuleService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @rule_service_stub.logger - end - - # Service calls - - ## - # Creates a new Rule. - # - # @overload create_rule(request, options = nil) - # Pass arguments to `create_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::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_rule(parent: nil, rule: nil) - # Pass arguments to `create_rule` 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 parent resource where this rule will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new - # - # # Call the create_rule method. - # result = client.create_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def create_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :create_rule, 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 Rule. - # - # @overload get_rule(request, options = nil) - # Pass arguments to `get_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::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_rule(name: nil, view: nil) - # Pass arguments to `get_rule` 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 name of the rule to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the Rule being - # returned. If unspecified, defaults to FULL. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new - # - # # Call the get_rule method. - # result = client.get_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def get_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :get_rule, 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 Rules. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) - # Pass arguments to `list_rules` 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 parent, which owns this collection of rules. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of rules to return. The service may return fewer than - # this value. If unspecified, at most 100 rules will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRules` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRules` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # view indicates the scope of fields to populate for the Rule being returned. - # If unspecified, defaults to BASIC. - # @param filter [::String] - # Only the following filters are allowed: - # "reference_lists:\\{reference_list_name}" - # "data_tables:\\{data_table_name}" - # "display_name:\\{display_name}" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest - - # 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_rules.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::Chronicle::V1::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_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_rules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rules, 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 Rule. - # - # @overload update_rule(request, options = nil) - # Pass arguments to `update_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::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_rule(rule: nil, update_mask: nil) - # Pass arguments to `update_rule` 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 rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to update. - # - # The rule's `name` field is used to identify the rule to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new - # - # # Call the update_rule method. - # result = client.update_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def update_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest - - # 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_rule.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::Chronicle::V1::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.rule&.name - header_params["rule.name"] = request.rule.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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :update_rule, 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 Rule. - # - # @overload delete_rule(request, options = nil) - # Pass arguments to `delete_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::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_rule(name: nil, force: nil) - # Pass arguments to `delete_rule` 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 name of the rule to delete. A rule revision timestamp cannot - # be specified as part of the name, as deleting specific revisions is not - # supported. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param force [::Boolean] - # Optional. If set to true, any retrohunts and any detections associated with - # the rule will also be deleted. If set to false, the call will only succeed - # if the rule has no associated retrohunts, including completed retrohunts, - # and no associated detections. Regardless of this field's value, the rule - # deployment associated with this rule will also 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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new - # - # # Call the delete_rule method. - # result = client.delete_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :delete_rule, 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 all revisions of the rule. - # - # @overload list_rule_revisions(request, options = nil) - # Pass arguments to `list_rule_revisions` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_rule_revisions` 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 name of the rule to list revisions for. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of revisions to return per page. The service may return - # fewer than this value. If unspecified, at most 100 revisions will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # The page token, received from a previous `ListRuleRevisions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleRevisions` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the revision - # being returned. If unspecified, defaults to BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new - # - # # Call the list_rule_revisions method. - # result = client.list_rule_revisions 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rule_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest - - # 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_rule_revisions.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::Chronicle::V1::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_rule_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rule_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_rule_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, 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 - - ## - # Create a Retrohunt. - # - # @overload create_retrohunt(request, options = nil) - # Pass arguments to `create_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::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_retrohunt(parent: nil, retrohunt: nil) - # Pass arguments to `create_retrohunt` 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 parent of retrohunt, which is a rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] - # Required. The retrohunt 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/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new - # - # # Call the create_retrohunt method. - # result = client.create_retrohunt 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_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest - - # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :create_retrohunt, 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 - - ## - # Get a Retrohunt. - # - # @overload get_retrohunt(request, options = nil) - # Pass arguments to `get_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::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_retrohunt(name: nil) - # Pass arguments to `get_retrohunt` 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 name of the retrohunt to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Retrohunt] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new - # - # # Call the get_retrohunt method. - # result = client.get_retrohunt request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. - # p result - # - def get_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest - - # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :get_retrohunt, 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 - - ## - # List Retrohunts. - # - # @overload list_retrohunts(request, options = nil) - # Pass arguments to `list_retrohunts` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_retrohunts` 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 rule that the retrohunts belong to. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of retrohunt to return. The service may return fewer - # than this value. If unspecified, at most 100 retrohunts will be returned. - # The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRetrohunts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRetrohunts` must - # match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # state - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new - # - # # Call the list_retrohunts method. - # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. - # p item - # end - # - def list_retrohunts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest - - # 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_retrohunts.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::Chronicle::V1::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_retrohunts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_retrohunts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_retrohunts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_retrohunts, 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 - - ## - # Gets a RuleDeployment. - # - # @overload get_rule_deployment(request, options = nil) - # Pass arguments to `get_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::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_rule_deployment(name: nil) - # Pass arguments to `get_rule_deployment` 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 name of the rule deployment to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new - # - # # Call the get_rule_deployment method. - # result = client.get_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def get_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest - - # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :get_rule_deployment, 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 RuleDeployments across all Rules. - # - # @overload list_rule_deployments(request, options = nil) - # Pass arguments to `list_rule_deployments` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_rule_deployments` 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 collection of all parents which own all rule deployments. The - # "-" wildcard token must be used as the rule identifier in the resource - # path. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/-` - # @param page_size [::Integer] - # The maximum number of rule deployments to return. The service may return - # fewer than this value. If unspecified, at most 100 rule deployments will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRuleDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleDeployments` - # must match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # archived, name - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new - # - # # Call the list_rule_deployments method. - # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. - # p item - # end - # - def list_rule_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest - - # 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_rule_deployments.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::Chronicle::V1::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_rule_deployments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rule_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_rule_deployments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, 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 RuleDeployment. - # Failures are not necessarily atomic. If there is a request to update - # multiple fields, and any update to a single field fails, an error will be - # returned, but other fields may remain successfully updated. - # - # @overload update_rule_deployment(request, options = nil) - # Pass arguments to `update_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::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_rule_deployment(rule_deployment: nil, update_mask: nil) - # Pass arguments to `update_rule_deployment` 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 rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] - # Required. The rule deployment to update. - # - # The rule deployment's `name` field is used to identify the rule deployment - # to update. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new - # - # # Call the update_rule_deployment method. - # result = client.update_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def update_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest - - # 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_rule_deployment.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::Chronicle::V1::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.rule_deployment&.name - header_params["rule_deployment.name"] = request.rule_deployment.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_rule_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :update_rule_deployment, 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 - - ## - # Configuration class for the RuleService API. - # - # This class represents the configuration for RuleService, - # 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::Chronicle::V1::RuleService::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_rule to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::RuleService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.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::Chronicle::V1::RuleService::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. - # * `: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 = "chronicle.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 RuleService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_rule - ## - # RPC-specific configuration for `get_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `update_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule - ## - # RPC-specific configuration for `delete_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_rule - ## - # RPC-specific configuration for `list_rule_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_revisions - ## - # RPC-specific configuration for `create_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :create_retrohunt - ## - # RPC-specific configuration for `get_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :get_retrohunt - ## - # RPC-specific configuration for `list_retrohunts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_retrohunts - ## - # RPC-specific configuration for `get_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule_deployment - ## - # RPC-specific configuration for `list_rule_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_deployments - ## - # RPC-specific configuration for `update_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule_deployment - - # @private - def initialize parent_rpcs = nil - create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule - @create_rule = ::Gapic::Config::Method.new create_rule_config - get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule - @get_rule = ::Gapic::Config::Method.new get_rule_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule - @update_rule = ::Gapic::Config::Method.new update_rule_config - delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule - @delete_rule = ::Gapic::Config::Method.new delete_rule_config - list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions - @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config - create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt - @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config - get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt - @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config - list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts - @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config - get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment - @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config - list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments - @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config - update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment - @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb deleted file mode 100644 index a66ae4c0ebf6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - # Credentials for the RuleService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb deleted file mode 100644 index 162ec1fb3163..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb +++ /dev/null @@ -1,841 +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 Chronicle - module V1 - module RuleService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the RuleService 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 RuleService 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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - 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. - # * `: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 = "chronicle.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. - # * `: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/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb deleted file mode 100644 index 00b03a7b2d54..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb +++ /dev/null @@ -1,159 +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 Chronicle - module V1 - module RuleService - # Path helper methods for the RuleService API. - module Paths - ## - # Create a fully-qualified DataAccessScope resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_scope [String] - # - # @return [::String] - def data_access_scope_path project:, location:, instance:, data_access_scope: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified ReferenceList resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param reference_list [String] - # - # @return [::String] - def reference_list_path project:, location:, instance:, reference_list: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" - end - - ## - # Create a fully-qualified Retrohunt resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param rule [String] - # @param retrohunt [String] - # - # @return [::String] - def retrohunt_path project:, location:, instance:, rule:, retrohunt: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - raise ::ArgumentError, "rule cannot contain /" if rule.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/retrohunts/#{retrohunt}" - end - - ## - # Create a fully-qualified Rule resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param rule [String] - # - # @return [::String] - def rule_path project:, location:, instance:, rule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}" - end - - ## - # Create a fully-qualified RuleDeployment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param rule [String] - # - # @return [::String] - def rule_deployment_path project:, location:, instance:, rule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/deployment" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb deleted file mode 100644 index d27a86220664..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/rule_service/credentials" -require "google/cloud/chronicle/v1/rule_service/paths" -require "google/cloud/chronicle/v1/rule_service/rest/operations" -require "google/cloud/chronicle/v1/rule_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # RuleService provides interface for user-created rules. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/rule_service/rest" - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - module RuleService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/rule_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb deleted file mode 100644 index e29466693f60..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb +++ /dev/null @@ -1,1564 +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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - module Rest - ## - # REST client for the RuleService service. - # - # RuleService provides interface for user-created rules. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :rule_service_stub - - ## - # Configure the RuleService Client class. - # - # See {::Google::Cloud::Chronicle::V1::RuleService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RuleService clients - # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] - 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_rule.timeout = 60.0 - - default_config.rpcs.get_rule.timeout = 60.0 - default_config.rpcs.get_rule.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rules.timeout = 600.0 - default_config.rpcs.list_rules.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule.timeout = 600.0 - - default_config.rpcs.delete_rule.timeout = 60.0 - - default_config.rpcs.list_rule_revisions.timeout = 600.0 - default_config.rpcs.list_rule_revisions.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_retrohunt.timeout = 600.0 - - default_config.rpcs.get_retrohunt.timeout = 60.0 - default_config.rpcs.get_retrohunt.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_retrohunts.timeout = 60.0 - default_config.rpcs.list_retrohunts.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_rule_deployment.timeout = 600.0 - default_config.rpcs.get_rule_deployment.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rule_deployments.timeout = 600.0 - default_config.rpcs.list_rule_deployments.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule_deployment.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RuleService 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::Chronicle::V1::RuleService::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 - @rule_service_stub.universe_domain - end - - ## - # Create a new RuleService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RuleService 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::Chronicle::V1::RuleService::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 - - @rule_service_stub = ::Google::Cloud::Chronicle::V1::RuleService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @rule_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::Chronicle::V1::RuleService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @rule_service_stub.logger - end - - # Service calls - - ## - # Creates a new Rule. - # - # @overload create_rule(request, options = nil) - # Pass arguments to `create_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::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_rule(parent: nil, rule: nil) - # Pass arguments to `create_rule` 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 parent resource where this rule will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new - # - # # Call the create_rule method. - # result = client.create_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def create_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.create_rule 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 Rule. - # - # @overload get_rule(request, options = nil) - # Pass arguments to `get_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::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_rule(name: nil, view: nil) - # Pass arguments to `get_rule` 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 name of the rule to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the Rule being - # returned. If unspecified, defaults to FULL. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new - # - # # Call the get_rule method. - # result = client.get_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def get_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.get_rule 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 Rules. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) - # Pass arguments to `list_rules` 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 parent, which owns this collection of rules. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of rules to return. The service may return fewer than - # this value. If unspecified, at most 100 rules will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRules` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRules` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # view indicates the scope of fields to populate for the Rule being returned. - # If unspecified, defaults to BASIC. - # @param filter [::String] - # Only the following filters are allowed: - # "reference_lists:\\{reference_list_name}" - # "data_tables:\\{data_table_name}" - # "display_name:\\{display_name}" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest - - # 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_rules.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::Chronicle::V1::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_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_rules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rules, "rules", 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 Rule. - # - # @overload update_rule(request, options = nil) - # Pass arguments to `update_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::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_rule(rule: nil, update_mask: nil) - # Pass arguments to `update_rule` 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 rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to update. - # - # The rule's `name` field is used to identify the rule to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new - # - # # Call the update_rule method. - # result = client.update_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def update_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.update_rule 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 Rule. - # - # @overload delete_rule(request, options = nil) - # Pass arguments to `delete_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::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_rule(name: nil, force: nil) - # Pass arguments to `delete_rule` 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 name of the rule to delete. A rule revision timestamp cannot - # be specified as part of the name, as deleting specific revisions is not - # supported. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param force [::Boolean] - # Optional. If set to true, any retrohunts and any detections associated with - # the rule will also be deleted. If set to false, the call will only succeed - # if the rule has no associated retrohunts, including completed retrohunts, - # and no associated detections. Regardless of this field's value, the rule - # deployment associated with this rule will also 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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new - # - # # Call the delete_rule method. - # result = client.delete_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest - - # 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_rule.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::Chronicle::V1::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.delete_rule 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 all revisions of the rule. - # - # @overload list_rule_revisions(request, options = nil) - # Pass arguments to `list_rule_revisions` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_rule_revisions` 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 name of the rule to list revisions for. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of revisions to return per page. The service may return - # fewer than this value. If unspecified, at most 100 revisions will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # The page token, received from a previous `ListRuleRevisions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleRevisions` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the revision - # being returned. If unspecified, defaults to BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new - # - # # Call the list_rule_revisions method. - # result = client.list_rule_revisions 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rule_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest - - # 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_rule_revisions.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::Chronicle::V1::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_rule_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rule_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_rule_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, "rules", 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 - - ## - # Create a Retrohunt. - # - # @overload create_retrohunt(request, options = nil) - # Pass arguments to `create_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::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_retrohunt(parent: nil, retrohunt: nil) - # Pass arguments to `create_retrohunt` 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 parent of retrohunt, which is a rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] - # Required. The retrohunt 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/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new - # - # # Call the create_retrohunt method. - # result = client.create_retrohunt 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_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest - - # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.create_retrohunt 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 - - ## - # Get a Retrohunt. - # - # @overload get_retrohunt(request, options = nil) - # Pass arguments to `get_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::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_retrohunt(name: nil) - # Pass arguments to `get_retrohunt` 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 name of the retrohunt to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Retrohunt] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new - # - # # Call the get_retrohunt method. - # result = client.get_retrohunt request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. - # p result - # - def get_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest - - # 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_retrohunt.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::Chronicle::V1::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_retrohunt.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.get_retrohunt 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 - - ## - # List Retrohunts. - # - # @overload list_retrohunts(request, options = nil) - # Pass arguments to `list_retrohunts` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_retrohunts` 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 rule that the retrohunts belong to. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of retrohunt to return. The service may return fewer - # than this value. If unspecified, at most 100 retrohunts will be returned. - # The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRetrohunts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRetrohunts` must - # match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # state - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new - # - # # Call the list_retrohunts method. - # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. - # p item - # end - # - def list_retrohunts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest - - # 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_retrohunts.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::Chronicle::V1::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_retrohunts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_retrohunts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_retrohunts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_retrohunts, "retrohunts", 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 a RuleDeployment. - # - # @overload get_rule_deployment(request, options = nil) - # Pass arguments to `get_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::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_rule_deployment(name: nil) - # Pass arguments to `get_rule_deployment` 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 name of the rule deployment to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new - # - # # Call the get_rule_deployment method. - # result = client.get_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def get_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest - - # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.get_rule_deployment 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 RuleDeployments across all Rules. - # - # @overload list_rule_deployments(request, options = nil) - # Pass arguments to `list_rule_deployments` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_rule_deployments` 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 collection of all parents which own all rule deployments. The - # "-" wildcard token must be used as the rule identifier in the resource - # path. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/-` - # @param page_size [::Integer] - # The maximum number of rule deployments to return. The service may return - # fewer than this value. If unspecified, at most 100 rule deployments will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRuleDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleDeployments` - # must match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # archived, name - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new - # - # # Call the list_rule_deployments method. - # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. - # p item - # end - # - def list_rule_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest - - # 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_rule_deployments.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::Chronicle::V1::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_rule_deployments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rule_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_rule_deployments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, "rule_deployments", 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 RuleDeployment. - # Failures are not necessarily atomic. If there is a request to update - # multiple fields, and any update to a single field fails, an error will be - # returned, but other fields may remain successfully updated. - # - # @overload update_rule_deployment(request, options = nil) - # Pass arguments to `update_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::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_rule_deployment(rule_deployment: nil, update_mask: nil) - # Pass arguments to `update_rule_deployment` 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 rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] - # Required. The rule deployment to update. - # - # The rule deployment's `name` field is used to identify the rule deployment - # to update. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new - # - # # Call the update_rule_deployment method. - # result = client.update_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def update_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest - - # 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_rule_deployment.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::Chronicle::V1::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_rule_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.update_rule_deployment 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 - - ## - # Configuration class for the RuleService REST API. - # - # This class represents the configuration for RuleService 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::Chronicle::V1::RuleService::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_rule to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.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. - # * `: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 = "chronicle.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 RuleService 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_rule - ## - # RPC-specific configuration for `get_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `update_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule - ## - # RPC-specific configuration for `delete_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_rule - ## - # RPC-specific configuration for `list_rule_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_revisions - ## - # RPC-specific configuration for `create_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :create_retrohunt - ## - # RPC-specific configuration for `get_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :get_retrohunt - ## - # RPC-specific configuration for `list_retrohunts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_retrohunts - ## - # RPC-specific configuration for `get_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule_deployment - ## - # RPC-specific configuration for `list_rule_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_deployments - ## - # RPC-specific configuration for `update_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule_deployment - - # @private - def initialize parent_rpcs = nil - create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule - @create_rule = ::Gapic::Config::Method.new create_rule_config - get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule - @get_rule = ::Gapic::Config::Method.new get_rule_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule - @update_rule = ::Gapic::Config::Method.new update_rule_config - delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule - @delete_rule = ::Gapic::Config::Method.new delete_rule_config - list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions - @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config - create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt - @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config - get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt - @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config - list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts - @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config - get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment - @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config - list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments - @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config - update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment - @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb deleted file mode 100644 index f989eba5c49e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb +++ /dev/null @@ -1,925 +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 Chronicle - module V1 - module RuleService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the RuleService 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 RuleService 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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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::Chronicle::V1::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 - - ## - # 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. - # * `: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 = "chronicle.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. - # * `: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 - - # @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 - - 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 - - ## - # @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: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, 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: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/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: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/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: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb deleted file mode 100644 index 021e04869cad..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb +++ /dev/null @@ -1,817 +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/chronicle/v1/rule_pb" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - module Rest - ## - # REST service stub for the RuleService 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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] - # 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::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # A result object deserialized from the server's reply - def create_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_rule_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_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] - # 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::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # A result object deserialized from the server's reply - def get_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_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_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Rule.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_rules REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] - # 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::Chronicle::V1::ListRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRulesResponse] - # A result object deserialized from the server's reply - def list_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_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_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] - # 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::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # A result object deserialized from the server's reply - def update_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_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_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] - # 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_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_rule_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_rule", - 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 list_rule_revisions REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] - # 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::Chronicle::V1::ListRuleRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse] - # A result object deserialized from the server's reply - def list_rule_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_revisions_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_rule_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] - # 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_retrohunt request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_retrohunt_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_retrohunt", - 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_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] - # 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::Chronicle::V1::Retrohunt] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # A result object deserialized from the server's reply - def get_retrohunt request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_retrohunt_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_retrohunt", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunts REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] - # 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::Chronicle::V1::ListRetrohuntsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse] - # A result object deserialized from the server's reply - def list_retrohunts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_retrohunts_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_retrohunts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] - # 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::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # A result object deserialized from the server's reply - def get_rule_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_deployment_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_rule_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployments REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] - # 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::Chronicle::V1::ListRuleDeploymentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse] - # A result object deserialized from the server's reply - def list_rule_deployments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_deployments_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_rule_deployments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] - # 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::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # A result object deserialized from the server's reply - def update_rule_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_deployment_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_rule_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/rules", - body: "rule", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rules REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] - # 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_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/rules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{rule.name}", - body: "rule", - matches: [ - ["rule.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rule_revisions REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] - # 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_rule_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listRevisions", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] - # 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_retrohunt_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/retrohunts", - body: "retrohunt", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] - # 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_retrohunt_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/retrohunts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_retrohunts REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] - # 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_retrohunts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/retrohunts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] - # 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_rule_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rule_deployments REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] - # 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_rule_deployments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deployments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] - # 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_rule_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{rule_deployment.name}", - body: "rule_deployment", - matches: [ - ["rule_deployment.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb deleted file mode 100644 index a893fb504269..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb +++ /dev/null @@ -1,70 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/rule.proto for package 'Google.Cloud.Chronicle.V1' -# 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/chronicle/v1/rule_pb' - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - # RuleService provides interface for user-created rules. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.RuleService' - - # Creates a new Rule. - rpc :CreateRule, ::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule - # Gets a Rule. - rpc :GetRule, ::Google::Cloud::Chronicle::V1::GetRuleRequest, ::Google::Cloud::Chronicle::V1::Rule - # Lists Rules. - rpc :ListRules, ::Google::Cloud::Chronicle::V1::ListRulesRequest, ::Google::Cloud::Chronicle::V1::ListRulesResponse - # Updates a Rule. - rpc :UpdateRule, ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule - # Deletes a Rule. - rpc :DeleteRule, ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::Google::Protobuf::Empty - # Lists all revisions of the rule. - rpc :ListRuleRevisions, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse - # Create a Retrohunt. - rpc :CreateRetrohunt, ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::Google::Longrunning::Operation - # Get a Retrohunt. - rpc :GetRetrohunt, ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::Google::Cloud::Chronicle::V1::Retrohunt - # List Retrohunts. - rpc :ListRetrohunts, ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse - # Gets a RuleDeployment. - rpc :GetRuleDeployment, ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment - # Lists RuleDeployments across all Rules. - rpc :ListRuleDeployments, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse - # Updates a RuleDeployment. - # Failures are not necessarily atomic. If there is a request to update - # multiple fields, and any update to a single field fails, an error will be - # returned, but other fields may remain successfully updated. - rpc :UpdateRuleDeployment, ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb deleted file mode 100644 index 6224648b9b26..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.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! - - -module Google - module Cloud - module Chronicle - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md deleted file mode 100644 index 70a487ac4c0f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Chronicle V1 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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb deleted file mode 100644 index 068b7f8c9990..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_chart.rb +++ /dev/null @@ -1,923 +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 Chronicle - module V1 - # DashboardChart resource. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the dashboardChart. - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name/Title of the dashboardChart visible to users. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the dashboardChart. - # @!attribute [r] native_dashboard - # @return [::String] - # Output only. NativeDashboard this chart belongs to. - # @!attribute [rw] tile_type - # @return [::Google::Cloud::Chronicle::V1::TileType] - # Optional. Type of tile i.e., visualization, button or text. - # @!attribute [rw] chart_datasource - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::ChartDatasource] - # Optional. Query and datasource used in the chart. Should be empty for - # Button Tiles. - # @!attribute [rw] visualization - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization] - # Required. Depending on tile_type one of below fields will be required. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [rw] drill_down_config - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig] - # Optional. Drill down configuration. - # @!attribute [rw] tokens - # @return [::Array<::String>] - # Optional. List of Advanced Filter tokens used in this chart's query (e.g., - # "hostname", "ip"). This allows the UI to identify dependencies without - # parsing the query text. The tokens are stored without the wrapping '$' - # characters. - # The number of tokens are not expected to be more than 10. - class DashboardChart - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Datasource of the chart including the query reference and source name. - # @!attribute [rw] dashboard_query - # @return [::String] - # Reference to dashboard query resource used in the chart. - # @!attribute [rw] data_sources - # @return [::Array<::Google::Cloud::Chronicle::V1::DataSource>] - # Name of the datasource used in the chart. - class ChartDatasource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Visualization config for a chart. - # https://echarts.apache.org/en/option.html#series - # @!attribute [rw] x_axes - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Axis>] - # @!attribute [rw] y_axes - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Axis>] - # @!attribute [rw] series - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series>] - # @!attribute [rw] tooltip - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Tooltip] - # @!attribute [rw] legends - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Legend>] - # @!attribute [rw] column_defs - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::ColumnDef>] - # Column Definition to represent chart as a table. - # @!attribute [rw] table_config - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::TableConfig] - # Optional. Configuration for table appearance. - # @!attribute [rw] button - # @return [::Google::Cloud::Chronicle::V1::Button] - # Button config for a chart if tileType is TILE_TYPE_BUTTON. - # @!attribute [rw] markdown - # @return [::Google::Cloud::Chronicle::V1::Markdown] - # Optional. Markdown config for a chart if tileType is TILE_TYPE_MARKDOWN. - # @!attribute [rw] series_column - # @return [::Array<::String>] - # Optional. Selected column for series - # @!attribute [rw] grouping_type - # @return [::String] - # Optional. Selected grouping type for series - # @!attribute [rw] google_maps_config - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig] - # Optional. Google Maps config for a chart if type is GOOGLE MAPS. - # @!attribute [rw] threshold_coloring_enabled - # @return [::Boolean] - # Optional. Whether threshold coloring is enabled for the chart. If it's - # enabled, the chart will be colored based on the values stored in - # VisualMap below. - # @!attribute [rw] visual_maps - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::VisualMap>] - # Optional. Visual maps for the chart. - class Visualization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] axis_type - # @return [::Google::Cloud::Chronicle::V1::AxisType] - # @!attribute [rw] display_name - # @return [::String] - # @!attribute [rw] min - # @return [::Integer] - # Minimum value to be rendered in ECharts as per - # https://echarts.apache.org/en/option.html#xAxis.min - # @!attribute [rw] max - # @return [::Integer] - # Maximum value to be rendered in ECharts as per - # https://echarts.apache.org/en/option.html#xAxis.max - class Axis - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] series_type - # @return [::Google::Cloud::Chronicle::V1::SeriesType] - # @!attribute [rw] series_name - # @return [::String] - # user specified series label - # @!attribute [rw] show_symbol - # @return [::Boolean] - # @!attribute [rw] show_background - # @return [::Boolean] - # @!attribute [rw] stack - # @return [::String] - # @!attribute [rw] series_stack_strategy - # @return [::Google::Cloud::Chronicle::V1::SeriesStackStrategy] - # @!attribute [rw] encode - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::Encode] - # @!attribute [rw] label - # @return [::String] - # @!attribute [rw] field - # @return [::String] - # @!attribute [rw] data_label - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::DataLabel] - # Optional. Data label config for a series. - # Displays data vaule in the chart - # @!attribute [rw] radius - # @return [::Array<::String>] - # Optional. Used to make a pie chart into a douhnut chart - # @!attribute [rw] item_style - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::ItemStyle] - # Optional. Custom styling for chart - # @!attribute [rw] series_unique_value - # @return [::String] - # Optional. Series unique value from the query result - # @!attribute [rw] area_style - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::AreaStyle] - # Optional. Custom styling for area chart - # @!attribute [rw] item_colors - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::ItemColors] - # Optional. Field to be saved for retrieving slice colors for the chart - # @!attribute [rw] gauge_config - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeConfig] - # Optional. Field to be saved for retrieving gauge config for gauge chart - # @!attribute [rw] metric_trend_config - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::MetricTrendConfig] - # Optional. Fields to capture trend config for metric charts - class Series - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] x - # @return [::String] - # @!attribute [rw] y - # @return [::String] - # @!attribute [rw] value - # @return [::String] - # For some type of series that are not in any coordinate system, like - # 'pie' - # @!attribute [rw] item_name - # @return [::String] - # This is useful in charts like 'pie', where data item name can be - # displayed in legend. - class Encode - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Data label config for a series. - # @!attribute [rw] show - # @return [::Boolean] - # Optional. Whether to show data label. - class DataLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Custom styling for chart - # @!attribute [rw] border_width - # @return [::Integer] - # Optional. Used to add border width - # @!attribute [rw] border_color - # @return [::String] - # Optional. Used to add border color - # @!attribute [rw] color - # @return [::String] - # Optional. Used to add color - class ItemStyle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Custom styling for area chart - # @!attribute [rw] color - # @return [::String] - # Optional. Used to add color - # @!attribute [rw] origin - # @return [::String] - # Optional. Used to add origin - # @!attribute [rw] shadow_blur - # @return [::Integer] - # Optional. Used to add shadow blur - # @!attribute [rw] shadow_color - # @return [::String] - # Optional. Used to add shadow color - # @!attribute [rw] shadow_offset_x - # @return [::Integer] - # Optional. Used to add shadow offsetX - # @!attribute [rw] shadow_offset_y - # @return [::Integer] - # Optional. Used to add shadow offsetY - # @!attribute [rw] opacity - # @return [::Integer] - # Optional. Used to add opacity - class AreaStyle - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # User selected color and label for the slice of the chart - # @!attribute [rw] color - # @return [::String] - # Optional. User specified color of a pie slice - # @!attribute [rw] label - # @return [::String] - # Optional. User specified label for a pie slice - class UserSelectedValues - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Slice containing the key and value for a slice in the chart - # @!attribute [rw] key - # @return [::String] - # Optional. Key for the slice - # @!attribute [rw] value - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::UserSelectedValues] - # Optional. Value for the slice - class ChartSliceColor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Field to be saved for retrieving slice colors for the chart - # @!attribute [rw] colors - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::ChartSliceColor>] - # Optional. Slice colors array - class ItemColors - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Field to be saved for retrieving value and color for gauge chart - # @!attribute [rw] value - # @return [::Integer] - # Optional. Value for gauge chart - # @!attribute [rw] color - # @return [::String] - # Optional. Color for gauge chart - class GaugeValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Field to be saved for retrieving value and color for gauge chart - # @!attribute [rw] base_value - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeValue] - # Optional. Base value for gauge chart - # @!attribute [rw] limit_value - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeValue] - # Optional. Limit value for gauge chart - # @!attribute [rw] threshold_values - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::Series::GaugeValue>] - # Optional. Threshold values for gauge chart - class GaugeConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metric trend config for displaying trend value in Metrics chart - # @!attribute [rw] metric_format - # @return [::Google::Cloud::Chronicle::V1::MetricFormat] - # Optional. Metric chart configuration to display metric trend - # @!attribute [rw] show_metric_trend - # @return [::Boolean] - # Optional. Metric chart configuration to toggle the trend value - # display - # @!attribute [rw] metric_display_trend - # @return [::Google::Cloud::Chronicle::V1::MetricDisplayTrend] - # Optional. Metric chart configuration to display the trend value - # @!attribute [rw] metric_trend_type - # @return [::Google::Cloud::Chronicle::V1::MetricTrendType] - # Optional. Metric chart configuration to display trend type whether - # regular or inverse - class MetricTrendConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] show - # @return [::Boolean] - # @!attribute [rw] tooltip_trigger - # @return [::Google::Cloud::Chronicle::V1::ToolTipTrigger] - class Tooltip - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] id - # @return [::String] - # @!attribute [rw] show - # @return [::Boolean] - # @!attribute [rw] z_level - # @return [::Integer] - # @!attribute [rw] z - # @return [::Integer] - # @!attribute [rw] left - # @return [::Integer] - # @!attribute [rw] top - # @return [::Integer] - # @!attribute [rw] right - # @return [::Integer] - # @!attribute [rw] bottom - # @return [::Integer] - # @!attribute [rw] legend_orient - # @return [::Google::Cloud::Chronicle::V1::LegendOrient] - # @!attribute [rw] legend_align - # @return [::Google::Cloud::Chronicle::V1::LegendAlign] - # @!attribute [rw] padding - # @return [::Array<::Integer>] - class Legend - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Column Definition. - # @!attribute [rw] field - # @return [::String] - # Field key in data. - # @!attribute [rw] header - # @return [::String] - # Header name for column. - class ColumnDef - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Column render type settings. This is used to determine the data render - # type of the column in the table. - # @!attribute [rw] field - # @return [::String] - # Optional. Field key in data. - # @!attribute [rw] column_render_type - # @return [::Google::Cloud::Chronicle::V1::RenderType] - # Optional. Column render type. - class ColumnRenderTypeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for tooltip for column header and cell. - # @!attribute [rw] field - # @return [::String] - # Required. Field key in data. - # @!attribute [rw] header_tooltip_text - # @return [::String] - # Optional. Column header tooltip text. - # @!attribute [rw] cell_tooltip_text - # @return [::String] - # Optional. Column cell tooltip text. - class ColumnTooltipSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for table appearance. - # @!attribute [rw] enable_text_wrap - # @return [::Boolean] - # Optional. Whether to show the table. - # @!attribute [rw] column_render_type_settings - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::ColumnRenderTypeSettings>] - # Optional. Column render type settings. - # @!attribute [rw] column_tooltip_settings - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::ColumnTooltipSettings>] - # Optional. Settings for tooltip for column header and cell. - class TableConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Google Maps config for a chart if chart type is map. - # @!attribute [rw] data_settings - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig::DataSettings] - # Optional. Data settings for the map. - # @!attribute [rw] plot_mode - # @return [::Google::Cloud::Chronicle::V1::PlotMode] - # Optional. Plot mode for the map. This is used to determine whether to - # show points, heatmap or both. - # @!attribute [rw] map_position - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig::MapPosition] - # Optional. Map position settings for the map. - # @!attribute [rw] point_settings - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::GoogleMapsConfig::PointSettings] - # Optional. Point settings for the map. - class GoogleMapsConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Data settings for the map. - # @!attribute [rw] latitude_column - # @return [::String] - # Optional. Latitude column. - # @!attribute [rw] longitude_column - # @return [::String] - # Optional. Longitude column. - # @!attribute [rw] count_column - # @return [::String] - # Optional. Field to count. - class DataSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Map position settings for the map. - # @!attribute [rw] fit_data - # @return [::Boolean] - # Optional. Whether to fit the map to the data. - # If true, the map will be resized to fit the data. - # If false, langitude and longitude will be used to set the map size. - # @!attribute [rw] latitude_value - # @return [::Float] - # Optional. Latitude of the map. - # @!attribute [rw] longitude_value - # @return [::Float] - # Optional. Longitude of the map. - # @!attribute [rw] zoom_scale_value - # @return [::Float] - # Optional. Scale of the map. - class MapPosition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Point settings for the map. - # @!attribute [rw] point_size_type - # @return [::Google::Cloud::Chronicle::V1::PointSizeType] - # Optional. Point size type for the map. This is used to - # determine the size of the points on the map. - # @!attribute [rw] color - # @return [::String] - # Optional. Color for the point on the map. - class PointSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Conveys what range of values should be rendered in what color. This field - # is used when threshold_coloring_enabled is true. - # @!attribute [rw] visual_map_type - # @return [::Google::Cloud::Chronicle::V1::VisualMapType] - # Optional. Contains one of the valid visual map types such as - # 'continuous' or 'piecewise'. - # @!attribute [rw] pieces - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::Visualization::VisualMap::VisualMapPiece>] - # Optional. Pieces of the visual map. - class VisualMap - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An ECharts visual map of type 'piecewise' contain many pieces. Each - # piece has a min, max, and color with which it's rendered. - # @!attribute [rw] min - # @return [::Integer] - # Optional. Minimum value for the piece. - # @!attribute [rw] max - # @return [::Integer] - # Optional. Minimum value for the piece. - # @!attribute [rw] color - # @return [::String] - # Optional. Color to render the piece in when the value is between min - # and max. - # @!attribute [rw] label - # @return [::String] - # Optional. Label used in visual map controller. - class VisualMapPiece - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Drill down configuration. - # @!attribute [rw] left_drill_downs - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown>] - # Required. Left click drill downs. - # @!attribute [rw] right_drill_downs - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown>] - # Required. Right click drill downs. - class DrillDownConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Drill down config. - # @!attribute [rw] default_settings - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::DefaultDrillDownSettings] - # Default drill down settings. - # - # Note: The following fields are mutually exclusive: `default_settings`, `custom_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_settings - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings] - # Custom drill down settings. - # - # Note: The following fields are mutually exclusive: `custom_settings`, `default_settings`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] id - # @return [::String] - # Required. ID of the drill down. - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the drill down. - class DrillDown - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Default drill down settings. - # @!attribute [rw] enabled - # @return [::Boolean] - # Required. Whether the default drill down is enabled. - class DefaultDrillDownSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Custom drill down settings. - # @!attribute [rw] query - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownQuery] - # Drill down query action config. - # - # Note: The following fields are mutually exclusive: `query`, `filter`, `external_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] filter - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter] - # Drill down filter action config. - # - # Note: The following fields are mutually exclusive: `filter`, `query`, `external_link`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] external_link - # @return [::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownExternalLink] - # Drill down external link action config. - # - # Note: The following fields are mutually exclusive: `external_link`, `query`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] new_tab - # @return [::Boolean] - # Required. Whether to open the drill down action in a new tab. - # @!attribute [rw] left_click_column - # @return [::String] - # Optional. Table chart column name to associate the custom drill down - # action on left click. - class CustomDrillDownSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Drill down query config. - # @!attribute [rw] query - # @return [::String] - # Required. Search query to be executed on drill down. - class DrillDownQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Drill down filter config. - # @!attribute [rw] dashboard_filters - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart::DrillDownConfig::DrillDown::CustomDrillDownSettings::DrillDownFilter::DrillDownDashboardFilter>] - # Required. Dashboard filters to be applied on drill down. - class DrillDownFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Drill down dashboard filter config. - # @!attribute [rw] dashboard_filter_id - # @return [::String] - # Required. ID of the dashboard filter. - # @!attribute [rw] filter_operator_and_values - # @return [::Array<::Google::Cloud::Chronicle::V1::FilterOperatorAndValues>] - # Required. Filter operator and field values for the dashboard - # filter. - class DrillDownDashboardFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Drill down external link config. - # @!attribute [rw] link - # @return [::String] - # Required. External link the drill down action should redirect to. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the external link. - class DrillDownExternalLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - - # Button config for a chart. - # @!attribute [rw] label - # @return [::String] - # @!attribute [rw] hyperlink - # @return [::String] - # @!attribute [rw] description - # @return [::String] - # @!attribute [rw] new_tab - # @return [::Boolean] - # Optional. Whether to open the link in a new tab. - # @!attribute [rw] properties - # @return [::Google::Cloud::Chronicle::V1::Button::Properties] - class Button - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] color - # @return [::String] - # @!attribute [rw] button_style - # @return [::Google::Cloud::Chronicle::V1::ButtonStyle] - class Properties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Markdown config for a dashboard tile. - # @!attribute [rw] content - # @return [::String] - # Required. Markdown content. - # @!attribute [rw] properties - # @return [::Google::Cloud::Chronicle::V1::Markdown::MarkdownProperties] - # Optional. Properties for the markdown. - class Markdown - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Properties for the markdown. - # @!attribute [rw] background_color - # @return [::String] - # Optional. Background color of the markdown. - class MarkdownProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message to get a dashboard chart. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the dashboardChart to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardCharts/\\{chart} - class GetDashboardChartRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to get dashboard charts in batch. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource shared by all dashboard charts being - # retrieved. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance} If this is - # set, the parent of all of the dashboard charts specified in `names` must - # match this field. - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. The names of the dashboard charts to get. - class BatchGetDashboardChartsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for getting dashboard charts in batch. - # @!attribute [rw] dashboard_charts - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart>] - # The dashboardCharts from the specified chronicle instance. - class BatchGetDashboardChartsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # TileType indicates what type of chart tile it is i.e., visualization chart, - # button or text. - module TileType - # Defaults to VISUALIZATION. - TILE_TYPE_UNSPECIFIED = 0 - - # Visualization i.e., bar charts, pie charts etc. - TILE_TYPE_VISUALIZATION = 1 - - # Button with hyperlink. - TILE_TYPE_BUTTON = 2 - - # Markdown tile. - TILE_TYPE_MARKDOWN = 3 - end - - # Render type of the data in the chart. - module RenderType - # Defaults to Unspecified. - RENDER_TYPE_UNSPECIFIED = 0 - - # Text render type. - RENDER_TYPE_TEXT = 1 - - # Icon render type. - RENDER_TYPE_ICON = 2 - - # Icon and text render type. - RENDER_TYPE_ICON_AND_TEXT = 3 - end - - module AxisType - AXIS_TYPE_UNSPECIFIED = 0 - - VALUE = 1 - - CATEGORY = 2 - - TIME = 3 - - LOG = 4 - end - - module SeriesType - SERIES_TYPE_UNSPECIFIED = 0 - - LINE = 1 - - BAR = 2 - - PIE = 3 - - TEXT = 4 - - # Represents map chart type. - MAP = 5 - - # Represents gauge chart type. - GAUGE = 6 - - # Represents scatterplot chart type. - SCATTERPLOT = 7 - end - - module SeriesStackStrategy - SERIES_STACK_STRATEGY_UNSPECIFIED = 0 - - SAMESIGN = 1 - - ALL = 2 - - POSITIVE = 3 - - NEGATIVE = 4 - end - - module ToolTipTrigger - TOOLTIP_TRIGGER_UNSPECIFIED = 0 - - TOOLTIP_TRIGGER_NONE = 1 - - TOOLTIP_TRIGGER_ITEM = 2 - - TOOLTIP_TRIGGER_AXIS = 3 - end - - module LegendOrient - LEGEND_ORIENT_UNSPECIFIED = 0 - - VERTICAL = 1 - - HORIZONTAL = 2 - end - - module LegendAlign - LEGEND_ALIGN_UNSPECIFIED = 0 - - AUTO = 1 - - LEFT = 2 - - RIGHT = 3 - end - - module ButtonStyle - BUTTON_STYLE_UNSPECIFIED = 0 - - BUTTON_STYLE_FILLED = 1 - - BUTTON_STYLE_OUTLINED = 2 - - BUTTON_STYLE_TRANSPARENT = 3 - end - - # Plot mode for the map. - module PlotMode - # Plot mode is not specified. - PLOT_MODE_UNSPECIFIED = 0 - - # Plot mode is points. - PLOT_MODE_POINTS = 1 - - # Plot mode is heatmap. - PLOT_MODE_HEATMAP = 2 - - # Plot mode is both points and heatmap. - PLOT_MODE_BOTH = 3 - end - - # Point size type for the map. - module PointSizeType - # Point size is not specified. - POINT_SIZE_TYPE_UNSPECIFIED = 0 - - # Point size is fixed. - POINT_SIZE_TYPE_FIXED = 1 - - # Point size is proportional to the size of the data point. - POINT_SIZE_TYPE_PROPORTIONAL_TO_SIZE = 2 - end - - # Metric format to be displayed for the metric charts. - module MetricFormat - # Metric format is not specified. - METRIC_FORMAT_UNSPECIFIED = 0 - - # Metric format in number - METRIC_FORMAT_NUMBER = 1 - - # Metric format in plain text - METRIC_FORMAT_PLAIN_TEXT = 2 - end - - # Trend to be displayed for the metric charts as. - module MetricDisplayTrend - # Trend is not specified. - METRIC_DISPLAY_TREND_UNSPECIFIED = 0 - - # Trend data in absolute value - METRIC_DISPLAY_TREND_ABSOLUTE_VALUE = 2 - - # Trend data in percentage - METRIC_DISPLAY_TREND_PERCENTAGE = 3 - - # Trend data in both absolute value and percentage - METRIC_DISPLAY_TREND_ABSOLUTE_VALUE_AND_PERCENTAGE = 4 - end - - # Trend to be displayed for the metric charts as. - module MetricTrendType - # Trend type is not specified. - METRIC_TREND_TYPE_UNSPECIFIED = 0 - - # The trend type is regular(green for positive delta) - METRIC_TREND_TYPE_REGULAR = 1 - - # The trend type is inverse(red for positive delta) - METRIC_TREND_TYPE_INVERSE = 2 - end - - # Visual map for various charts. More info: - # https://echarts.apache.org/en/option.html#visualMap - module VisualMapType - # Visual map type is not specified - VISUAL_MAP_TYPE_UNSPECIFIED = 0 - - # Continuous visual map - CONTINUOUS = 1 - - # Piecewise visual map - PIECEWISE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb deleted file mode 100644 index 7a1dca16bc9a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/dashboard_query.rb +++ /dev/null @@ -1,653 +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 Chronicle - module V1 - # DashboardQuery resource. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the dashboardQuery. - # @!attribute [rw] query - # @return [::String] - # Required. Search query string. - # @!attribute [rw] input - # @return [::Google::Cloud::Chronicle::V1::DashboardQuery::Input] - # Required. Inputs to the query. - # @!attribute [r] dashboard_chart - # @return [::String] - # Output only. DashboardChart this query belongs to. - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - class DashboardQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Input to the query like time window. - # @!attribute [rw] time_window - # @return [::Google::Type::Interval] - # time range to fetch the data for. - # - # Note: The following fields are mutually exclusive: `time_window`, `relative_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] relative_time - # @return [::Google::Cloud::Chronicle::V1::DashboardQuery::Input::RelativeTime] - # time range for last x units. - # - # Note: The following fields are mutually exclusive: `relative_time`, `time_window`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Input - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # time representation for last x units. - # @!attribute [rw] time_unit - # @return [::Google::Cloud::Chronicle::V1::TimeUnit] - # @!attribute [rw] start_time_val - # @return [::Integer] - class RelativeTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Request message to get a dashboard query. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the dashboardQuery to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dashboardQueries/\\{query} - class GetDashboardQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to execute a dashboard query. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, under which to run this dashboardQuery. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] query - # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] - # Required. The query to execute and get results back for. - # QueryID or 'query', 'input.time_window' fields will be used. Use - # 'native_dashboard' and 'dashboard_chart' fields if it is an in-dashboard - # query. - # @!attribute [rw] filters - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter>] - # Optional. Dashboard level filters other than query string. - # @!attribute [rw] clear_cache - # @return [::Boolean] - # Optional. When true, the backend would read from the database, rather than - # fetching data directly from the cache. - # @!attribute [rw] use_previous_time_range - # @return [::Boolean] - # Optional. When true, the backend will execute the query against the - # previous time range of the query. - class ExecuteDashboardQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Runtime error for a dashboard query. - # @!attribute [rw] error_title - # @return [::String] - # Short Description of the error. - # @!attribute [rw] error_description - # @return [::String] - # Error message - # @!attribute [rw] error_severity - # @return [::Google::Cloud::Chronicle::V1::QueryRuntimeError::ErrorSeverity] - # Severity of the error. - # @!attribute [rw] metadata - # @return [::Array<::Google::Cloud::Chronicle::V1::QueryRuntimeError::QueryRuntimeErrorMetadata>] - # Metadata for the error. - # @!attribute [rw] warning_reason - # @return [::Google::Cloud::Chronicle::V1::QueryRuntimeError::WarningReason] - # Reason for the error. - class QueryRuntimeError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Metadata for the error. - # @!attribute [rw] key - # @return [::Google::Cloud::Chronicle::V1::QueryRuntimeError::MetadataKey] - # Metadata key. - # @!attribute [rw] value - # @return [::String] - # Metadata value. - class QueryRuntimeErrorMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Based on ErrorSeverity, UI will choose to format the error differently. - module ErrorSeverity - # Severity is unknown. - ERROR_SEVERITY_UNSPECIFIED = 0 - - # Severity is warning. - WARNING = 1 - - # Error is severe. - SEVERE = 2 - end - - # Metadata enum to identify the metadata key. - module MetadataKey - # Key is unknown. - METADATA_KEY_UNSPECIFIED = 0 - - # Key is row limit. - ROW_LIMIT = 1 - end - - # Warning reason. - module WarningReason - # Reason is unknown. - WARNING_REASON_UNSPECIFIED = 0 - - # Reason is row limit exceeded. - ROW_LIMIT_EXCEEDED = 1 - - # Reason is default row limit exceeded. - DEFAULT_ROW_LIMIT_EXCEEDED = 2 - - # Reason is curated query default row limit exceeded. - CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED = 3 - end - end - - # Response message for executing a dashboard query. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnData>] - # Result rows that are queried. - # @!attribute [rw] data_sources - # @return [::Array<::Google::Cloud::Chronicle::V1::DataSource>] - # Datasource of the query and results. - # @!attribute [rw] last_backend_cache_refreshed_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Last time the cache was refreshed. This would be used by the UI - # to show the last updated time. - # @!attribute [rw] time_window - # @return [::Google::Type::Interval] - # Time window against which query was executed. - # @!attribute [rw] query_runtime_errors - # @return [::Array<::Google::Cloud::Chronicle::V1::QueryRuntimeError>] - # Runtime errors - # @!attribute [rw] language_features - # @return [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] - # Optional. Language features found in the query. - class ExecuteDashboardQueryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # LINT.IfChange(stats_data) - # Value of the column based on data type. - # @!attribute [rw] null_val - # @return [::Boolean] - # True if the value is NULL. - # - # Note: The following fields are mutually exclusive: `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_val - # @return [::Boolean] - # Boolean value. - # - # Note: The following fields are mutually exclusive: `bool_val`, `null_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bytes_val - # @return [::String] - # Bytes value. - # - # Note: The following fields are mutually exclusive: `bytes_val`, `null_val`, `bool_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] double_val - # @return [::Float] - # Double value. - # - # Note: The following fields are mutually exclusive: `double_val`, `null_val`, `bool_val`, `bytes_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int64_val - # @return [::Integer] - # Integer value (signed). - # - # Note: The following fields are mutually exclusive: `int64_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] uint64_val - # @return [::Integer] - # Un-signed integer value. - # - # Note: The following fields are mutually exclusive: `uint64_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `string_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_val - # @return [::String] - # String value. Enum values are returned as strings. - # - # Note: The following fields are mutually exclusive: `string_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `timestamp_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] timestamp_val - # @return [::Google::Protobuf::Timestamp] - # Timestamp values. Does not handle `interval`. - # - # Note: The following fields are mutually exclusive: `timestamp_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `date_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] date_val - # @return [::Google::Type::Date] - # Date values. - # - # Note: The following fields are mutually exclusive: `date_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `proto_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] proto_val - # @return [::Google::Protobuf::Any] - # For any proto values that are not any of the above. - # - # Note: The following fields are mutually exclusive: `proto_val`, `null_val`, `bool_val`, `bytes_val`, `double_val`, `int64_val`, `uint64_val`, `string_val`, `timestamp_val`, `date_val`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnValue::ValueMetadata] - class ColumnValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] links - # @return [::Array<::Google::Cloud::Chronicle::V1::InAppLink>] - # "Auto" generated In-app links. - # @!attribute [rw] field_paths - # @return [::Array<::String>] - # @!attribute [rw] timestamp_val - # @return [::Google::Protobuf::Timestamp] - # Timestamp value to store the timestamp for the case of the date and - # time data type. - class ValueMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Singular vs list of values in a column. - # @!attribute [rw] value - # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnValue] - # Single value in a column. - # - # Note: The following fields are mutually exclusive: `value`, `list`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list - # @return [::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnType::List] - # List of values in a column e.g. IPs - # - # Note: The following fields are mutually exclusive: `list`, `value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ColumnType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Store list of values in a column. - # @!attribute [rw] values - # @return [::Array<::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnValue>] - class List - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] column - # @return [::String] - # Used to store column names. - # @!attribute [rw] values - # @return [::Array<::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse::ColumnType>] - # To store column data. - # @!attribute [rw] metadata - # @return [::Google::Cloud::Chronicle::V1::ColumnMetadata] - # To store column metadata. - class ColumnData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Dashboard level filter that can be used in native dashboards as well as - # inputs to execute query. - # @!attribute [rw] id - # @return [::String] - # ID of the filter. - # @!attribute [rw] data_source - # @return [::Google::Cloud::Chronicle::V1::DataSource] - # Datasource the filter is applicable for. - # @!attribute [rw] field_path - # @return [::String] - # Filter field path. - # @!attribute [rw] filter_operator_and_field_values - # @return [::Array<::Google::Cloud::Chronicle::V1::FilterOperatorAndValues>] - # Operator and values. Can include multiple modifiers. - # @!attribute [rw] display_name - # @return [::String] - # Display name of the filter. - # @!attribute [rw] chart_ids - # @return [::Array<::String>] - # Chart IDs the filter is applicable for. - # @!attribute [rw] is_standard_time_range_filter - # @return [::Boolean] - # Optional. Whether the filter is a standard time range filter, - # meaning that it has to be used as the query time range, - # and not as a predicate in the query. - # A chart can have at most one standard time range filter applied. - # @!attribute [rw] is_mandatory - # @return [::Boolean] - # Optional. Whether this filter is required to be populated by the - # dashboard consumer prior to the dashboard loading. - # @!attribute [rw] is_standard_time_range_filter_enabled - # @return [::Boolean] - # Optional. Whether this standard time range filter is enabled. - # @!attribute [rw] advanced_filter_config - # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig] - # Optional. Advanced filter configuration for the filter widget. - class DashboardFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] filter_operator - # @return [::Google::Cloud::Chronicle::V1::FilterOperator] - # Operator for a single filter modifier. - # @!attribute [rw] field_values - # @return [::Array<::String>] - # Values for the modifier. All operators should have a single value other - # than 'IN' and 'BETWEEN'. 'PAST' will have negative seconds - # like -86400 is past 1 day. - class FilterOperatorAndValues - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Advanced filter configuration for the filter widget. - # @!attribute [rw] token - # @return [::String] - # Required. The token name to look for in the query (e.g., "hostname"). - # The system will automatically wrap this in '$' (e.g., "$hostname$"). - # @!attribute [rw] prefix - # @return [::String] - # Optional. String to prepend to the final replaced value (e.g., "/", "^(", - # "\""). - # @!attribute [rw] suffix - # @return [::String] - # Optional. String to append to the final replaced value (e.g., "/", ")$", - # "\""). - # @!attribute [rw] separator - # @return [::String] - # Optional. Delimiter to join multiple selected values (e.g., "|", " OR field - # = "). - # @!attribute [rw] multiple_allowed - # @return [::Boolean] - # Optional. Whether to allow selection of multiple values. - # @!attribute [rw] default_values - # @return [::Array<::String>] - # Optional. Default values to use if no value is selected/provided. - # @!attribute [rw] skip_default_affixes - # @return [::Boolean] - # Optional. Whether to skip the configured prefix and suffix when using - # default values. If true, default values are inserted raw (joined by the - # separator). - # @!attribute [rw] value_source - # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig::ValueSource] - # Required. Source of the values for the filter. - class AdvancedFilterConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Source of the values for the filter. - # @!attribute [rw] manual_options - # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig::ManualOptions] - # Optional. Manual options provided by the user. - # - # Note: The following fields are mutually exclusive: `manual_options`, `query_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] query_options - # @return [::Google::Cloud::Chronicle::V1::AdvancedFilterConfig::QueryOptions] - # Optional. Query options to fetch the values from the query engine. - # This is used for the filter's population query. - # - # Note: The following fields are mutually exclusive: `query_options`, `manual_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ValueSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Manual options provided by the user. - # @!attribute [rw] options - # @return [::Array<::String>] - # Optional. The options provided by the user. - # The max number of options is limited to 10000. - class ManualOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Query options to fetch the values from the query engine. - # This is used for the filter's population query. - # @!attribute [rw] query - # @return [::String] - # Required. The query to execute to fetch the values. - # @!attribute [rw] column - # @return [::String] - # Required. The column name to use for the values. - # @!attribute [rw] global_time_filter_enabled - # @return [::Boolean] - # Optional. Enable global time filter - # @!attribute [rw] input - # @return [::Google::Cloud::Chronicle::V1::DashboardQuery::Input] - # Optional. Time range input specifically for the filter's population - # query. - class QueryOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # In app linking start - # @!attribute [rw] url - # @return [::String] - # URL to redirect to. - # @!attribute [rw] label - # @return [::String] - # Label for the link. - # @!attribute [rw] icon_url - # @return [::String] - # Icon url for the link. - class InAppLink - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata of the column. - # @!attribute [rw] column - # @return [::String] - # Name of the column. - # @!attribute [rw] field_path - # @return [::String] - # Field path of the queried field, if any. - # @!attribute [rw] function_name - # @return [::String] - # Name of the function used to query the field, if any. - # @!attribute [rw] function_module - # @return [::String] - # Module of the function used to query the field, if any. - # @!attribute [rw] data_source - # @return [::Google::Cloud::Chronicle::V1::DataSource] - # Data source queried. - # @!attribute [rw] timestamp_metadata - # @return [::Google::Cloud::Chronicle::V1::TimestampMetadata] - # Timestamp Metadata - # @!attribute [rw] longitude - # @return [::Boolean] - # Whether the column is a longitude field. - # @!attribute [rw] latitude - # @return [::Boolean] - # Whether the column is a latitude field. - # @!attribute [rw] selected - # @return [::Boolean] - # Whether the column is selected in the final response. - # @!attribute [rw] unselected - # @return [::Boolean] - # Whether the column is unselected in the final response. - class ColumnMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata of the timestamp column. - # @!attribute [rw] time_format - # @return [::String] - # Time format of the timestamp column. - # @!attribute [rw] time_zone - # @return [::String] - # Time zone of the timestamp column. - # @!attribute [rw] time_granularity - # @return [::String] - # Time granularity of the timestamp column. - # @!attribute [rw] is_sortable - # @return [::Boolean] - # Whether the timestamp column is sortable in UI. - # @!attribute [rw] is_interpolable - # @return [::Boolean] - # Whether the timestamp column is interpolable in UI. - class TimestampMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A language feature describes a specific capability or syntax of the query - # language used in a dashboard query, such as `JOINS`, `STAGES`, or - # `DATA_TABLES`. - module LanguageFeature - # Language feature is unknown. - LANGUAGE_FEATURE_UNSPECIFIED = 0 - - # Language feature is joins. - JOINS = 1 - - # Language feature is stages. - STAGES = 2 - - # Language feature is data table. - DATA_TABLES = 3 - end - - module FilterOperator - # Default unspecified. - FILTER_OPERATOR_UNSPECIFIED = 0 - - EQUAL = 1 - - NOT_EQUAL = 2 - - IN = 3 - - GREATER_THAN = 4 - - GREATER_THAN_OR_EQUAL_TO = 5 - - LESS_THAN = 6 - - LESS_THAN_OR_EQUAL_TO = 7 - - BETWEEN = 8 - - PAST = 9 - - IS_NULL = 10 - - IS_NOT_NULL = 11 - - STARTS_WITH = 12 - - ENDS_WITH = 13 - - DOES_NOT_STARTS_WITH = 14 - - DOES_NOT_ENDS_WITH = 15 - - NOT_IN = 16 - - # CONTAINS is used for substring match. - CONTAINS = 17 - - # Used if we want to check if the field does not contain the substring. - DOES_NOT_CONTAIN = 18 - end - - # LINT.IfChange(data_sources) - module DataSource - DATA_SOURCE_UNSPECIFIED = 0 - - UDM = 1 - - ENTITY = 2 - - INGESTION_METRICS = 3 - - # RULE_DETECTIONS is used for detections datasource. - RULE_DETECTIONS = 4 - - # RULESETS is used for ruleset with detections datasource. - RULESETS = 5 - - # GLOBAL is used for standard time range filter. - GLOBAL = 6 - - # IOC_MATCHES is used for ioc_matches datasource. - IOC_MATCHES = 7 - - # RULES is used for rules datasource. - RULES = 8 - - # SOAR Cases - identified as `case`. - SOAR_CASES = 9 - - # SOAR Playbooks - identified as `playbook`. - SOAR_PLAYBOOKS = 10 - - # SOAR Case History - identified as `case_history`. - SOAR_CASE_HISTORY = 11 - - # DATA_TABLE is used for data tables source. - DATA_TABLE = 12 - - # INVESTIGATION is used as the data source for triage agent investigations. - # Identified as `gemini_investigation`. - INVESTIGATION = 13 - - # INVESTIGATION_FEEDBACK is used as the data source for user feedback on - # triage agent investigations. Identified as `gemini_investigation_feedback`. - INVESTIGATION_FEEDBACK = 14 - end - - # TimeUnit supported for PAST filter operator. - module TimeUnit - # Default unspecified. - TIME_UNIT_UNSPECIFIED = 0 - - SECOND = 1 - - MINUTE = 2 - - HOUR = 3 - - DAY = 4 - - WEEK = 5 - - MONTH = 6 - - YEAR = 7 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb deleted file mode 100644 index 1342c3da69d2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb +++ /dev/null @@ -1,364 +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 Chronicle - module V1 - # Request message for CreateDataAccessLabel. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this Data Access Label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] data_access_label - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # Required. Data access label to create. - # @!attribute [rw] data_access_label_id - # @return [::String] - # Required. The ID to use for the data access label, which will become the - # label's display name and the final component of the label's resource name. - # The maximum number of characters should be 63. Regex pattern is as per AIP: - # https://google.aip.dev/122#resource-id-segments - class CreateDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to retrieve a data access label. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access label to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - class GetDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListDataAccessLabels. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this data access label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of data access labels to return. The service may return - # fewer than this value. If unspecified, at most 100 data access labels will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListDataAccessLabelsRequest` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessLabel and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - class ListDataAccessLabelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListDataAccessLabels. - # @!attribute [rw] data_access_labels - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # List of data access labels. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDataAccessLabelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateDataAccessLabel method. - # @!attribute [rw] data_access_label - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # Required. The data access label to update. - # - # The label's `name` field is used to identify the label to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description and definition - # fields are supported for update; an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - class UpdateDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to delete a data access label. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access label to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - class DeleteDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateDataAccessScope. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this Data Access Scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] data_access_scope - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # Required. Data access scope to create. - # @!attribute [rw] data_access_scope_id - # @return [::String] - # Required. The user provided scope id which will become the last part of the - # name of the scope resource. Needs to be compliant with - # https://google.aip.dev/122 - class CreateDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to retrieve a data access scope. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access scope to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - class GetDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListDataAccessScopes. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this data access scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of data access scopes to return. The service may return - # fewer than this value. If unspecified, at most 100 data access scopes will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListDataAccessScopesRequest` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessScope and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - class ListDataAccessScopesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListDataAccessScopes. - # @!attribute [rw] data_access_scopes - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # List of data access scopes. - # @!attribute [rw] global_data_access_scope_granted - # @return [::Boolean] - # Whether or not global scope is granted to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDataAccessScopesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateDataAccessScope method. - # @!attribute [rw] data_access_scope - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # Required. The data access scope to update. - # - # The scope's `name` field is used to identify the scope to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description, the allowed - # and denied labels list fields are supported for update; - # an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - class UpdateDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to delete a data access scope. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access scope to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - class DeleteDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A DataAccessLabel is a label on events to define user access to data. - # @!attribute [rw] udm_query - # @return [::String] - # A UDM query over event data. - # @!attribute [rw] name - # @return [::String] - # The unique resource name of the data access label. - # @!attribute [r] display_name - # @return [::String] - # Output only. The short name displayed for the label as it appears on event - # data. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access label was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access label was last updated. - # @!attribute [r] author - # @return [::String] - # Output only. The user who created the data access label. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The user who last updated the data access label. - # @!attribute [rw] description - # @return [::String] - # Optional. A description of the data access label for a human reader. - class DataAccessLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A DataAccessScope is a boolean expression of data access labels used - # to restrict access to data for users. - # @!attribute [rw] name - # @return [::String] - # Required. The unique full name of the data access scope. - # The name should comply with https://google.aip.dev/122 standards. - # @!attribute [rw] allowed_data_access_labels - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] - # Optional. The allowed labels for the scope. - # Either allow_all or allowed_data_access_labels needs to be provided. - # When provided, there has to be at least one label allowed for the scope to - # be valid. - # The logical operator for evaluation of the allowed labels is OR. - # E.g.: A customer with scope with allowed labels A and B will be able - # to see data with labeled with A or B or (A and B). - # @!attribute [rw] denied_data_access_labels - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] - # Optional. The denied labels for the scope. - # The logical operator for evaluation of the denied labels is AND. - # E.g.: A customer with scope with denied labels A and B won't be able - # to see data labeled with A and data labeled with B - # and data with labels A and B. - # @!attribute [r] display_name - # @return [::String] - # Output only. The name to be used for display to customers of the data - # access scope. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access scope was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access scope was last updated. - # @!attribute [r] author - # @return [::String] - # Output only. The user who created the data access scope. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The user who last updated the data access scope. - # @!attribute [rw] description - # @return [::String] - # Optional. A description of the data access scope for a human reader. - # @!attribute [rw] allow_all - # @return [::Boolean] - # Optional. Whether or not the scope allows all labels, allow_all and - # allowed_data_access_labels are mutually exclusive and one of them must be - # present. denied_data_access_labels can still be used along with allow_all. - # When combined with denied_data_access_labels, access will be granted to all - # data that doesn't have labels mentioned in denied_data_access_labels. E.g.: - # A customer with scope with denied labels A and B and allow_all will be able - # to see all data except data labeled with A and data labeled with B and data - # with labels A and B. - class DataAccessScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Reference object to a data access label. - # @!attribute [rw] data_access_label - # @return [::String] - # The name of the data access label. - # - # Note: The following fields are mutually exclusive: `data_access_label`, `log_type`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] log_type - # @return [::String] - # The name of the log type. - # - # Note: The following fields are mutually exclusive: `log_type`, `data_access_label`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] asset_namespace - # @return [::String] - # The asset namespace configured in the forwarder - # of the customer's events. - # - # Note: The following fields are mutually exclusive: `asset_namespace`, `data_access_label`, `log_type`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ingestion_label - # @return [::Google::Cloud::Chronicle::V1::IngestionLabel] - # The ingestion label configured in the forwarder of the customer's events. - # - # Note: The following fields are mutually exclusive: `ingestion_label`, `data_access_label`, `log_type`, `asset_namespace`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name of the label. - # Data access label and log types's name - # will match the display name of the resource. - # The asset namespace will match the namespace itself. - # The ingestion key value pair will match the key of the tuple. - class DataAccessLabelReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Representation of an ingestion label type. - # @!attribute [rw] ingestion_label_key - # @return [::String] - # Required. The key of the ingestion label. Always required. - # @!attribute [rw] ingestion_label_value - # @return [::String] - # Optional. The value of the ingestion label. Optional. An object - # with no provided value and some key provided would match - # against the given key and ANY value. - class IngestionLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb deleted file mode 100644 index dbbe11a22639..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_table.rb +++ /dev/null @@ -1,512 +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 Chronicle - module V1 - # A request to create DataTable. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] data_table - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # Required. The data table being created. - # @!attribute [rw] data_table_id - # @return [::String] - # Required. The ID to use for the data table. This is also the display name - # for the data table. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Must be unique and has length < 256. - class CreateDataTableRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get details about a data table. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data table to retrieve. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - class GetDataTableRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update details of data table. - # @!attribute [rw] data_table - # @return [::Google::Cloud::Chronicle::V1::DataTable] - # Required. This field is used to identify the datatable to update. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of metadata fields to update. Currently data tables only - # support updating the `description`, `row_time_to_live` and `scope_info` - # fields. When no field mask is supplied, all non-empty fields will be - # updated. A field mask of "*" will update all fields, whether empty or not. - class UpdateDataTableRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request for a list of data tables. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this data table will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of data tables to return. The service may - # return fewer than this value. If unspecified, at most 100 data tables will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDataTables` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to - # `ListDataTables` must match the call that provided the page - # token. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - class ListDataTablesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting data tables. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data table to delete. - # Format - # projects/\\{project}/locations/\\{location}/instances/\\{instances}/dataTables/\\{data_table} - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any rows under this data table will also be - # deleted. (Otherwise, the request will only work if the data table has no - # rows.) - class DeleteDataTableRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing data tables. - # @!attribute [rw] data_tables - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTable>] - # The list of the data tables returned. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDataTablesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create data table row. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] data_table_row - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # Required. The data table row to create. - class CreateDataTableRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update data table row. - # @!attribute [rw] data_table_row - # @return [::Google::Cloud::Chronicle::V1::DataTableRow] - # Required. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update. Currently data table rows only - # support updating the `values` field. When no field mask is supplied, all - # non-empty fields will be updated. A field mask of "*" will update all - # fields, whether empty or not. - class UpdateDataTableRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list data table rows. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # projects/\\{project}/locations/\\{locations}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of data table rows to return. The service may - # return fewer than this value. If unspecified, at most 100 data table rows - # will be returned. The maximum value is 1000; values above 1000 will be - # coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDataTableRows` call. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Configures ordering of DataTables in the response. - # Note: Our implementation currently supports order by "create_time asc" only - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter facilitating search over data table rows. This filter - # performs a case-insensitive substring match on the row values. - class ListDataTableRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing data table rows. - # @!attribute [rw] data_table_rows - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] - # The list of the data table rows returned. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListDataTableRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get data table row. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - class GetDataTableRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete data table row. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data table row i,e row_id. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - class DeleteDataTableRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create data table rows in bulk. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest>] - # Required. Data table rows to create. A maximum of 1000 rows (for sync - # requests) or 2000 rows (for async requests) can be created in a single - # request. Total size of the rows should be less than 4MB. - class BulkCreateDataTableRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with created data table rows. - # @!attribute [rw] data_table_rows - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] - # DataTableRows created - class BulkCreateDataTableRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get data table rows in bulk. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Chronicle::V1::GetDataTableRowRequest>] - # Required. Data table rows to get. At max 1,000 rows can be there in a - # request. - class BulkGetDataTableRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with data table rows. - # @!attribute [rw] data_table_rows - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] - # The requested data table rows. - class BulkGetDataTableRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to replace data table rows in bulk. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest>] - # Required. Data table rows to replace the existing data table rows. A - # maximum of 1000 rows (for sync requests) or 2000 rows (for async requests) - # can be replaced in a single request. Total size of the rows should be less - # than 4MB. - class BulkReplaceDataTableRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with data table rows that replaced existing data table rows. - # @!attribute [rw] data_table_rows - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] - # DataTableRows that replaced existing data table rows - class BulkReplaceDataTableRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update data table rows in bulk. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource id of the data table. - # Format: - # /projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table} - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest>] - # Required. Data table rows to update. At max 1,000 rows (or rows with size - # less than 2MB) can be there in a request. - class BulkUpdateDataTableRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message with updated data table rows. - # @!attribute [rw] data_table_rows - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableRow>] - # DataTableRows updated - class BulkUpdateDataTableRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataTableScopeInfo specifies the scope info of the data table. - # @!attribute [rw] data_access_scopes - # @return [::Array<::String>] - # Required. Contains the list of scope names of the data table. If the list - # is empty, the data table is treated as unscoped. The scope names should be - # full resource names and should be of the format: - # "projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataAccessScopes/\\{scope_name}" - class DataTableScopeInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataTable represents the data table resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the data table - # Format: - # "\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}" - # @!attribute [r] display_name - # @return [::String] - # Output only. The unique display name of the data table. - # @!attribute [rw] description - # @return [::String] - # Required. A user-provided description of the data table. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Table create time - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Table update time - # @!attribute [rw] column_info - # @return [::Array<::Google::Cloud::Chronicle::V1::DataTableColumnInfo>] - # Immutable. Details of all the columns in the table - # @!attribute [r] data_table_uuid - # @return [::String] - # Output only. Data table unique id - # @!attribute [r] rules - # @return [::Array<::String>] - # Output only. The resource names for the associated Rules that use this - # data table. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/rules/\\{rule}. - # \\{rule} here refers to the rule id. - # @!attribute [r] rule_associations_count - # @return [::Integer] - # Output only. The count of rules using the data table. - # @!attribute [rw] row_time_to_live - # @return [::String] - # Optional. User-provided TTL of the data table. - # @!attribute [r] approximate_row_count - # @return [::Integer] - # Output only. The count of rows in the data table. - # @!attribute [rw] scope_info - # @return [::Google::Cloud::Chronicle::V1::DataTableScopeInfo] - # Optional. The scope info of the data table. - # During data table creation, if this field is not set, the data - # table without scopes (an unscoped table) will be created for a global - # user. For a scoped user, this field must be set. During data table - # update, if scope_info is requested to be updated, this field must be set. - # @!attribute [r] update_source - # @return [::Google::Cloud::Chronicle::V1::DataTableUpdateSource] - # Output only. Source of the data table update. - # @!attribute [r] row_time_to_live_update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update time of the TTL of the data table. - class DataTable - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataTableRow represents a single row in a data table. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the data table - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTables/\\{data_table}/dataTableRows/\\{data_table_row} - # @!attribute [rw] values - # @return [::Array<::String>] - # Required. All column values for a single row. The values should be in the - # same order as the columns of the data tables. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. DataTableRow create time - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. DataTableRow update time - # @!attribute [rw] row_time_to_live - # @return [::String] - # Optional. User-provided TTL of the data table row. - class DataTableRow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataTableColumnInfo represents the column metadata of the - # datatable. The column_index represents the ordering of the - # values in DataTableRow. - # @!attribute [rw] mapped_column_path - # @return [::String] - # Entity proto field path that the column is mapped to - # - # Note: The following fields are mutually exclusive: `mapped_column_path`, `column_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] column_type - # @return [::Google::Cloud::Chronicle::V1::DataTableColumnInfo::DataTableColumnType] - # Column type can be STRING, CIDR (Ex- 10.1.1.0/24), REGEX - # - # Note: The following fields are mutually exclusive: `column_type`, `mapped_column_path`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] column_index - # @return [::Integer] - # Required. Column Index. 0,1,2... - # @!attribute [rw] original_column - # @return [::String] - # Required. Original column name of the Data Table (present in the CSV header - # in case of creation of data tables using file uploads). It must satisfy the - # following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Must be unique and has length < 256. - # @!attribute [rw] key_column - # @return [::Boolean] - # Optional. Whether to include this column in the calculation of the row ID. - # If no columns have key_column = true, all columns will be included in the - # calculation of the row ID. - # @!attribute [rw] repeated_values - # @return [::Boolean] - # Optional. Whether the column is a repeated values column. - class DataTableColumnInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # DataTableColumnType denotes the type of the column to be referenced in the - # rule. - module DataTableColumnType - # The default Data Table Column Type. - DATA_TABLE_COLUMN_TYPE_UNSPECIFIED = 0 - - # Denotes the type of the column as STRING. - STRING = 1 - - # Denotes the type of the column as REGEX. - REGEX = 2 - - # Denotes the type of the column as CIDR. - CIDR = 3 - - # Denotes the type of the column as NUMBER (includes int and float). - NUMBER = 4 - end - end - - # The request message for GetDataTableOperationErrors. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name for the data table operation errors. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} - class GetDataTableOperationErrorsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The message containing the errors for a data table operation. - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name for the data table operation errors. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/dataTableOperationErrors/\\{data_table_operation_errors} - # @!attribute [rw] rpc_errors - # @return [::Array<::Google::Rpc::Status>] - # The list of errors. - # Replaces the deprecated `errors` field. - class DataTableOperationErrors - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DataTableUpdateSource denotes the source that updated the data table. - module DataTableUpdateSource - # The data table is updated by the user. - DATA_TABLE_UPDATE_SOURCE_UNSPECIFIED = 0 - - # The data table is updated by the user. - USER = 1 - - # The data table is updated by the rule. - RULE = 2 - - # The data table is updated by the search. - SEARCH = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb deleted file mode 100644 index 89cef26897a2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb +++ /dev/null @@ -1,210 +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 Chronicle - module V1 - # A watchlist is a list of entities that allows for bulk operations over the - # included entities. - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name of the watchlist. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the watchlist. - # Note that it must be at least one character and less than 63 characters - # (https://google.aip.dev/148). - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the watchlist. - # @!attribute [rw] multiplying_factor - # @return [::Float] - # Optional. Weight applied to the risk score for entities - # in this watchlist. - # The default is 1.0 if it is not specified. - # @!attribute [rw] entity_population_mechanism - # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism] - # Required. Mechanism to populate entities in the watchlist. - # @!attribute [r] entity_count - # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityCount] - # Output only. Entity count in the watchlist. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the watchlist was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the watchlist was last updated. - # @!attribute [rw] watchlist_user_preferences - # @return [::Google::Cloud::Chronicle::V1::WatchlistUserPreferences] - # Optional. User preferences for watchlist configuration. - class Watchlist - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Mechanism to populate entities in the watchlist. - # @!attribute [rw] manual - # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism::Manual] - # Optional. Entities are added manually. - class EntityPopulationMechanism - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entities are added manually. - class Manual - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Count of different types of entities in the watchlist. - # @!attribute [r] user - # @return [::Integer] - # Output only. Count of user type entities in the watchlist. - # @!attribute [r] asset - # @return [::Integer] - # Output only. Count of asset type entities in the watchlist. - class EntityCount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A collection of user preferences for watchlist UI configuration. - # @!attribute [rw] pinned - # @return [::Boolean] - # Optional. Whether the watchlist is pinned on the dashboard. - class WatchlistUserPreferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a watchlist. - # @!attribute [rw] name - # @return [::String] - # Required. The parent, which owns this collection of watchlists. - # The name of the watchlist to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - class GetWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing watchlists. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of watchlists. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of watchlists to return. - # The service may return fewer than this value. - # If unspecified, at most 200 watchlists will be returned. - # The maximum value is 200; values above 200 will be coerced to 200. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListWatchlists` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListWatchlists` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Which watchlist to return in aip.dev/160 form. - # Currently, only the following filters are supported: - # - `watchlist_user_preferences.pinned=true` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - class ListWatchlistsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing watchlists. - # @!attribute [rw] watchlists - # @return [::Array<::Google::Cloud::Chronicle::V1::Watchlist>] - # Optional. The watchlists from the specified instance. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListWatchlistsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating watchlist. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this watchlist will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] watchlist_id - # @return [::String] - # Optional. The ID to use for the watchlist, - # which will become the final component of the watchlist's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @!attribute [rw] watchlist - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # Required. The watchlist to create. - class CreateWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating watchlist. - # @!attribute [rw] watchlist - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # Required. The watchlist to update. - # - # The watchlist's `name` field is used to identify the watchlist to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update. - class UpdateWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting watchlist. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the watchlist to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any entities under this watchlist will also be - # deleted. (Otherwise, the request will only work if the watchlist has no - # entities.) - class DeleteWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb deleted file mode 100644 index 278cfefa1bc0..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_metadata.rb +++ /dev/null @@ -1,82 +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 Chronicle - module V1 - # FeaturedContentMetadata holds metadata about the Featured Content. - # @!attribute [rw] id - # @return [::String] - # Required. Unique identifier of the featured content. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name of the featured content. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp indicating when the item was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp indicating when the item was updated. - # @!attribute [r] author - # @return [::String] - # Output only. Content item author full name. - # @!attribute [r] certified - # @return [::Boolean] - # Output only. Determine if this content item is officially certified by - # Google or created by the community. - # @!attribute [r] description - # @return [::String] - # Output only. The description of the content item. - # @!attribute [r] categories - # @return [::Array<::String>] - # Output only. Categories the content is associated with. - # @!attribute [r] version - # @return [::String] - # Output only. Featured content version (Major.Minor.Patch). - # @!attribute [r] verified - # @return [::Boolean] - # Output only. Whether the content is verified by Google (applicable for 3rd - # party content). - # @!attribute [r] source_type - # @return [::Google::Cloud::Chronicle::V1::FeaturedContentMetadata::ContentSourceType] - # Output only. The source type of the content. - class FeaturedContentMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # ContentSourceType specifying the content source of origin - module ContentSourceType - # Unspecified content source type - CONTENT_SOURCE_TYPE_UNSPECIFIED = 0 - - # Certified Google content source type - GOOGLE = 1 - - # Community content source type - COMMUNITY = 2 - - # Partner content source type - PARTNER = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb deleted file mode 100644 index 7086b2dc1e63..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/featured_content_native_dashboard.rb +++ /dev/null @@ -1,141 +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 Chronicle - module V1 - # FeaturedContentNativeDashboard resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the FeaturedContentNativeDashboard. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} - # @!attribute [r] content_metadata - # @return [::Google::Cloud::Chronicle::V1::FeaturedContentMetadata] - # Output only. Metadata about the FeaturedContentNativeDashboard. - # @!attribute [rw] dashboard_content - # @return [::Google::Cloud::Chronicle::V1::NativeDashboardWithChartsAndQueries] - # Optional. The dashboard content. - class FeaturedContentNativeDashboard - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to get a FeaturedContentNativeDashboard. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the FeaturedContentNativeDashboard to - # retrieve. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} - class GetFeaturedContentNativeDashboardRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to list FeaturedContentNativeDashboards. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of - # FeaturedContentNativeDashboards. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of FeaturedContentNativeDashboards to return. - # The service may return fewer than this value. If unspecified, at most 100 - # FeaturedContentNativeDashboards will be returned. The maximum value is 100; - # values above 100 will be coerced to 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListFeaturedContentNativeDashboards` call. Provide this to retrieve the - # subsequent page. - # - # When paginating, all other parameters provided to - # `ListFeaturedContentNativeDashboards` must match the call that provided the - # page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to apply to list the FeaturedContentNativeDashboards. - # - # The filter syntax follows Google Cloud syntax: https://google.aip.dev/160. - # - # Supported fields for filtering: - # - # * `name`: The resource name of the featured content. - # * `content_metadata.description`: The description of the featured - # content. - # - # When a literal value is provided without a field, it will perform a - # substring search across both `name` and `content_metadata.description`. - # - # Examples: - # - # * `"test"`: Matches featured content where either the name or description - # contains "test" as a substring. - # * `name="test"`: Matches featured content where the name contains "test". - # * `content_metadata.description="test"`: Matches featured content where - # the description contains "test". - class ListFeaturedContentNativeDashboardsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing FeaturedContentNativeDashboards. - # @!attribute [rw] featured_content_native_dashboards - # @return [::Array<::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard>] - # The list of FeaturedContentNativeDashboards. - # Ordered by name by default. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListFeaturedContentNativeDashboardsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to install a FeaturedContentNativeDashboard. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the FeaturedContentNativeDashboard to - # install. Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/contentHub/featuredContentNativeDashboards/\\{featured_content_native_dashboard} - # @!attribute [rw] featured_content_native_dashboard - # @return [::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard] - # Optional. The FeaturedContentNativeDashboard to install. - class InstallFeaturedContentNativeDashboardRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for installing a FeaturedContentNativeDashboard. - # @!attribute [rw] native_dashboard - # @return [::String] - # Optional. The resource name of the NativeDashboard created. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{native_dashboard_id} - class InstallFeaturedContentNativeDashboardResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb deleted file mode 100644 index dde3c3cbf88d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.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! - - -module Google - module Cloud - module Chronicle - module V1 - # A Instance represents an instantiation of the Instance product. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of this instance. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a Instance. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the instance to retrieve. - # Format: - # `projects/{project_id}/locations/{location}/instances/{instance}` - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb deleted file mode 100644 index da820f0b06de..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/native_dashboard.rb +++ /dev/null @@ -1,502 +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 Chronicle - module V1 - # Request message to export list of dashboard. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource that the dashboards to be exported belong to. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] names - # @return [::Array<::String>] - # Required. The resource names of the dashboards to export. - class ExportNativeDashboardsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for exporting a dashboard. - # @!attribute [rw] inline_destination - # @return [::Google::Cloud::Chronicle::V1::InlineDestination] - # The data for the exported dashboards included directly in the response. - class ExportNativeDashboardsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # InlineDestination for exporting a dashboard. - # @!attribute [rw] dashboards - # @return [::Array<::Google::Cloud::Chronicle::V1::NativeDashboardWithChartsAndQueries>] - # Dashboards with charts and queries. - class InlineDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NativeDashboardWithChartsAndQueries for exporting a dashboard. - # @!attribute [rw] dashboard - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # Optional. Native dashboard. - # @!attribute [rw] dashboard_charts - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardChart>] - # Optional. Charts in the dashboard. - # @!attribute [rw] dashboard_queries - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardQuery>] - # Optional. Queries in the dashboard. - class NativeDashboardWithChartsAndQueries - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to import dashboards. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this dashboard will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] source - # @return [::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource] - # Required. The data will imported from this proto. - class ImportNativeDashboardsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Inline source for importing dashboards. - # @!attribute [rw] dashboards - # @return [::Array<::Google::Cloud::Chronicle::V1::NativeDashboardWithChartsAndQueries>] - # Required. Dashboards with charts and queries. - class ImportNativeDashboardsInlineSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for importing dashboards. - # @!attribute [r] results - # @return [::Array<::Google::Cloud::Chronicle::V1::ImportExportStatus>] - # Output only. Represents the status of an import operation for multiple - # dashboards. Each dashboard's import status is tracked. A status of OK - # indicates the dashboard was ready for import. Otherwise, an appropriate - # error code and message are provided. Importantly, the import process is - # all-or-nothing: if even one dashboard fails to import, the entire import - # operation is aborted, and none of the dashboards are imported. The order of - # the statuses will be the same as in the import request. - class ImportNativeDashboardsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ImportExportStatus is a wrapper for dashboard name and status. - # @!attribute [rw] dashboard - # @return [::String] - # The resource name of the dashboard if it was supplied in the request. - # @!attribute [r] status - # @return [::Google::Rpc::Status] - # Output only. Status of the import/export operation. - class ImportExportStatus - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NativeDashboard resource. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the dashboard. - # @!attribute [rw] display_name - # @return [::String] - # Required. Dashboard display name/title visible to users. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the dashboard. - # @!attribute [rw] definition - # @return [::Google::Cloud::Chronicle::V1::DashboardDefinition] - # Optional. Definition of the dashboard like metadata, visualization and - # datasource configuration etc. - # @!attribute [r] type - # @return [::Google::Cloud::Chronicle::V1::DashboardType] - # Output only. Whether it's an out of the box or custom created dashboard. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation time of dashboard. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the dashboard was last edited. - # @!attribute [r] create_user_id - # @return [::String] - # Output only. User who created the dashboard. - # @!attribute [r] update_user_id - # @return [::String] - # Output only. User who last edited the dashboard. - # @!attribute [r] dashboard_user_data - # @return [::Google::Cloud::Chronicle::V1::DashboardUserData] - # Output only. User Preferences for a dashboard - # @!attribute [rw] etag - # @return [::String] - # Optional. This checksum is computed by the server based on the value of - # other fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [r] access - # @return [::Google::Cloud::Chronicle::V1::DashboardAccess] - # Output only. Access of the dashboard - class NativeDashboard - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to create a dashboard. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this dashboard will be created. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] native_dashboard - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # Required. The dashboard to create. - class CreateNativeDashboardRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to get a dashboard. - # @!attribute [rw] name - # @return [::String] - # Required. The dashboard name to fetch. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::NativeDashboardView] - # Optional. View indicates the scope of fields to populate when returning the - # dashboard resource. If unspecified, defaults to the basic view. - class GetNativeDashboardRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to list dashboards. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent owning this dashboard collection. - # Format: projects/\\{project}/locations/\\{location}/instances/\\{instance} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of dashboards to return. The service may - # return fewer than this value. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDashboards` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListDashboards` must - # match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::NativeDashboardView] - # Optional. View indicates the scope of fields to populate when returning the - # dashboard resource. If unspecified, defaults to the basic view. - class ListNativeDashboardsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing dashboards. - # @!attribute [rw] native_dashboards - # @return [::Array<::Google::Cloud::Chronicle::V1::NativeDashboard>] - # The dashboards from the specified chronicle instance. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListNativeDashboardsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to update a dashboard. - # @!attribute [rw] native_dashboard - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # Required. The dashboard to update. - # - # The dashboard's `name` field is used to identify the dashboard to update. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. LINT.IfChange(update_mask_values) - # The list of fields to update. - # Supported paths are - - # display_name - # description - # definition.filters - # definition.charts - # type - # access - # dashboard_user_data.is_pinned - class UpdateNativeDashboardRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to duplicate a dashboard. - # @!attribute [rw] name - # @return [::String] - # Required. The dashboard name to duplicate. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @!attribute [rw] native_dashboard - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # Required. Any fields that need modification can be passed through this like - # name, description etc. - class DuplicateNativeDashboardRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to delete a dashboard. - # @!attribute [rw] name - # @return [::String] - # Required. The dashboard name to delete. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - class DeleteNativeDashboardRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to add chart in a dashboard. - # @!attribute [rw] name - # @return [::String] - # Required. The dashboard name to add chart in. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @!attribute [rw] dashboard_query - # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] - # Optional. Query used to create the chart. - # @!attribute [rw] dashboard_chart - # @return [::Google::Cloud::Chronicle::V1::DashboardChart] - # Required. Chart to be added to the dashboard. - # @!attribute [rw] chart_layout - # @return [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout] - # Required. ChartLayout for newly added chart. - class AddChartRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for adding chart in a dashboard. - # @!attribute [rw] native_dashboard - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # Dashboard with chart added in definition. - # @!attribute [rw] dashboard_chart - # @return [::Google::Cloud::Chronicle::V1::DashboardChart] - # Created chart resource. - class AddChartResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to edit chart in a dashboard. - # @!attribute [rw] name - # @return [::String] - # Required. The dashboard name to edit chart in. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @!attribute [rw] dashboard_query - # @return [::Google::Cloud::Chronicle::V1::DashboardQuery] - # Optional. Query for the edited chart. - # @!attribute [rw] dashboard_chart - # @return [::Google::Cloud::Chronicle::V1::DashboardChart] - # Optional. Edited chart. - # @!attribute [rw] edit_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to edit for chart and query. - # Supported paths in chart are - - # dashboard_chart.display_name - # dashboard_chart.description - # dashboard_chart.chart_datasource.data_sources - # dashboard_chart.visualization - # dashboard_chart.visualization.button - # dashboard_chart.visualization.markdown - # dashboard_chart.drill_down_config - # Supported paths in query are - - # dashboard_query.query - # dashboard_query.input - # @!attribute [rw] language_features - # @return [::Array<::Google::Cloud::Chronicle::V1::LanguageFeature>] - # Optional. Language Features present in the query. - class EditChartRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for editing chart in a dashboard. - # @!attribute [rw] native_dashboard - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # Edited dashboard. - # @!attribute [rw] dashboard_chart - # @return [::Google::Cloud::Chronicle::V1::DashboardChart] - # Edited chart resource. - class EditChartResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to remove chart from a dashboard. - # @!attribute [rw] name - # @return [::String] - # Required. The dashboard name to remove chart from. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @!attribute [rw] dashboard_chart - # @return [::String] - # Required. The dashboard chart name to remove. - class RemoveChartRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to duplicate chart in a dashboard. - # @!attribute [rw] name - # @return [::String] - # Required. The dashboard name that involves chart duplication. - # Format: - # projects/\\{project}/locations/\\{location}/instances/\\{instance}/nativeDashboards/\\{dashboard} - # @!attribute [rw] dashboard_chart - # @return [::String] - # Required. The dashboard chart name to duplicate. - class DuplicateChartRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for duplicating chart in a dashboard. - # @!attribute [rw] native_dashboard - # @return [::Google::Cloud::Chronicle::V1::NativeDashboard] - # Dashboard with chart added in definition. - # @!attribute [rw] dashboard_chart - # @return [::Google::Cloud::Chronicle::V1::DashboardChart] - # Duplicated chart resource. - class DuplicateChartResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # User Data for Native Dashboard - # @!attribute [rw] last_viewed_time - # @return [::Google::Protobuf::Timestamp] - # time when this dashboard is last viewed - # @!attribute [rw] is_pinned - # @return [::Boolean] - # is dashboard pinned by user - class DashboardUserData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Definition of the dashboard including filters, layout, charts' - # configurations. - # @!attribute [rw] filters - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardFilter>] - # Filters for the dashboard. - # @!attribute [rw] fingerprint - # @return [::String] - # Fingerprint of the dashboard definition. - # @!attribute [rw] charts - # @return [::Array<::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig>] - # Charts in the dashboard. - class DashboardDefinition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration of the chart including chart reference, layout and filters. - # @!attribute [r] dashboard_chart - # @return [::String] - # @!attribute [rw] chart_layout - # @return [::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout] - # @!attribute [rw] filters_ids - # @return [::Array<::String>] - # Dashboard filters applied to the chart. - class ChartConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Layout of the chart. - # @!attribute [rw] start_x - # @return [::Integer] - # @!attribute [rw] span_x - # @return [::Integer] - # @!attribute [rw] start_y - # @return [::Integer] - # @!attribute [rw] span_y - # @return [::Integer] - class ChartLayout - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Type of the dashboard. - module DashboardType - # Default unspecified. - DASHBOARD_TYPE_UNSPECIFIED = 0 - - # Out of the box curated dashboards provided by Chronicle. - CURATED = 1 - - # Private dashboards created by users/customers. - PRIVATE = 2 - - # Public dashboards created by users/customers. - PUBLIC = 3 - - # Custom dashboards - CUSTOM = 4 - - # Marketplace dashboards - MARKETPLACE = 5 - end - - # AccessType of the dashboard. - module DashboardAccess - # Default unspecified. - DASHBOARD_ACCESS_UNSPECIFIED = 0 - - # Private dashboards created by users/customers. - DASHBOARD_PRIVATE = 1 - - # Public dashboards created by users/customers. - DASHBOARD_PUBLIC = 2 - end - - # NativeDashboardView indicates the scope of fields to populate when returning - # the dashboard resource. - module NativeDashboardView - # Defaults to basic. - NATIVE_DASHBOARD_VIEW_UNSPECIFIED = 0 - - # Include basic metadata about the dashboard without full definition. - NATIVE_DASHBOARD_VIEW_BASIC = 1 - - # Include everything. - NATIVE_DASHBOARD_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb deleted file mode 100644 index 2ab663d35a0d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.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 Chronicle - module V1 - # ScopeInfo specifies the scope info of the reference list. - # @!attribute [rw] reference_list_scope - # @return [::Google::Cloud::Chronicle::V1::ReferenceListScope] - # Required. The list of scope names of the reference list, if the list is - # empty the reference list is treated as unscoped. - class ScopeInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ReferenceListScope specifies the list of scope names of the reference list. - # @!attribute [rw] scope_names - # @return [::Array<::String>] - # Optional. The list of scope names of the reference list. The scope names - # should be full resource names and should be of the format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. - class ReferenceListScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get details about a reference list. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the reference list to retrieve. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of the ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_FULL. - class GetReferenceListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request for a list of reference lists. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of reference lists. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of reference lists to return. - # The service may return fewer than this value. - # If unspecified, at most 100 reference lists will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListReferenceLists` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListReferenceLists` must - # match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of each ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_BASIC. - class ListReferenceListsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to a request for a list of reference lists. - # @!attribute [rw] reference_lists - # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceList>] - # The reference lists. - # Ordered in ascending alphabetical order by name. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListReferenceListsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a reference list. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this reference list will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] reference_list - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # Required. The reference list to create. - # @!attribute [rw] reference_list_id - # @return [::String] - # Required. The ID to use for the reference list. This is also the display - # name for the reference list. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Has length less than 256. - # - Must be unique. - class CreateReferenceListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a reference list. - # @!attribute [rw] reference_list - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # Required. The reference list to update. - # - # The reference list's `name` field is used to identify the reference list to - # update. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # When no field mask is supplied, all non-empty fields will be updated. - # A field mask of "*" will update all fields, whether empty or not. - class UpdateReferenceListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A reference list. - # Reference lists are user-defined lists of values which users can - # use in multiple Rules. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the reference list. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - # @!attribute [r] display_name - # @return [::String] - # Output only. The unique display name of the reference list. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the reference list was last updated. - # @!attribute [rw] description - # @return [::String] - # Required. A user-provided description of the reference list. - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceListEntry>] - # Required. The entries of the reference list. - # When listed, they are returned in the order that was specified at creation - # or update. The combined size of the values of the reference list may not - # exceed 6MB. - # This is returned only when the view is REFERENCE_LIST_VIEW_FULL. - # @!attribute [r] rules - # @return [::Array<::String>] - # Output only. The resource names for the associated self-authored Rules that - # use this reference list. This is returned only when the view is - # REFERENCE_LIST_VIEW_FULL. - # @!attribute [rw] syntax_type - # @return [::Google::Cloud::Chronicle::V1::ReferenceListSyntaxType] - # Required. The syntax type indicating how list entries should be validated. - # @!attribute [r] rule_associations_count - # @return [::Integer] - # Output only. The count of self-authored rules using the reference list. - # @!attribute [rw] scope_info - # @return [::Google::Cloud::Chronicle::V1::ScopeInfo] - # The scope info of the reference list. - # During reference list creation, if this field is not set, the reference - # list without scopes (an unscoped list) will be created for an unscoped - # user. For a scoped user, this field must be set. During reference list - # update, if scope_info is requested to be updated, this field must be set. - class ReferenceList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An entry in a reference list. - # @!attribute [rw] value - # @return [::String] - # Required. The value of the entry. Maximum length is 512 characters. - class ReferenceListEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The syntax type indicating how list entries should be validated. - module ReferenceListSyntaxType - # Defaults to REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING. - REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED = 0 - - # List contains plain text patterns. - REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING = 1 - - # List contains only Regular Expression patterns. - REFERENCE_LIST_SYNTAX_TYPE_REGEX = 2 - - # List contains only CIDR patterns. - REFERENCE_LIST_SYNTAX_TYPE_CIDR = 3 - end - - # ReferenceListView is a mechanism for viewing partial responses of the - # ReferenceList resource. - module ReferenceListView - # The default / unset value. - # The API will default to the BASIC view for ListReferenceLists. - # The API will default to the FULL view for methods that return a single - # ReferenceList resource. - REFERENCE_LIST_VIEW_UNSPECIFIED = 0 - - # Include metadata about the ReferenceList. - # This is the default view for ListReferenceLists. - REFERENCE_LIST_VIEW_BASIC = 1 - - # Include all details about the ReferenceList: metadata, content lines, - # associated rule counts. This is the default view for GetReferenceList. - REFERENCE_LIST_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb deleted file mode 100644 index 0b2584f226f8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb +++ /dev/null @@ -1,701 +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 Chronicle - module V1 - # The Rule resource represents a user-created rule. - # NEXT TAG: 21 - # @!attribute [rw] name - # @return [::String] - # Identifier. Full resource name for the rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [r] revision_id - # @return [::String] - # Output only. The revision ID of the rule. - # A new revision is created whenever the rule text is changed in any way. - # Format: `v_{10 digits}_{9 digits}` - # Populated in REVISION_METADATA_ONLY view and FULL view. - # @!attribute [r] display_name - # @return [::String] - # Output only. Display name of the rule. - # Populated in BASIC view and FULL view. - # @!attribute [rw] text - # @return [::String] - # The YARA-L content of the rule. - # Populated in FULL view. - # @!attribute [r] author - # @return [::String] - # Output only. The author of the rule. Extracted from the meta section of - # text. Populated in BASIC view and FULL view. - # @!attribute [r] severity - # @return [::Google::Cloud::Chronicle::V1::Severity] - # Output only. The severity of the rule as specified in the meta section of - # text. Populated in BASIC view and FULL view. - # @!attribute [r] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. Additional metadata specified in the meta section of text. - # Populated in FULL view. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of when the rule was created. - # Populated in FULL view. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of when the rule revision was created. - # Populated in FULL, REVISION_METADATA_ONLY views. - # @!attribute [r] compilation_state - # @return [::Google::Cloud::Chronicle::V1::Rule::CompilationState] - # Output only. The current compilation state of the rule. - # Populated in FULL view. - # @!attribute [r] type - # @return [::Google::Cloud::Chronicle::V1::RuleType] - # Output only. User-facing type of the rule. Extracted from the events - # section of rule text. Populated in BASIC view and FULL view. - # @!attribute [r] reference_lists - # @return [::Array<::String>] - # Output only. Resource names of the reference lists used in this rule. - # Populated in FULL view. - # @!attribute [r] allowed_run_frequencies - # @return [::Array<::Google::Cloud::Chronicle::V1::RunFrequency>] - # Output only. The run frequencies that are allowed for the rule. - # Populated in BASIC view and FULL view. - # @!attribute [rw] etag - # @return [::String] - # The etag for this rule. - # If this is provided on update, the request will succeed if and only if it - # matches the server-computed value, and will fail with an ABORTED error - # otherwise. - # Populated in BASIC view and FULL view. - # @!attribute [rw] scope - # @return [::String] - # Resource name of the DataAccessScope bound to this rule. - # Populated in BASIC view and FULL view. - # If reference lists are used in the rule, validations will be performed - # against this scope to ensure that the reference lists are compatible with - # both the user's and the rule's scopes. - # The scope should be in the format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. - # @!attribute [r] compilation_diagnostics - # @return [::Array<::Google::Cloud::Chronicle::V1::CompilationDiagnostic>] - # Output only. A list of a rule's corresponding compilation diagnostic - # messages such as compilation errors and compilation warnings. Populated in - # FULL view. - # @!attribute [r] near_real_time_live_rule_eligible - # @return [::Boolean] - # Output only. Indicate the rule can run in near real time live rule. - # If this is true, the rule uses the near real time live rule when the run - # frequency is set to LIVE. - # @!attribute [r] inputs_used - # @return [::Google::Cloud::Chronicle::V1::InputsUsed] - # Output only. The set of inputs used in the rule. For example, if the rule - # uses $e.principal.hostname, then the uses_udm field will be true. - class Rule - 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 - - # The current compilation state of the rule. - module CompilationState - # The compilation state is unspecified/unknown. - COMPILATION_STATE_UNSPECIFIED = 0 - - # The Rule can successfully compile. - SUCCEEDED = 1 - - # The Rule cannot successfully compile. - # This is possible if a backwards-incompatible change was made to the - # compiler. - FAILED = 2 - end - end - - # The RuleDeployment resource represents the deployment state of a Rule. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the rule deployment. - # Note that RuleDeployment is a child of the overall Rule, not any individual - # revision, so the resource ID segment for the Rule resource must not - # reference a specific revision. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @!attribute [rw] enabled - # @return [::Boolean] - # Whether the rule is currently deployed continuously against incoming data. - # @!attribute [rw] alerting - # @return [::Boolean] - # Whether detections resulting from this deployment should be considered - # alerts. - # @!attribute [rw] archived - # @return [::Boolean] - # The archive state of the rule deployment. - # Cannot be set to true unless enabled is set to false. - # If set to true, alerting will automatically be set to false. - # If currently set to true, enabled, alerting, and run_frequency cannot be - # updated. - # @!attribute [r] archive_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the rule deployment archive state was last - # set to true. If the rule deployment's current archive state is not set to - # true, the field will be empty. - # @!attribute [rw] run_frequency - # @return [::Google::Cloud::Chronicle::V1::RunFrequency] - # The run frequency of the rule deployment. - # @!attribute [r] execution_state - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment::ExecutionState] - # Output only. The execution state of the rule deployment. - # @!attribute [r] producer_rules - # @return [::Array<::String>] - # Output only. The names of the associated/chained producer rules. Rules are - # considered producers for this rule if this rule explicitly filters on their - # ruleid. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [r] consumer_rules - # @return [::Array<::String>] - # Output only. The names of the associated/chained consumer rules. Rules are - # considered consumers of this rule if their rule text explicitly filters on - # this rule's ruleid. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [r] last_alert_status_change_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the rule deployment alert state was lastly - # changed. This is filled regardless of the current alert state. E.g. if the - # current alert status is false, this timestamp will be the timestamp when - # the alert status was changed to false. - class RuleDeployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible execution states the rule deployment can be in. - module ExecutionState - # Unspecified or unknown execution state. - EXECUTION_STATE_UNSPECIFIED = 0 - - # Default execution state. - DEFAULT = 1 - - # Rules in limited state may not have their executions guaranteed. - LIMITED = 2 - - # Paused rules are not executed at all. - PAUSED = 3 - end - end - - # Retrohunt is an execution of a Rule over a time range in the past. - # @!attribute [rw] name - # @return [::String] - # The resource name of the retrohunt. - # Retrohunt is the child of a rule revision. \\{rule} in the format below is - # structured as \\{rule_id@revision_id}. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # @!attribute [rw] process_interval - # @return [::Google::Type::Interval] - # Required. The start and end time of the event time range this retrohunt - # processes. - # @!attribute [r] execution_interval - # @return [::Google::Type::Interval] - # Output only. The start and end time of the retrohunt execution. If the - # retrohunt is not yet finished, the end time of the interval will not be - # populated. - # @!attribute [r] state - # @return [::Google::Cloud::Chronicle::V1::Retrohunt::State] - # Output only. The state of the retrohunt. - # @!attribute [r] progress_percentage - # @return [::Float] - # Output only. Percent progress of the retrohunt towards completion, from - # 0.00 to 100.00. - class Retrohunt - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible states a retrohunt can be in. - module State - # Unspecified or unknown retrohunt state. - STATE_UNSPECIFIED = 0 - - # Running state. - RUNNING = 1 - - # Done state. - DONE = 2 - - # Cancelled state. - CANCELLED = 3 - - # Failed state. - FAILED = 4 - end - end - - # Request message for CreateRule method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this rule will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] rule - # @return [::Google::Cloud::Chronicle::V1::Rule] - # Required. The rule to create. - class CreateRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRule method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the Rule being - # returned. If unspecified, defaults to FULL. - class GetRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRules method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of rules. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of rules to return. The service may return fewer than - # this value. If unspecified, at most 100 rules will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRules` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRules` - # must match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::RuleView] - # view indicates the scope of fields to populate for the Rule being returned. - # If unspecified, defaults to BASIC. - # @!attribute [rw] filter - # @return [::String] - # Only the following filters are allowed: - # "reference_lists:\\{reference_list_name}" - # "data_tables:\\{data_table_name}" - # "display_name:\\{display_name}" - class ListRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRules method. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] - # The rules from the specified instance. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateRule method. - # @!attribute [rw] rule - # @return [::Google::Cloud::Chronicle::V1::Rule] - # Required. The rule to update. - # - # The rule's `name` field is used to identify the rule to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. - class UpdateRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteRule method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to delete. A rule revision timestamp cannot - # be specified as part of the name, as deleting specific revisions is not - # supported. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any retrohunts and any detections associated with - # the rule will also be deleted. If set to false, the call will only succeed - # if the rule has no associated retrohunts, including completed retrohunts, - # and no associated detections. Regardless of this field's value, the rule - # deployment associated with this rule will also be deleted. - class DeleteRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRuleRevisions method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to list revisions for. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of revisions to return per page. The service may return - # fewer than this value. If unspecified, at most 100 revisions will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # The page token, received from a previous `ListRuleRevisions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleRevisions` - # must match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the revision - # being returned. If unspecified, defaults to BASIC. - class ListRuleRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRuleRevisions method. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] - # The revisions of the rule. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRuleRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateRetrohunt method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of retrohunt, which is a rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] retrohunt - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # Required. The retrohunt to create. - class CreateRetrohuntRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRetrohunt method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the retrohunt to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - class GetRetrohuntRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRetrohunts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The rule that the retrohunts belong to. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of retrohunt to return. The service may return fewer - # than this value. If unspecified, at most 100 retrohunts will be returned. - # The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRetrohunts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRetrohunts` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # state - class ListRetrohuntsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRetrohunts method. - # @!attribute [rw] retrohunts - # @return [::Array<::Google::Cloud::Chronicle::V1::Retrohunt>] - # The retrohunts from the specified rule. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRetrohuntsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRuleDeployment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule deployment to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - class GetRuleDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRuleDeployments. - # @!attribute [rw] parent - # @return [::String] - # Required. The collection of all parents which own all rule deployments. The - # "-" wildcard token must be used as the rule identifier in the resource - # path. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/-` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of rule deployments to return. The service may return - # fewer than this value. If unspecified, at most 100 rule deployments will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRuleDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleDeployments` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # archived, name - class ListRuleDeploymentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRuleDeployments. - # @!attribute [rw] rule_deployments - # @return [::Array<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # The rule deployments from all rules. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRuleDeploymentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateRuleDeployment. - # @!attribute [rw] rule_deployment - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # Required. The rule deployment to update. - # - # The rule deployment's `name` field is used to identify the rule deployment - # to update. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - class UpdateRuleDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CompilationPosition represents the location of a compilation diagnostic in - # rule text. - # @!attribute [r] start_line - # @return [::Integer] - # Output only. Start line number, beginning at 1. - # @!attribute [r] start_column - # @return [::Integer] - # Output only. Start column number, beginning at 1. - # @!attribute [r] end_line - # @return [::Integer] - # Output only. End line number, beginning at 1. - # @!attribute [r] end_column - # @return [::Integer] - # Output only. End column number, beginning at 1. - class CompilationPosition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CompilationDiagnostic represents a compilation diagnostic generated - # during a rule's compilation, such as a compilation error or a compilation - # warning. - # @!attribute [r] message - # @return [::String] - # Output only. The diagnostic message. - # @!attribute [r] position - # @return [::Google::Cloud::Chronicle::V1::CompilationPosition] - # Output only. The approximate position in the rule text associated with the - # compilation diagnostic. - # Compilation Position may be empty. - # @!attribute [r] severity - # @return [::Google::Cloud::Chronicle::V1::CompilationDiagnostic::Severity] - # Output only. The severity of a rule's compilation diagnostic. - # @!attribute [r] uri - # @return [::String] - # Output only. Link to documentation that describes a diagnostic in more - # detail. - class CompilationDiagnostic - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity level of the compilation diagnostic. - module Severity - # An unspecified severity level. - SEVERITY_UNSPECIFIED = 0 - - # A compilation warning. - WARNING = 1 - - # A compilation error. - ERROR = 2 - end - end - - # Severity represents the severity level of the rule. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the severity level. Extracted from the meta section of - # the rule text. - class Severity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation Metadata for Retrohunts. - # @!attribute [rw] retrohunt - # @return [::String] - # The name of the retrohunt. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # @!attribute [rw] execution_interval - # @return [::Google::Type::Interval] - # The start and end time of the retrohunt execution. If the retrohunt is not - # yet finished, the end time of the interval will not be filled. - # @!attribute [rw] progress_percentage - # @return [::Float] - # Percent progress of the retrohunt towards completion, from 0.00 to 100.00. - class RetrohuntMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # InputsUsed is a convenience field that tells us which sources - # of events (if any) were used in the rule. - # NEXT TAG: 4 - # @!attribute [rw] uses_udm - # @return [::Boolean] - # Optional. Whether the rule queries UDM events. - # @!attribute [rw] uses_entity - # @return [::Boolean] - # Optional. Whether the rule queries entity events. - # @!attribute [rw] uses_detection - # @return [::Boolean] - # Optional. Whether the rule queries detections. - class InputsUsed - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RunFrequency indicates the run frequency at which a YARA-L 2 rule will run if - # enabled. - module RunFrequency - # The run frequency is unspecified/unknown. - RUN_FREQUENCY_UNSPECIFIED = 0 - - # Executes in real time. - LIVE = 1 - - # Executes once per hour. - HOURLY = 2 - - # Executes once per day. - DAILY = 3 - end - - # RuleType indicates the YARA-L rule type of user-created and Google Cloud - # Threat Intelligence (GCTI) authored rules. - module RuleType - # The rule type is unspecified/unknown. - RULE_TYPE_UNSPECIFIED = 0 - - # Rule checks for the existence of a single event. - SINGLE_EVENT = 1 - - # Rule checks for correlation between multiple events - MULTI_EVENT = 2 - end - - # RuleView indicates the scope of fields to populate when returning the Rule - # resource. - module RuleView - # The default/unset value. - # The API will default to the BASIC view for ListRules/ListRuleRevisions. - # The API will default to the FULL view for GetRule. - RULE_VIEW_UNSPECIFIED = 0 - - # Include basic metadata about the rule, but not the full contents. - # Returned fields include: revision_id, revision_create_time, display_name, - # author, severity, type, allowed_run_frequency, - # near_real_time_live_rule_eligible, etag, and scope. - # This is the default value for ListRules and ListRuleRevisions. - BASIC = 1 - - # Include all fields. - # This is the default value for GetRule. - FULL = 2 - - # Include basic metadata about the rule's revision only. - # Returned fields include: revision_id and revision_create_time. - REVISION_METADATA_ONLY = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.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! - - -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 from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.rb deleted file mode 100644 index a52275cebf89..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/date.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! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values. - # * A month and day, with a zero year (for example, an anniversary). - # * A year on its own, with a zero month and a zero day. - # * A year and month, with a zero day (for example, a credit card expiration - # date). - # - # Related types: - # - # * [google.type.TimeOfDay][google.type.TimeOfDay] - # * [google.type.DateTime][google.type.DateTime] - # * {::Google::Protobuf::Timestamp google.protobuf.Timestamp} - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb +++ /dev/null @@ -1,45 +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 Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile deleted file mode 100644 index 8856abb69960..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/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-chronicle-v1", path: "../" -else - gem "google-cloud-chronicle-v1" -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/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.rb deleted file mode 100644 index b946884ee81c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/batch_get_dashboard_charts.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 chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the batch_get_dashboard_charts call in the DashboardChartService 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::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts. -# -def batch_get_dashboard_charts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new - - # Call the batch_get_dashboard_charts method. - result = client.batch_get_dashboard_charts request - - # The returned object is of type Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse. - p result -end -# [END chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.rb deleted file mode 100644 index f2cf1b752bfe..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_chart_service/get_dashboard_chart.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 chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_dashboard_chart call in the DashboardChartService 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::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart. -# -def get_dashboard_chart - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DashboardChartService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new - - # Call the get_dashboard_chart method. - result = client.get_dashboard_chart request - - # The returned object is of type Google::Cloud::Chronicle::V1::DashboardChart. - p result -end -# [END chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.rb deleted file mode 100644 index c13ee1ca8e7d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/execute_dashboard_query.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 chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the execute_dashboard_query call in the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query. -# -def execute_dashboard_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new - - # Call the execute_dashboard_query method. - result = client.execute_dashboard_query request - - # The returned object is of type Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse. - p result -end -# [END chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.rb deleted file mode 100644 index 67a0b2143915..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/dashboard_query_service/get_dashboard_query.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 chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_dashboard_query call in the DashboardQueryService 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::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query. -# -def get_dashboard_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new - - # Call the get_dashboard_query method. - result = client.get_dashboard_query request - - # The returned object is of type Google::Cloud::Chronicle::V1::DashboardQuery. - p result -end -# [END chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb deleted file mode 100644 index 3bfe7e104b89..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_label. -# -def create_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new - - # Call the create_data_access_label method. - result = client.create_data_access_label request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb deleted file mode 100644 index 870849c6db47..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope. -# -def create_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new - - # Call the create_data_access_scope method. - result = client.create_data_access_scope request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb deleted file mode 100644 index e12c3440d608..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label. -# -def delete_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new - - # Call the delete_data_access_label method. - result = client.delete_data_access_label request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb deleted file mode 100644 index 0341030faa5c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope. -# -def delete_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new - - # Call the delete_data_access_scope method. - result = client.delete_data_access_scope request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb deleted file mode 100644 index 988f66268da5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.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 chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_label. -# -def get_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new - - # Call the get_data_access_label method. - result = client.get_data_access_label request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb deleted file mode 100644 index d9de6dbf8b84..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope. -# -def get_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new - - # Call the get_data_access_scope method. - result = client.get_data_access_scope request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb deleted file mode 100644 index e62e53adb905..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.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 chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_data_access_labels call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels. -# -def list_data_access_labels - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new - - # Call the list_data_access_labels method. - result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. - p item - end -end -# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb deleted file mode 100644 index 4b11c99375f7..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.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 chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_data_access_scopes call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes. -# -def list_data_access_scopes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new - - # Call the list_data_access_scopes method. - result = client.list_data_access_scopes 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::Chronicle::V1::DataAccessScope. - p item - end -end -# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb deleted file mode 100644 index 2974c40a7a70..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_label. -# -def update_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new - - # Call the update_data_access_label method. - result = client.update_data_access_label request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb deleted file mode 100644 index 81a0e349a4fa..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope. -# -def update_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new - - # Call the update_data_access_scope method. - result = client.update_data_access_scope request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.rb deleted file mode 100644 index 0f928a0c692e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_create_data_table_rows.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 chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the bulk_create_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows. -# -def bulk_create_data_table_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new - - # Call the bulk_create_data_table_rows method. - result = client.bulk_create_data_table_rows request - - # The returned object is of type Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse. - p result -end -# [END chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.rb deleted file mode 100644 index b830992e26f0..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_get_data_table_rows.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 chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the bulk_get_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows. -# -def bulk_get_data_table_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new - - # Call the bulk_get_data_table_rows method. - result = client.bulk_get_data_table_rows request - - # The returned object is of type Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse. - p result -end -# [END chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.rb deleted file mode 100644 index bf1a60ed662a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_replace_data_table_rows.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 chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the bulk_replace_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows. -# -def bulk_replace_data_table_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new - - # Call the bulk_replace_data_table_rows method. - result = client.bulk_replace_data_table_rows request - - # The returned object is of type Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse. - p result -end -# [END chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.rb deleted file mode 100644 index 8e3e06124128..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/bulk_update_data_table_rows.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 chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the bulk_update_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows. -# -def bulk_update_data_table_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new - - # Call the bulk_update_data_table_rows method. - result = client.bulk_update_data_table_rows request - - # The returned object is of type Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse. - p result -end -# [END chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.rb deleted file mode 100644 index 20855dc93460..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table.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 chronicle_v1_generated_DataTableService_CreateDataTable_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#create_data_table. -# -def create_data_table - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateDataTableRequest.new - - # Call the create_data_table method. - result = client.create_data_table request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - p result -end -# [END chronicle_v1_generated_DataTableService_CreateDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.rb deleted file mode 100644 index e73cfbdf0f57..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/create_data_table_row.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 chronicle_v1_generated_DataTableService_CreateDataTableRow_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#create_data_table_row. -# -def create_data_table_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new - - # Call the create_data_table_row method. - result = client.create_data_table_row request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - p result -end -# [END chronicle_v1_generated_DataTableService_CreateDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.rb deleted file mode 100644 index b53e925c209a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table.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 chronicle_v1_generated_DataTableService_DeleteDataTable_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#delete_data_table. -# -def delete_data_table - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new - - # Call the delete_data_table method. - result = client.delete_data_table request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_DataTableService_DeleteDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.rb deleted file mode 100644 index 3a0d3d7177b5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/delete_data_table_row.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 chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#delete_data_table_row. -# -def delete_data_table_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new - - # Call the delete_data_table_row method. - result = client.delete_data_table_row request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.rb deleted file mode 100644 index cdfb160a5412..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table.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 chronicle_v1_generated_DataTableService_GetDataTable_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table. -# -def get_data_table - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataTableRequest.new - - # Call the get_data_table method. - result = client.get_data_table request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - p result -end -# [END chronicle_v1_generated_DataTableService_GetDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.rb deleted file mode 100644 index f94f46436ce6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_operation_errors.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 chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_table_operation_errors call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors. -# -def get_data_table_operation_errors - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new - - # Call the get_data_table_operation_errors method. - result = client.get_data_table_operation_errors request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTableOperationErrors. - p result -end -# [END chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.rb deleted file mode 100644 index 3b0cd44aedd2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/get_data_table_row.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 chronicle_v1_generated_DataTableService_GetDataTableRow_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#get_data_table_row. -# -def get_data_table_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new - - # Call the get_data_table_row method. - result = client.get_data_table_row request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - p result -end -# [END chronicle_v1_generated_DataTableService_GetDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.rb deleted file mode 100644 index 9da3fb51c80a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_table_rows.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 chronicle_v1_generated_DataTableService_ListDataTableRows_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_data_table_rows call in the DataTableService 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::Chronicle::V1::DataTableService::Client#list_data_table_rows. -# -def list_data_table_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new - - # Call the list_data_table_rows method. - result = client.list_data_table_rows 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::Chronicle::V1::DataTableRow. - p item - end -end -# [END chronicle_v1_generated_DataTableService_ListDataTableRows_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.rb deleted file mode 100644 index b3aab95d25d0..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/list_data_tables.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 chronicle_v1_generated_DataTableService_ListDataTables_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_data_tables call in the DataTableService 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::Chronicle::V1::DataTableService::Client#list_data_tables. -# -def list_data_tables - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListDataTablesRequest.new - - # Call the list_data_tables method. - result = client.list_data_tables 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::Chronicle::V1::DataTable. - p item - end -end -# [END chronicle_v1_generated_DataTableService_ListDataTables_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.rb deleted file mode 100644 index aa62027b9721..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table.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 chronicle_v1_generated_DataTableService_UpdateDataTable_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_data_table call in the DataTableService 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::Chronicle::V1::DataTableService::Client#update_data_table. -# -def update_data_table - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new - - # Call the update_data_table method. - result = client.update_data_table request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTable. - p result -end -# [END chronicle_v1_generated_DataTableService_UpdateDataTable_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.rb deleted file mode 100644 index d04975357772..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_table_service/update_data_table_row.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 chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_data_table_row call in the DataTableService 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::Chronicle::V1::DataTableService::Client#update_data_table_row. -# -def update_data_table_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataTableService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new - - # Call the update_data_table_row method. - result = client.update_data_table_row request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataTableRow. - p result -end -# [END chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb deleted file mode 100644 index 76ac024b263d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.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 chronicle_v1_generated_EntityService_CreateWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#create_watchlist. -# -def create_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new - - # Call the create_watchlist method. - result = client.create_watchlist request - - # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - p result -end -# [END chronicle_v1_generated_EntityService_CreateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb deleted file mode 100644 index dce65e1ea1f1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.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 chronicle_v1_generated_EntityService_DeleteWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#delete_watchlist. -# -def delete_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new - - # Call the delete_watchlist method. - result = client.delete_watchlist request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_EntityService_DeleteWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb deleted file mode 100644 index 429a7abe7363..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.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 chronicle_v1_generated_EntityService_GetWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#get_watchlist. -# -def get_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new - - # Call the get_watchlist method. - result = client.get_watchlist request - - # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - p result -end -# [END chronicle_v1_generated_EntityService_GetWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb deleted file mode 100644 index 07fb0f279542..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.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 chronicle_v1_generated_EntityService_ListWatchlists_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_watchlists call in the EntityService 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::Chronicle::V1::EntityService::Client#list_watchlists. -# -def list_watchlists - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new - - # Call the list_watchlists method. - result = client.list_watchlists 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::Chronicle::V1::Watchlist. - p item - end -end -# [END chronicle_v1_generated_EntityService_ListWatchlists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb deleted file mode 100644 index fe92dd9d1924..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.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 chronicle_v1_generated_EntityService_UpdateWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#update_watchlist. -# -def update_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new - - # Call the update_watchlist method. - result = client.update_watchlist request - - # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - p result -end -# [END chronicle_v1_generated_EntityService_UpdateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb deleted file mode 100644 index 6b0caad0a1c5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/get_featured_content_native_dashboard.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 chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard. -# -def get_featured_content_native_dashboard - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new - - # Call the get_featured_content_native_dashboard method. - result = client.get_featured_content_native_dashboard request - - # The returned object is of type Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard. - p result -end -# [END chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb deleted file mode 100644 index 4af32dbf10f9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/install_featured_content_native_dashboard.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 chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the install_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard. -# -def install_featured_content_native_dashboard - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new - - # Call the install_featured_content_native_dashboard method. - result = client.install_featured_content_native_dashboard request - - # The returned object is of type Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse. - p result -end -# [END chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb deleted file mode 100644 index 85c26982e0a0..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/featured_content_native_dashboard_service/list_featured_content_native_dashboards.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 chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_featured_content_native_dashboards call in the FeaturedContentNativeDashboardService 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::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards. -# -def list_featured_content_native_dashboards - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new - - # Call the list_featured_content_native_dashboards method. - result = client.list_featured_content_native_dashboards 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::Chronicle::V1::FeaturedContentNativeDashboard. - p item - end -end -# [END chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb deleted file mode 100644 index 8fdeb2d7ad47..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.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 chronicle_v1_generated_InstanceService_GetInstance_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_instance call in the InstanceService 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::Chronicle::V1::InstanceService::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::InstanceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::Chronicle::V1::Instance. - p result -end -# [END chronicle_v1_generated_InstanceService_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.rb deleted file mode 100644 index 0e419e2bf8ef..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/add_chart.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 chronicle_v1_generated_NativeDashboardService_AddChart_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the add_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#add_chart. -# -def add_chart - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::AddChartRequest.new - - # Call the add_chart method. - result = client.add_chart request - - # The returned object is of type Google::Cloud::Chronicle::V1::AddChartResponse. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_AddChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.rb deleted file mode 100644 index 9c417af9d3bf..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/create_native_dashboard.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 chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard. -# -def create_native_dashboard - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new - - # Call the create_native_dashboard method. - result = client.create_native_dashboard request - - # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.rb deleted file mode 100644 index 18b1e963382b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/delete_native_dashboard.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 chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard. -# -def delete_native_dashboard - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new - - # Call the delete_native_dashboard method. - result = client.delete_native_dashboard request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.rb deleted file mode 100644 index 0c5d87a4034e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_chart.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 chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the duplicate_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#duplicate_chart. -# -def duplicate_chart - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DuplicateChartRequest.new - - # Call the duplicate_chart method. - result = client.duplicate_chart request - - # The returned object is of type Google::Cloud::Chronicle::V1::DuplicateChartResponse. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.rb deleted file mode 100644 index f93d74d1ef9b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/duplicate_native_dashboard.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 chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the duplicate_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard. -# -def duplicate_native_dashboard - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new - - # Call the duplicate_native_dashboard method. - result = client.duplicate_native_dashboard request - - # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.rb deleted file mode 100644 index e8371b33f150..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/edit_chart.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 chronicle_v1_generated_NativeDashboardService_EditChart_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the edit_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#edit_chart. -# -def edit_chart - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::EditChartRequest.new - - # Call the edit_chart method. - result = client.edit_chart request - - # The returned object is of type Google::Cloud::Chronicle::V1::EditChartResponse. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_EditChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.rb deleted file mode 100644 index 3f6651321533..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/export_native_dashboards.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 chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the export_native_dashboards call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards. -# -def export_native_dashboards - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new - - # Call the export_native_dashboards method. - result = client.export_native_dashboards request - - # The returned object is of type Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.rb deleted file mode 100644 index 21ece4372e52..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/get_native_dashboard.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 chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard. -# -def get_native_dashboard - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new - - # Call the get_native_dashboard method. - result = client.get_native_dashboard request - - # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.rb deleted file mode 100644 index bd4953102a2b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/import_native_dashboards.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 chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the import_native_dashboards call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards. -# -def import_native_dashboards - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new - - # Call the import_native_dashboards method. - result = client.import_native_dashboards request - - # The returned object is of type Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.rb deleted file mode 100644 index 7835cddbae64..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/list_native_dashboards.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 chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_native_dashboards call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards. -# -def list_native_dashboards - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new - - # Call the list_native_dashboards method. - result = client.list_native_dashboards 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::Chronicle::V1::NativeDashboard. - p item - end -end -# [END chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.rb deleted file mode 100644 index 23318b075f45..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/remove_chart.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 chronicle_v1_generated_NativeDashboardService_RemoveChart_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the remove_chart call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#remove_chart. -# -def remove_chart - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::RemoveChartRequest.new - - # Call the remove_chart method. - result = client.remove_chart request - - # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_RemoveChart_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.rb deleted file mode 100644 index 883df5cbae10..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/native_dashboard_service/update_native_dashboard.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 chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_native_dashboard call in the NativeDashboardService 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::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard. -# -def update_native_dashboard - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new - - # Call the update_native_dashboard method. - result = client.update_native_dashboard request - - # The returned object is of type Google::Cloud::Chronicle::V1::NativeDashboard. - p result -end -# [END chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb deleted file mode 100644 index 56680299d2ab..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.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 chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#create_reference_list. -# -def create_reference_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new - - # Call the create_reference_list method. - result = client.create_reference_list request - - # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - p result -end -# [END chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb deleted file mode 100644 index 9fee3cf12ff5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.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 chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#get_reference_list. -# -def get_reference_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new - - # Call the get_reference_list method. - result = client.get_reference_list request - - # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - p result -end -# [END chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb deleted file mode 100644 index 11926590f8d3..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.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 chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_reference_lists call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#list_reference_lists. -# -def list_reference_lists - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new - - # Call the list_reference_lists method. - result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. - p item - end -end -# [END chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb deleted file mode 100644 index a914529bd2b1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.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 chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#update_reference_list. -# -def update_reference_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new - - # Call the update_reference_list method. - result = client.update_reference_list request - - # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - p result -end -# [END chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb deleted file mode 100644 index 0cac677634bb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#create_retrohunt. -# -def create_retrohunt - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new - - # Call the create_retrohunt method. - result = client.create_retrohunt 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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb deleted file mode 100644 index 57e6c2e2a973..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.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 chronicle_v1_generated_RuleService_CreateRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#create_rule. -# -def create_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new - - # Call the create_rule method. - result = client.create_rule request - - # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - p result -end -# [END chronicle_v1_generated_RuleService_CreateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb deleted file mode 100644 index db56a864183a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.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 chronicle_v1_generated_RuleService_DeleteRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#delete_rule. -# -def delete_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new - - # Call the delete_rule method. - result = client.delete_rule request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_RuleService_DeleteRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb deleted file mode 100644 index 481026822412..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.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 chronicle_v1_generated_RuleService_GetRetrohunt_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#get_retrohunt. -# -def get_retrohunt - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new - - # Call the get_retrohunt method. - result = client.get_retrohunt request - - # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. - p result -end -# [END chronicle_v1_generated_RuleService_GetRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb deleted file mode 100644 index eb550559d7a9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.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 chronicle_v1_generated_RuleService_GetRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule. -# -def get_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetRuleRequest.new - - # Call the get_rule method. - result = client.get_rule request - - # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - p result -end -# [END chronicle_v1_generated_RuleService_GetRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb deleted file mode 100644 index c4d8a125f230..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.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 chronicle_v1_generated_RuleService_GetRuleDeployment_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule_deployment. -# -def get_rule_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new - - # Call the get_rule_deployment method. - result = client.get_rule_deployment request - - # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - p result -end -# [END chronicle_v1_generated_RuleService_GetRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb deleted file mode 100644 index fd21d3d155c8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.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 chronicle_v1_generated_RuleService_ListRetrohunts_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_retrohunts call in the RuleService 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::Chronicle::V1::RuleService::Client#list_retrohunts. -# -def list_retrohunts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new - - # Call the list_retrohunts method. - result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRetrohunts_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb deleted file mode 100644 index 061793135cde..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.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 chronicle_v1_generated_RuleService_ListRuleDeployments_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_rule_deployments call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_deployments. -# -def list_rule_deployments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new - - # Call the list_rule_deployments method. - result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRuleDeployments_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb deleted file mode 100644 index ee56939b8586..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.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 chronicle_v1_generated_RuleService_ListRuleRevisions_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_rule_revisions call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_revisions. -# -def list_rule_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new - - # Call the list_rule_revisions method. - result = client.list_rule_revisions 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::Chronicle::V1::Rule. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRuleRevisions_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb deleted file mode 100644 index 607a52db7bbb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.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 chronicle_v1_generated_RuleService_ListRules_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_rules call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rules. -# -def list_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRulesRequest.new - - # Call the list_rules method. - result = client.list_rules 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::Chronicle::V1::Rule. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb deleted file mode 100644 index 612a59e32e81..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.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 chronicle_v1_generated_RuleService_UpdateRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule. -# -def update_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new - - # Call the update_rule method. - result = client.update_rule request - - # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - p result -end -# [END chronicle_v1_generated_RuleService_UpdateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb deleted file mode 100644 index c8c3638a445e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.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 chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule_deployment. -# -def update_rule_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new - - # Call the update_rule_deployment method. - result = client.update_rule_deployment request - - # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - p result -end -# [END chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json b/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json deleted file mode 100644 index 2f7db5b4e6e5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json +++ /dev/null @@ -1,2775 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-chronicle-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.chronicle.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "chronicle_v1_generated_BigQueryExportService_GetBigQueryExport_sync", - "title": "Snippet for the get_big_query_export call in the BigQueryExportService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::BigQueryExportService::Client#get_big_query_export.", - "file": "big_query_export_service/get_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_big_query_export", - "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client#get_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BigQueryExport", - "client": { - "short_name": "BigQueryExportService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client" - }, - "method": { - "short_name": "GetBigQueryExport", - "full_name": "google.cloud.chronicle.v1.BigQueryExportService.GetBigQueryExport", - "service": { - "short_name": "BigQueryExportService", - "full_name": "google.cloud.chronicle.v1.BigQueryExportService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_BigQueryExportService_UpdateBigQueryExport_sync", - "title": "Snippet for the update_big_query_export call in the BigQueryExportService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::BigQueryExportService::Client#update_big_query_export.", - "file": "big_query_export_service/update_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_big_query_export", - "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client#update_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BigQueryExport", - "client": { - "short_name": "BigQueryExportService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client" - }, - "method": { - "short_name": "UpdateBigQueryExport", - "full_name": "google.cloud.chronicle.v1.BigQueryExportService.UpdateBigQueryExport", - "service": { - "short_name": "BigQueryExportService", - "full_name": "google.cloud.chronicle.v1.BigQueryExportService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_BigQueryExportService_ProvisionBigQueryExport_sync", - "title": "Snippet for the provision_big_query_export call in the BigQueryExportService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::BigQueryExportService::Client#provision_big_query_export.", - "file": "big_query_export_service/provision_big_query_export.rb", - "language": "RUBY", - "client_method": { - "short_name": "provision_big_query_export", - "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client#provision_big_query_export", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ProvisionBigQueryExportRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BigQueryExport", - "client": { - "short_name": "BigQueryExportService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::BigQueryExportService::Client" - }, - "method": { - "short_name": "ProvisionBigQueryExport", - "full_name": "google.cloud.chronicle.v1.BigQueryExportService.ProvisionBigQueryExport", - "service": { - "short_name": "BigQueryExportService", - "full_name": "google.cloud.chronicle.v1.BigQueryExportService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DashboardQueryService_GetDashboardQuery_sync", - "title": "Snippet for the get_dashboard_query call in the DashboardQueryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query.", - "file": "dashboard_query_service/get_dashboard_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dashboard_query", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client#get_dashboard_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DashboardQuery", - "client": { - "short_name": "DashboardQueryService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client" - }, - "method": { - "short_name": "GetDashboardQuery", - "full_name": "google.cloud.chronicle.v1.DashboardQueryService.GetDashboardQuery", - "service": { - "short_name": "DashboardQueryService", - "full_name": "google.cloud.chronicle.v1.DashboardQueryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DashboardQueryService_ExecuteDashboardQuery_sync", - "title": "Snippet for the execute_dashboard_query call in the DashboardQueryService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query.", - "file": "dashboard_query_service/execute_dashboard_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "execute_dashboard_query", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client#execute_dashboard_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse", - "client": { - "short_name": "DashboardQueryService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardQueryService::Client" - }, - "method": { - "short_name": "ExecuteDashboardQuery", - "full_name": "google.cloud.chronicle.v1.DashboardQueryService.ExecuteDashboardQuery", - "service": { - "short_name": "DashboardQueryService", - "full_name": "google.cloud.chronicle.v1.DashboardQueryService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DashboardChartService_GetDashboardChart_sync", - "title": "Snippet for the get_dashboard_chart call in the DashboardChartService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart.", - "file": "dashboard_chart_service/get_dashboard_chart.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dashboard_chart", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client#get_dashboard_chart", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDashboardChartRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DashboardChart", - "client": { - "short_name": "DashboardChartService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client" - }, - "method": { - "short_name": "GetDashboardChart", - "full_name": "google.cloud.chronicle.v1.DashboardChartService.GetDashboardChart", - "service": { - "short_name": "DashboardChartService", - "full_name": "google.cloud.chronicle.v1.DashboardChartService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DashboardChartService_BatchGetDashboardCharts_sync", - "title": "Snippet for the batch_get_dashboard_charts call in the DashboardChartService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts.", - "file": "dashboard_chart_service/batch_get_dashboard_charts.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_get_dashboard_charts", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client#batch_get_dashboard_charts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse", - "client": { - "short_name": "DashboardChartService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DashboardChartService::Client" - }, - "method": { - "short_name": "BatchGetDashboardCharts", - "full_name": "google.cloud.chronicle.v1.DashboardChartService.BatchGetDashboardCharts", - "service": { - "short_name": "DashboardChartService", - "full_name": "google.cloud.chronicle.v1.DashboardChartService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync", - "title": "Snippet for the create_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label.", - "file": "data_access_control_service/create_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "CreateDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync", - "title": "Snippet for the get_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label.", - "file": "data_access_control_service/get_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "GetDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync", - "title": "Snippet for the list_data_access_labels call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels.", - "file": "data_access_control_service/list_data_access_labels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_access_labels", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "ListDataAccessLabels", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessLabels", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync", - "title": "Snippet for the update_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label.", - "file": "data_access_control_service/update_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "UpdateDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync", - "title": "Snippet for the delete_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label.", - "file": "data_access_control_service/delete_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "DeleteDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync", - "title": "Snippet for the create_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope.", - "file": "data_access_control_service/create_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "CreateDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync", - "title": "Snippet for the get_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope.", - "file": "data_access_control_service/get_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "GetDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync", - "title": "Snippet for the list_data_access_scopes call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes.", - "file": "data_access_control_service/list_data_access_scopes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_access_scopes", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "ListDataAccessScopes", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessScopes", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync", - "title": "Snippet for the update_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope.", - "file": "data_access_control_service/update_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "UpdateDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync", - "title": "Snippet for the delete_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope.", - "file": "data_access_control_service/delete_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "DeleteDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_CreateDataTable_sync", - "title": "Snippet for the create_data_table call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table.", - "file": "data_table_service/create_data_table.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_table", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateDataTableRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTable", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "CreateDataTable", - "full_name": "google.cloud.chronicle.v1.DataTableService.CreateDataTable", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_ListDataTables_sync", - "title": "Snippet for the list_data_tables call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_tables.", - "file": "data_table_service/list_data_tables.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_tables", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_tables", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListDataTablesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListDataTablesResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "ListDataTables", - "full_name": "google.cloud.chronicle.v1.DataTableService.ListDataTables", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_GetDataTable_sync", - "title": "Snippet for the get_data_table call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table.", - "file": "data_table_service/get_data_table.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_table", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataTableRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTable", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "GetDataTable", - "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTable", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_UpdateDataTable_sync", - "title": "Snippet for the update_data_table call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table.", - "file": "data_table_service/update_data_table.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_table", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateDataTableRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTable", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "UpdateDataTable", - "full_name": "google.cloud.chronicle.v1.DataTableService.UpdateDataTable", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_DeleteDataTable_sync", - "title": "Snippet for the delete_data_table call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table.", - "file": "data_table_service/delete_data_table.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_table", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteDataTableRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "DeleteDataTable", - "full_name": "google.cloud.chronicle.v1.DataTableService.DeleteDataTable", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_CreateDataTableRow_sync", - "title": "Snippet for the create_data_table_row call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table_row.", - "file": "data_table_service/create_data_table_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_table_row", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#create_data_table_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "CreateDataTableRow", - "full_name": "google.cloud.chronicle.v1.DataTableService.CreateDataTableRow", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_UpdateDataTableRow_sync", - "title": "Snippet for the update_data_table_row call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table_row.", - "file": "data_table_service/update_data_table_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_table_row", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#update_data_table_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "UpdateDataTableRow", - "full_name": "google.cloud.chronicle.v1.DataTableService.UpdateDataTableRow", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_ListDataTableRows_sync", - "title": "Snippet for the list_data_table_rows call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_table_rows.", - "file": "data_table_service/list_data_table_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_table_rows", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#list_data_table_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "ListDataTableRows", - "full_name": "google.cloud.chronicle.v1.DataTableService.ListDataTableRows", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_GetDataTableRow_sync", - "title": "Snippet for the get_data_table_row call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_row.", - "file": "data_table_service/get_data_table_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_table_row", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataTableRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTableRow", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "GetDataTableRow", - "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTableRow", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_DeleteDataTableRow_sync", - "title": "Snippet for the delete_data_table_row call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table_row.", - "file": "data_table_service/delete_data_table_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_table_row", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#delete_data_table_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "DeleteDataTableRow", - "full_name": "google.cloud.chronicle.v1.DataTableService.DeleteDataTableRow", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_BulkCreateDataTableRows_sync", - "title": "Snippet for the bulk_create_data_table_rows call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows.", - "file": "data_table_service/bulk_create_data_table_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_create_data_table_rows", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_create_data_table_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "BulkCreateDataTableRows", - "full_name": "google.cloud.chronicle.v1.DataTableService.BulkCreateDataTableRows", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_BulkGetDataTableRows_sync", - "title": "Snippet for the bulk_get_data_table_rows call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows.", - "file": "data_table_service/bulk_get_data_table_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_get_data_table_rows", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_get_data_table_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "BulkGetDataTableRows", - "full_name": "google.cloud.chronicle.v1.DataTableService.BulkGetDataTableRows", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_BulkReplaceDataTableRows_sync", - "title": "Snippet for the bulk_replace_data_table_rows call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows.", - "file": "data_table_service/bulk_replace_data_table_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_replace_data_table_rows", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_replace_data_table_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "BulkReplaceDataTableRows", - "full_name": "google.cloud.chronicle.v1.DataTableService.BulkReplaceDataTableRows", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_BulkUpdateDataTableRows_sync", - "title": "Snippet for the bulk_update_data_table_rows call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows.", - "file": "data_table_service/bulk_update_data_table_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_update_data_table_rows", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#bulk_update_data_table_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "BulkUpdateDataTableRows", - "full_name": "google.cloud.chronicle.v1.DataTableService.BulkUpdateDataTableRows", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataTableService_GetDataTableOperationErrors_sync", - "title": "Snippet for the get_data_table_operation_errors call in the DataTableService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors.", - "file": "data_table_service/get_data_table_operation_errors.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_table_operation_errors", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client#get_data_table_operation_errors", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataTableOperationErrors", - "client": { - "short_name": "DataTableService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataTableService::Client" - }, - "method": { - "short_name": "GetDataTableOperationErrors", - "full_name": "google.cloud.chronicle.v1.DataTableService.GetDataTableOperationErrors", - "service": { - "short_name": "DataTableService", - "full_name": "google.cloud.chronicle.v1.DataTableService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_GetWatchlist_sync", - "title": "Snippet for the get_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist.", - "file": "entity_service/get_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "GetWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.GetWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_ListWatchlists_sync", - "title": "Snippet for the list_watchlists call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists.", - "file": "entity_service/list_watchlists.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_watchlists", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListWatchlistsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListWatchlistsResponse", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "ListWatchlists", - "full_name": "google.cloud.chronicle.v1.EntityService.ListWatchlists", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_CreateWatchlist_sync", - "title": "Snippet for the create_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist.", - "file": "entity_service/create_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "CreateWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.CreateWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_UpdateWatchlist_sync", - "title": "Snippet for the update_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist.", - "file": "entity_service/update_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "UpdateWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.UpdateWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_DeleteWatchlist_sync", - "title": "Snippet for the delete_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist.", - "file": "entity_service/delete_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "DeleteWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.DeleteWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_CreateNativeDashboard_sync", - "title": "Snippet for the create_native_dashboard call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard.", - "file": "native_dashboard_service/create_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#create_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "CreateNativeDashboard", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.CreateNativeDashboard", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_GetNativeDashboard_sync", - "title": "Snippet for the get_native_dashboard call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard.", - "file": "native_dashboard_service/get_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#get_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "GetNativeDashboard", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.GetNativeDashboard", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_ListNativeDashboards_sync", - "title": "Snippet for the list_native_dashboards call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards.", - "file": "native_dashboard_service/list_native_dashboards.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_native_dashboards", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#list_native_dashboards", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "ListNativeDashboards", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ListNativeDashboards", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_UpdateNativeDashboard_sync", - "title": "Snippet for the update_native_dashboard call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard.", - "file": "native_dashboard_service/update_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#update_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "UpdateNativeDashboard", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.UpdateNativeDashboard", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_DuplicateNativeDashboard_sync", - "title": "Snippet for the duplicate_native_dashboard call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard.", - "file": "native_dashboard_service/duplicate_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "duplicate_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "DuplicateNativeDashboard", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DuplicateNativeDashboard", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_DeleteNativeDashboard_sync", - "title": "Snippet for the delete_native_dashboard call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard.", - "file": "native_dashboard_service/delete_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#delete_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "DeleteNativeDashboard", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DeleteNativeDashboard", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_AddChart_sync", - "title": "Snippet for the add_chart call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#add_chart.", - "file": "native_dashboard_service/add_chart.rb", - "language": "RUBY", - "client_method": { - "short_name": "add_chart", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#add_chart", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::AddChartRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::AddChartResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "AddChart", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.AddChart", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_RemoveChart_sync", - "title": "Snippet for the remove_chart call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#remove_chart.", - "file": "native_dashboard_service/remove_chart.rb", - "language": "RUBY", - "client_method": { - "short_name": "remove_chart", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#remove_chart", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::RemoveChartRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::NativeDashboard", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "RemoveChart", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.RemoveChart", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_EditChart_sync", - "title": "Snippet for the edit_chart call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#edit_chart.", - "file": "native_dashboard_service/edit_chart.rb", - "language": "RUBY", - "client_method": { - "short_name": "edit_chart", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#edit_chart", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::EditChartRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::EditChartResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "EditChart", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.EditChart", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_DuplicateChart_sync", - "title": "Snippet for the duplicate_chart call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_chart.", - "file": "native_dashboard_service/duplicate_chart.rb", - "language": "RUBY", - "client_method": { - "short_name": "duplicate_chart", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#duplicate_chart", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DuplicateChartRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DuplicateChartResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "DuplicateChart", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.DuplicateChart", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_ExportNativeDashboards_sync", - "title": "Snippet for the export_native_dashboards call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards.", - "file": "native_dashboard_service/export_native_dashboards.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_native_dashboards", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#export_native_dashboards", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "ExportNativeDashboards", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ExportNativeDashboards", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_NativeDashboardService_ImportNativeDashboards_sync", - "title": "Snippet for the import_native_dashboards call in the NativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards.", - "file": "native_dashboard_service/import_native_dashboards.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_native_dashboards", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client#import_native_dashboards", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse", - "client": { - "short_name": "NativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::NativeDashboardService::Client" - }, - "method": { - "short_name": "ImportNativeDashboards", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService.ImportNativeDashboards", - "service": { - "short_name": "NativeDashboardService", - "full_name": "google.cloud.chronicle.v1.NativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_GetFeaturedContentNativeDashboard_sync", - "title": "Snippet for the get_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard.", - "file": "featured_content_native_dashboard_service/get_featured_content_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_featured_content_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#get_featured_content_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard", - "client": { - "short_name": "FeaturedContentNativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" - }, - "method": { - "short_name": "GetFeaturedContentNativeDashboard", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.GetFeaturedContentNativeDashboard", - "service": { - "short_name": "FeaturedContentNativeDashboardService", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_ListFeaturedContentNativeDashboards_sync", - "title": "Snippet for the list_featured_content_native_dashboards call in the FeaturedContentNativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards.", - "file": "featured_content_native_dashboard_service/list_featured_content_native_dashboards.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_featured_content_native_dashboards", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#list_featured_content_native_dashboards", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse", - "client": { - "short_name": "FeaturedContentNativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" - }, - "method": { - "short_name": "ListFeaturedContentNativeDashboards", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.ListFeaturedContentNativeDashboards", - "service": { - "short_name": "FeaturedContentNativeDashboardService", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_FeaturedContentNativeDashboardService_InstallFeaturedContentNativeDashboard_sync", - "title": "Snippet for the install_featured_content_native_dashboard call in the FeaturedContentNativeDashboardService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard.", - "file": "featured_content_native_dashboard_service/install_featured_content_native_dashboard.rb", - "language": "RUBY", - "client_method": { - "short_name": "install_featured_content_native_dashboard", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client#install_featured_content_native_dashboard", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse", - "client": { - "short_name": "FeaturedContentNativeDashboardService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client" - }, - "method": { - "short_name": "InstallFeaturedContentNativeDashboard", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService.InstallFeaturedContentNativeDashboard", - "service": { - "short_name": "FeaturedContentNativeDashboardService", - "full_name": "google.cloud.chronicle.v1.FeaturedContentNativeDashboardService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_InstanceService_GetInstance_sync", - "title": "Snippet for the get_instance call in the InstanceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance.", - "file": "instance_service/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Instance", - "client": { - "short_name": "InstanceService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.chronicle.v1.InstanceService.GetInstance", - "service": { - "short_name": "InstanceService", - "full_name": "google.cloud.chronicle.v1.InstanceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_GetReferenceList_sync", - "title": "Snippet for the get_reference_list call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list.", - "file": "reference_list_service/get_reference_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_reference_list", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetReferenceListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "GetReferenceList", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.GetReferenceList", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync", - "title": "Snippet for the list_reference_lists call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists.", - "file": "reference_list_service/list_reference_lists.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reference_lists", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListReferenceListsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListReferenceListsResponse", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "ListReferenceLists", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.ListReferenceLists", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync", - "title": "Snippet for the create_reference_list call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list.", - "file": "reference_list_service/create_reference_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_reference_list", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateReferenceListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "CreateReferenceList", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.CreateReferenceList", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync", - "title": "Snippet for the update_reference_list call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list.", - "file": "reference_list_service/update_reference_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_reference_list", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "UpdateReferenceList", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.UpdateReferenceList", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_CreateRule_sync", - "title": "Snippet for the create_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_rule.", - "file": "rule_service/create_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Rule", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "CreateRule", - "full_name": "google.cloud.chronicle.v1.RuleService.CreateRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_GetRule_sync", - "title": "Snippet for the get_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule.", - "file": "rule_service/get_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Rule", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "GetRule", - "full_name": "google.cloud.chronicle.v1.RuleService.GetRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRules_sync", - "title": "Snippet for the list_rules call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rules.", - "file": "rule_service/list_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rules", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRulesResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRules", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRules", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_UpdateRule_sync", - "title": "Snippet for the update_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule.", - "file": "rule_service/update_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Rule", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "UpdateRule", - "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_DeleteRule_sync", - "title": "Snippet for the delete_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule.", - "file": "rule_service/delete_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "DeleteRule", - "full_name": "google.cloud.chronicle.v1.RuleService.DeleteRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRuleRevisions_sync", - "title": "Snippet for the list_rule_revisions call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions.", - "file": "rule_service/list_rule_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rule_revisions", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRuleRevisions", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleRevisions", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_CreateRetrohunt_sync", - "title": "Snippet for the create_retrohunt call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt.", - "file": "rule_service/create_retrohunt.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_retrohunt", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "CreateRetrohunt", - "full_name": "google.cloud.chronicle.v1.RuleService.CreateRetrohunt", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_GetRetrohunt_sync", - "title": "Snippet for the get_retrohunt call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt.", - "file": "rule_service/get_retrohunt.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_retrohunt", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetRetrohuntRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Retrohunt", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "GetRetrohunt", - "full_name": "google.cloud.chronicle.v1.RuleService.GetRetrohunt", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRetrohunts_sync", - "title": "Snippet for the list_retrohunts call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts.", - "file": "rule_service/list_retrohunts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_retrohunts", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRetrohunts", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRetrohunts", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_GetRuleDeployment_sync", - "title": "Snippet for the get_rule_deployment call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment.", - "file": "rule_service/get_rule_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_rule_deployment", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "GetRuleDeployment", - "full_name": "google.cloud.chronicle.v1.RuleService.GetRuleDeployment", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRuleDeployments_sync", - "title": "Snippet for the list_rule_deployments call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments.", - "file": "rule_service/list_rule_deployments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rule_deployments", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRuleDeployments", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleDeployments", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync", - "title": "Snippet for the update_rule_deployment call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment.", - "file": "rule_service/update_rule_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_rule_deployment", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "UpdateRuleDeployment", - "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRuleDeployment", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb deleted file mode 100644 index 19d05a898902..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_paths_test.rb +++ /dev/null @@ -1,67 +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/chronicle/v1/dashboard_chart_service" - -class ::Google::Cloud::Chronicle::V1::DashboardChartService::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_dashboard_chart_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb deleted file mode 100644 index 8efea8f4f55f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_rest_test.rb +++ /dev/null @@ -1,208 +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/chronicle/v1/dashboard_chart_pb" -require "google/cloud/chronicle/v1/dashboard_chart_service/rest" - - -class ::Google::Cloud::Chronicle::V1::DashboardChartService::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_get_dashboard_chart - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DashboardChart.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dashboard_chart_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::Chronicle::V1::DashboardChartService::Rest::ServiceStub.stub :transcode_get_dashboard_chart_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dashboard_chart_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_dashboard_chart({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_dashboard_chart name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_dashboard_chart ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_dashboard_chart({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_dashboard_chart(::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dashboard_chart_client_stub.call_count - end - end - end - - def test_batch_get_dashboard_charts - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - names = ["hello world"] - - batch_get_dashboard_charts_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::Chronicle::V1::DashboardChartService::Rest::ServiceStub.stub :transcode_batch_get_dashboard_charts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_get_dashboard_charts_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_get_dashboard_charts({ parent: parent, names: names }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_get_dashboard_charts parent: parent, names: names do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_get_dashboard_charts ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_get_dashboard_charts({ parent: parent, names: names }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_get_dashboard_charts(::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_get_dashboard_charts_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::Chronicle::V1::DashboardChartService::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::Chronicle::V1::DashboardChartService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb deleted file mode 100644 index f2b3e78e90c6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_chart_service_test.rb +++ /dev/null @@ -1,222 +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/chronicle/v1/dashboard_chart_pb" -require "google/cloud/chronicle/v1/dashboard_chart_service" - -class ::Google::Cloud::Chronicle::V1::DashboardChartService::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_get_dashboard_chart - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DashboardChart.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_dashboard_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dashboard_chart, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dashboard_chart_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_dashboard_chart({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_dashboard_chart name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_dashboard_chart ::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_dashboard_chart({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_dashboard_chart(::Google::Cloud::Chronicle::V1::GetDashboardChartRequest.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_dashboard_chart_client_stub.call_rpc_count - end - end - - def test_batch_get_dashboard_charts - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsResponse.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" - names = ["hello world"] - - batch_get_dashboard_charts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_get_dashboard_charts, name - assert_kind_of ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_get_dashboard_charts_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DashboardChartService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_get_dashboard_charts({ parent: parent, names: names }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_get_dashboard_charts parent: parent, names: names do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_get_dashboard_charts ::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_get_dashboard_charts({ parent: parent, names: names }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_get_dashboard_charts(::Google::Cloud::Chronicle::V1::BatchGetDashboardChartsRequest.new(parent: parent, names: names), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_get_dashboard_charts_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::Chronicle::V1::DashboardChartService::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::Chronicle::V1::DashboardChartService::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::Chronicle::V1::DashboardChartService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::DashboardChartService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.rb deleted file mode 100644 index 5ea1405fc02d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_paths_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/chronicle/v1/dashboard_query_service" - -class ::Google::Cloud::Chronicle::V1::DashboardQueryService::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_dashboard_chart_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path - end - end - - def test_dashboard_query_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dashboard_query_path project: "value0", location: "value1", instance: "value2", query: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dashboardQueries/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb deleted file mode 100644 index f1b467a4b248..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_rest_test.rb +++ /dev/null @@ -1,211 +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/chronicle/v1/dashboard_query_pb" -require "google/cloud/chronicle/v1/dashboard_query_service/rest" - - -class ::Google::Cloud::Chronicle::V1::DashboardQueryService::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_get_dashboard_query - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DashboardQuery.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dashboard_query_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::Chronicle::V1::DashboardQueryService::Rest::ServiceStub.stub :transcode_get_dashboard_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dashboard_query_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_dashboard_query({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_dashboard_query name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_dashboard_query ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_dashboard_query({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_dashboard_query(::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dashboard_query_client_stub.call_count - end - end - end - - def test_execute_dashboard_query - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = {} - filters = [{}] - clear_cache = true - use_previous_time_range = true - - execute_dashboard_query_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::Chronicle::V1::DashboardQueryService::Rest::ServiceStub.stub :transcode_execute_dashboard_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, execute_dashboard_query_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.execute_dashboard_query parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.execute_dashboard_query ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.execute_dashboard_query(::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, execute_dashboard_query_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::Chronicle::V1::DashboardQueryService::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::Chronicle::V1::DashboardQueryService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb deleted file mode 100644 index 17503831b5bc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/dashboard_query_service_test.rb +++ /dev/null @@ -1,228 +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/chronicle/v1/dashboard_query_pb" -require "google/cloud/chronicle/v1/dashboard_query_service" - -class ::Google::Cloud::Chronicle::V1::DashboardQueryService::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_get_dashboard_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DashboardQuery.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_dashboard_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dashboard_query, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dashboard_query_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_dashboard_query({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_dashboard_query name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_dashboard_query ::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_dashboard_query({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_dashboard_query(::Google::Cloud::Chronicle::V1::GetDashboardQueryRequest.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_dashboard_query_client_stub.call_rpc_count - end - end - - def test_execute_dashboard_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryResponse.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" - query = {} - filters = [{}] - clear_cache = true - use_previous_time_range = true - - execute_dashboard_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :execute_dashboard_query, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardQuery), request["query"] - assert_kind_of ::Google::Cloud::Chronicle::V1::DashboardFilter, request["filters"].first - assert_equal true, request["clear_cache"] - assert_equal true, request["use_previous_time_range"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, execute_dashboard_query_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.execute_dashboard_query parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.execute_dashboard_query ::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.execute_dashboard_query({ parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.execute_dashboard_query(::Google::Cloud::Chronicle::V1::ExecuteDashboardQueryRequest.new(parent: parent, query: query, filters: filters, clear_cache: clear_cache, use_previous_time_range: use_previous_time_range), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, execute_dashboard_query_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::Chronicle::V1::DashboardQueryService::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::Chronicle::V1::DashboardQueryService::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::Chronicle::V1::DashboardQueryService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::DashboardQueryService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb deleted file mode 100644 index 8ef29809b076..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.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! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/chronicle/v1/data_access_control_service" - -class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_label_path project: "value0", location: "value1", instance: "value2", data_access_label: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessLabels/value3", path - end - end - - def test_data_access_scope_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb deleted file mode 100644 index a20b2c953e40..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb +++ /dev/null @@ -1,651 +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/chronicle/v1/data_access_control_pb" -require "google/cloud/chronicle/v1/data_access_control_service/rest" - - -class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_access_label = {} - data_access_label_id = "hello world" - - create_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_access_label_client_stub.call_count - end - end - end - - def test_get_data_access_label - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_access_label({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_access_label name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_access_label({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_access_label_client_stub.call_count - end - end - end - - def test_list_data_access_labels - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_access_labels_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_labels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_access_labels_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_access_labels parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_access_labels_client_stub.call_count - end - end - end - - def test_update_data_access_label - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_access_label = {} - update_mask = {} - - update_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_access_label_client_stub.call_count - end - end - end - - def test_delete_data_access_label - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_access_label({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_access_label name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_access_label({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_access_label_client_stub.call_count - end - end - end - - def test_create_data_access_scope - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_access_scope = {} - data_access_scope_id = "hello world" - - create_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_access_scope_client_stub.call_count - end - end - end - - def test_get_data_access_scope - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_access_scope({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_access_scope name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_access_scope({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_access_scope_client_stub.call_count - end - end - end - - def test_list_data_access_scopes - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_access_scopes_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_scopes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_access_scopes_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_access_scopes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_access_scopes_client_stub.call_count - end - end - end - - def test_update_data_access_scope - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_access_scope = {} - update_mask = {} - - update_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_access_scope_client_stub.call_count - end - end - end - - def test_delete_data_access_scope - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_access_scope_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_access_scope({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_access_scope name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_access_scope({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb deleted file mode 100644 index 32e8f27fe8cf..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb +++ /dev/null @@ -1,718 +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/chronicle/v1/data_access_control_pb" -require "google/cloud/chronicle/v1/data_access_control_service" - -class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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" - data_access_label = {} - data_access_label_id = "hello world" - - create_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] - assert_equal "hello world", request["data_access_label_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_access_label_client_stub.call_rpc_count - end - end - - def test_get_data_access_label - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_access_label({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_access_label name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_access_label({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count - end - end - - def test_list_data_access_labels - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_access_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_access_labels, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_access_labels_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_access_labels parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_data_access_labels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_data_access_labels_client_stub.call_rpc_count - end - end - - def test_update_data_access_label - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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. - data_access_label = {} - update_mask = {} - - update_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_access_label({ data_access_label: data_access_label, 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 - client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, 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_data_access_label_client_stub.call_rpc_count - end - end - - def test_delete_data_access_label - # 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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_access_label({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_access_label name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_access_label({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count - end - end - - def test_create_data_access_scope - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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" - data_access_scope = {} - data_access_scope_id = "hello world" - - create_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] - assert_equal "hello world", request["data_access_scope_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_access_scope_client_stub.call_rpc_count - end - end - - def test_get_data_access_scope - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_access_scope({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_access_scope name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_access_scope({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.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_data_access_scope_client_stub.call_rpc_count - end - end - - def test_list_data_access_scopes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_data_access_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_access_scopes, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_access_scopes_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_access_scopes parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_data_access_scopes({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_data_access_scopes_client_stub.call_rpc_count - end - end - - def test_update_data_access_scope - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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. - data_access_scope = {} - update_mask = {} - - update_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_access_scope({ data_access_scope: data_access_scope, 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 - client.update_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, 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_data_access_scope_client_stub.call_rpc_count - end - end - - def test_delete_data_access_scope - # 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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_access_scope({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_access_scope name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_access_scope({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.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_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb deleted file mode 100644 index ea65a25ca487..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_paths_test.rb +++ /dev/null @@ -1,103 +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/chronicle/v1/data_table_service" - -class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_access_scope_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path - end - end - - def test_data_table_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_table_path project: "value0", location: "value1", instance: "value2", data_table: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataTables/value3", path - end - end - - def test_data_table_operation_errors_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_table_operation_errors_path project: "value0", location: "value1", instance: "value2", data_table_operation_errors: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataTableOperationErrors/value3", path - end - end - - def test_data_table_row_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_table_row_path project: "value0", location: "value1", instance: "value2", data_table: "value3", data_table_row: "value4" - assert_equal "projects/value0/locations/value1/instances/value2/dataTables/value3/dataTableRows/value4", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb deleted file mode 100644 index 7509d98ad2cb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_rest_test.rb +++ /dev/null @@ -1,926 +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/chronicle/v1/data_table_pb" -require "google/cloud/chronicle/v1/data_table_service/rest" - - -class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_table - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTable.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_table = {} - data_table_id = "hello world" - - create_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_create_data_table_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_table parent: parent, data_table: data_table, data_table_id: data_table_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_table ::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_table(::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_table_client_stub.call_count - end - end - end - - def test_list_data_tables - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - - list_data_tables_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_list_data_tables_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_tables_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_tables parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_tables ::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_tables(::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_tables_client_stub.call_count - end - end - end - - def test_get_data_table - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTable.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_table({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_table name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_table ::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_table({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_table(::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_table_client_stub.call_count - end - end - end - - def test_update_data_table - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTable.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_table = {} - update_mask = {} - - update_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_update_data_table_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_table({ data_table: data_table, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_table data_table: data_table, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_table ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_table({ data_table: data_table, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_table(::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_table_client_stub.call_count - end - end - end - - def test_delete_data_table - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_data_table_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_delete_data_table_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_table({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_table name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_table ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_table({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_table(::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_table_client_stub.call_count - end - end - end - - def test_create_data_table_row - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_table_row = {} - - create_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_create_data_table_row_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_table_row({ parent: parent, data_table_row: data_table_row }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_table_row parent: parent, data_table_row: data_table_row do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_table_row ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_table_row({ parent: parent, data_table_row: data_table_row }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_table_row(::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_table_row_client_stub.call_count - end - end - end - - def test_update_data_table_row - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_table_row = {} - update_mask = {} - - update_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_update_data_table_row_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_table_row data_table_row: data_table_row, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_table_row ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_table_row(::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_table_row_client_stub.call_count - end - end - end - - def test_list_data_table_rows - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - filter = "hello world" - - list_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_list_data_table_rows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_data_table_rows parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_data_table_rows ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_data_table_rows(::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_data_table_rows_client_stub.call_count - end - end - end - - def test_get_data_table_row - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTableRow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_row_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_table_row({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_table_row name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_table_row ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_table_row({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_table_row(::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_table_row_client_stub.call_count - end - end - end - - def test_delete_data_table_row - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_table_row_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_delete_data_table_row_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_table_row({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_table_row name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_table_row ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_table_row({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_table_row(::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_table_row_client_stub.call_count - end - end - end - - def test_bulk_create_data_table_rows - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - bulk_create_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_create_data_table_rows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_create_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.bulk_create_data_table_rows({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.bulk_create_data_table_rows parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.bulk_create_data_table_rows ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.bulk_create_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.bulk_create_data_table_rows(::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_create_data_table_rows_client_stub.call_count - end - end - end - - def test_bulk_get_data_table_rows - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - bulk_get_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_get_data_table_rows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_get_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.bulk_get_data_table_rows({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.bulk_get_data_table_rows parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.bulk_get_data_table_rows ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.bulk_get_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.bulk_get_data_table_rows(::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_get_data_table_rows_client_stub.call_count - end - end - end - - def test_bulk_replace_data_table_rows - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - bulk_replace_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_replace_data_table_rows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_replace_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.bulk_replace_data_table_rows({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.bulk_replace_data_table_rows parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.bulk_replace_data_table_rows ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.bulk_replace_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.bulk_replace_data_table_rows(::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_replace_data_table_rows_client_stub.call_count - end - end - end - - def test_bulk_update_data_table_rows - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requests = [{}] - - bulk_update_data_table_rows_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_bulk_update_data_table_rows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_update_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.bulk_update_data_table_rows({ parent: parent, requests: requests }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.bulk_update_data_table_rows parent: parent, requests: requests do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.bulk_update_data_table_rows ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.bulk_update_data_table_rows({ parent: parent, requests: requests }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.bulk_update_data_table_rows(::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_update_data_table_rows_client_stub.call_count - end - end - end - - def test_get_data_table_operation_errors - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_table_operation_errors_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::Chronicle::V1::DataTableService::Rest::ServiceStub.stub :transcode_get_data_table_operation_errors_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_table_operation_errors_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_table_operation_errors({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_table_operation_errors name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_table_operation_errors ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_table_operation_errors({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_table_operation_errors(::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_table_operation_errors_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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb deleted file mode 100644 index 0abf7ea87f8f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_table_service_test.rb +++ /dev/null @@ -1,1018 +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/chronicle/v1/data_table_pb" -require "google/cloud/chronicle/v1/data_table_service" - -class ::Google::Cloud::Chronicle::V1::DataTableService::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_data_table - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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" - data_table = {} - data_table_id = "hello world" - - create_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_table, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTable), request["data_table"] - assert_equal "hello world", request["data_table_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_table parent: parent, data_table: data_table, data_table_id: data_table_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_table ::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_table({ parent: parent, data_table: data_table, data_table_id: data_table_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_table(::Google::Cloud::Chronicle::V1::CreateDataTableRequest.new(parent: parent, data_table: data_table, data_table_id: data_table_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_table_client_stub.call_rpc_count - end - end - - def test_list_data_tables - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListDataTablesResponse.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" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - - list_data_tables_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_tables, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataTablesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_tables_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_tables parent: parent, page_size: page_size, page_token: page_token, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_tables ::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by) 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 - client.list_data_tables({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by }, 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 - client.list_data_tables(::Google::Cloud::Chronicle::V1::ListDataTablesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by), 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_data_tables_client_stub.call_rpc_count - end - end - - def test_get_data_table - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_table, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_table({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_table name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_table ::Google::Cloud::Chronicle::V1::GetDataTableRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_table({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_table(::Google::Cloud::Chronicle::V1::GetDataTableRequest.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_data_table_client_stub.call_rpc_count - end - end - - def test_update_data_table - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTable.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. - data_table = {} - update_mask = {} - - update_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_table, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTable), request["data_table"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_table({ data_table: data_table, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_table data_table: data_table, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_table ::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_table({ data_table: data_table, 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 - client.update_data_table(::Google::Cloud::Chronicle::V1::UpdateDataTableRequest.new(data_table: data_table, 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_data_table_client_stub.call_rpc_count - end - end - - def test_delete_data_table - # 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" - force = true - - delete_data_table_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_table, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_table_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_table({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_table name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_table ::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_table({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_table(::Google::Cloud::Chronicle::V1::DeleteDataTableRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_data_table_client_stub.call_rpc_count - end - end - - def test_create_data_table_row - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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" - data_table_row = {} - - create_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_table_row, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTableRow), request["data_table_row"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_table_row({ parent: parent, data_table_row: data_table_row }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_table_row parent: parent, data_table_row: data_table_row do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_table_row ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_table_row({ parent: parent, data_table_row: data_table_row }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_table_row(::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest.new(parent: parent, data_table_row: data_table_row), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_table_row_client_stub.call_rpc_count - end - end - - def test_update_data_table_row - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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. - data_table_row = {} - update_mask = {} - - update_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_table_row, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataTableRow), request["data_table_row"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_table_row({ data_table_row: data_table_row, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_table_row data_table_row: data_table_row, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_table_row ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_table_row({ data_table_row: data_table_row, 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 - client.update_data_table_row(::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest.new(data_table_row: data_table_row, 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_data_table_row_client_stub.call_rpc_count - end - end - - def test_list_data_table_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListDataTableRowsResponse.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" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - filter = "hello world" - - list_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_table_rows, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_data_table_rows parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_data_table_rows ::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) 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 - client.list_data_table_rows({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, 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 - client.list_data_table_rows(::Google::Cloud::Chronicle::V1::ListDataTableRowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), 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_data_table_rows_client_stub.call_rpc_count - end - end - - def test_get_data_table_row - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTableRow.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_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_table_row, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_table_row({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_table_row name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_table_row ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_table_row({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_table_row(::Google::Cloud::Chronicle::V1::GetDataTableRowRequest.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_data_table_row_client_stub.call_rpc_count - end - end - - def test_delete_data_table_row - # 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_data_table_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_table_row, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_table_row_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_table_row({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_table_row name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_table_row ::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_table_row({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_data_table_row(::Google::Cloud::Chronicle::V1::DeleteDataTableRowRequest.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_data_table_row_client_stub.call_rpc_count - end - end - - def test_bulk_create_data_table_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsResponse.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" - requests = [{}] - - bulk_create_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_create_data_table_rows, name - assert_kind_of ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_create_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.bulk_create_data_table_rows({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.bulk_create_data_table_rows parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.bulk_create_data_table_rows ::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.bulk_create_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.bulk_create_data_table_rows(::Google::Cloud::Chronicle::V1::BulkCreateDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_create_data_table_rows_client_stub.call_rpc_count - end - end - - def test_bulk_get_data_table_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsResponse.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" - requests = [{}] - - bulk_get_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_get_data_table_rows, name - assert_kind_of ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableRowRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_get_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.bulk_get_data_table_rows({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.bulk_get_data_table_rows parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.bulk_get_data_table_rows ::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.bulk_get_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.bulk_get_data_table_rows(::Google::Cloud::Chronicle::V1::BulkGetDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_get_data_table_rows_client_stub.call_rpc_count - end - end - - def test_bulk_replace_data_table_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsResponse.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" - requests = [{}] - - bulk_replace_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_replace_data_table_rows, name - assert_kind_of ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataTableRowRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_replace_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.bulk_replace_data_table_rows({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.bulk_replace_data_table_rows parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.bulk_replace_data_table_rows ::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.bulk_replace_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.bulk_replace_data_table_rows(::Google::Cloud::Chronicle::V1::BulkReplaceDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_replace_data_table_rows_client_stub.call_rpc_count - end - end - - def test_bulk_update_data_table_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsResponse.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" - requests = [{}] - - bulk_update_data_table_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_update_data_table_rows, name - assert_kind_of ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataTableRowRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_update_data_table_rows_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.bulk_update_data_table_rows({ parent: parent, requests: requests }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.bulk_update_data_table_rows parent: parent, requests: requests do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.bulk_update_data_table_rows ::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.bulk_update_data_table_rows({ parent: parent, requests: requests }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.bulk_update_data_table_rows(::Google::Cloud::Chronicle::V1::BulkUpdateDataTableRowsRequest.new(parent: parent, requests: requests), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_update_data_table_rows_client_stub.call_rpc_count - end - end - - def test_get_data_table_operation_errors - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataTableOperationErrors.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_data_table_operation_errors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_table_operation_errors, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_table_operation_errors_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_table_operation_errors({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_table_operation_errors name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_table_operation_errors ::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_table_operation_errors({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_data_table_operation_errors(::Google::Cloud::Chronicle::V1::GetDataTableOperationErrorsRequest.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_data_table_operation_errors_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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::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::Chronicle::V1::DataTableService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::DataTableService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb deleted file mode 100644 index 5d9dc9f08219..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb +++ /dev/null @@ -1,67 +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/chronicle/v1/entity_service" - -class ::Google::Cloud::Chronicle::V1::EntityService::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_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_watchlist_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.watchlist_path project: "value0", location: "value1", instance: "value2", watchlist: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/watchlists/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb deleted file mode 100644 index eaea39586386..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb +++ /dev/null @@ -1,376 +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/chronicle/v1/entity_pb" -require "google/cloud/chronicle/v1/entity_service/rest" - - -class ::Google::Cloud::Chronicle::V1::EntityService::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_get_watchlist - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_get_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_watchlist({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_watchlist name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_watchlist({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_watchlist_client_stub.call_count - end - end - end - - def test_list_watchlists - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_watchlists_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_list_watchlists_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_watchlists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_watchlists parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_watchlists_client_stub.call_count - end - end - end - - def test_create_watchlist - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - watchlist_id = "hello world" - watchlist = {} - - create_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_create_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_watchlist_client_stub.call_count - end - end - end - - def test_update_watchlist - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - watchlist = {} - update_mask = {} - - update_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_update_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_watchlist watchlist: watchlist, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_watchlist_client_stub.call_count - end - end - end - - def test_delete_watchlist - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_delete_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_watchlist({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_watchlist name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_watchlist({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb deleted file mode 100644 index 33700fc8c675..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb +++ /dev/null @@ -1,413 +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/chronicle/v1/entity_pb" -require "google/cloud/chronicle/v1/entity_service" - -class ::Google::Cloud::Chronicle::V1::EntityService::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_get_watchlist - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_watchlist({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_watchlist name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_watchlist({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.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_watchlist_client_stub.call_rpc_count - end - end - - def test_list_watchlists - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_watchlists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_watchlists, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_watchlists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_watchlists parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_watchlists({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_watchlists_client_stub.call_rpc_count - end - end - - def test_create_watchlist - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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" - watchlist_id = "hello world" - watchlist = {} - - create_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["watchlist_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_watchlist_client_stub.call_rpc_count - end - end - - def test_update_watchlist - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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. - watchlist = {} - update_mask = {} - - update_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_watchlist watchlist: watchlist, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_watchlist({ watchlist: watchlist, 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 - client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, 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_watchlist_client_stub.call_rpc_count - end - end - - def test_delete_watchlist - # 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" - force = true - - delete_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_watchlist({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_watchlist name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_watchlist({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::EntityService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb deleted file mode 100644 index 90c49bafd600..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_paths_test.rb +++ /dev/null @@ -1,103 +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/chronicle/v1/featured_content_native_dashboard_service" - -class ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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_content_hub_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.content_hub_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2/contentHub", path - end - end - - def test_dashboard_chart_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path - end - end - - def test_dashboard_query_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dashboard_query_path project: "value0", location: "value1", instance: "value2", query: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dashboardQueries/value3", path - end - end - - def test_featured_content_native_dashboard_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.featured_content_native_dashboard_path project: "value0", location: "value1", instance: "value2", featured_content_native_dashboard: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/contentHub/featuredContentNativeDashboards/value3", path - end - end - - def test_native_dashboard_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.native_dashboard_path project: "value0", location: "value1", instance: "value2", dashboard: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/nativeDashboards/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb deleted file mode 100644 index 823c3c2b5967..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_rest_test.rb +++ /dev/null @@ -1,265 +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/chronicle/v1/featured_content_native_dashboard_pb" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service/rest" - - -class ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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_get_featured_content_native_dashboard - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.stub :transcode_get_featured_content_native_dashboard_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_featured_content_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_featured_content_native_dashboard({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_featured_content_native_dashboard name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_featured_content_native_dashboard({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_featured_content_native_dashboard_client_stub.call_count - end - end - end - - def test_list_featured_content_native_dashboards - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_featured_content_native_dashboards_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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.stub :transcode_list_featured_content_native_dashboards_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_featured_content_native_dashboards_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_featured_content_native_dashboards parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_featured_content_native_dashboards ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_featured_content_native_dashboards(::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_featured_content_native_dashboards_client_stub.call_count - end - end - end - - def test_install_featured_content_native_dashboard - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - featured_content_native_dashboard = {} - - install_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::ServiceStub.stub :transcode_install_featured_content_native_dashboard_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, install_featured_content_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.install_featured_content_native_dashboard name: name, featured_content_native_dashboard: featured_content_native_dashboard do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.install_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.install_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, install_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::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::Chronicle::V1::FeaturedContentNativeDashboardService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb deleted file mode 100644 index 7c72e8df2cc7..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/featured_content_native_dashboard_service_test.rb +++ /dev/null @@ -1,291 +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/chronicle/v1/featured_content_native_dashboard_pb" -require "google/cloud/chronicle/v1/featured_content_native_dashboard_service" - -class ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::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_get_featured_content_native_dashboard - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard.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_featured_content_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_featured_content_native_dashboard, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_featured_content_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_featured_content_native_dashboard({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_featured_content_native_dashboard name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_featured_content_native_dashboard({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::GetFeaturedContentNativeDashboardRequest.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_featured_content_native_dashboard_client_stub.call_rpc_count - end - end - - def test_list_featured_content_native_dashboards - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_featured_content_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_featured_content_native_dashboards, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_featured_content_native_dashboards_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_featured_content_native_dashboards parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_featured_content_native_dashboards ::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_featured_content_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_featured_content_native_dashboards(::Google::Cloud::Chronicle::V1::ListFeaturedContentNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_featured_content_native_dashboards_client_stub.call_rpc_count - end - end - - def test_install_featured_content_native_dashboard - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardResponse.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" - featured_content_native_dashboard = {} - - install_featured_content_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :install_featured_content_native_dashboard, name - assert_kind_of ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboard), request["featured_content_native_dashboard"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, install_featured_content_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.install_featured_content_native_dashboard name: name, featured_content_native_dashboard: featured_content_native_dashboard do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.install_featured_content_native_dashboard ::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.install_featured_content_native_dashboard({ name: name, featured_content_native_dashboard: featured_content_native_dashboard }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.install_featured_content_native_dashboard(::Google::Cloud::Chronicle::V1::InstallFeaturedContentNativeDashboardRequest.new(name: name, featured_content_native_dashboard: featured_content_native_dashboard), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, install_featured_content_native_dashboard_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::Chronicle::V1::FeaturedContentNativeDashboardService::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::Chronicle::V1::FeaturedContentNativeDashboardService::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::Chronicle::V1::FeaturedContentNativeDashboardService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::FeaturedContentNativeDashboardService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb deleted file mode 100644 index 07fe0e7efd30..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_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/chronicle/v1/instance_service" - -class ::Google::Cloud::Chronicle::V1::InstanceService::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_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb deleted file mode 100644 index 68e2d76e63cf..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb +++ /dev/null @@ -1,153 +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/chronicle/v1/instance_pb" -require "google/cloud/chronicle/v1/instance_service/rest" - - -class ::Google::Cloud::Chronicle::V1::InstanceService::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_get_instance - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_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::Chronicle::V1::InstanceService::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb deleted file mode 100644 index 267cd03ea876..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb +++ /dev/null @@ -1,162 +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/chronicle/v1/instance_pb" -require "google/cloud/chronicle/v1/instance_service" - -class ::Google::Cloud::Chronicle::V1::InstanceService::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_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Instance.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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_instance({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.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_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::InstanceService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb deleted file mode 100644 index acee3f640c8b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_paths_test.rb +++ /dev/null @@ -1,91 +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/chronicle/v1/native_dashboard_service" - -class ::Google::Cloud::Chronicle::V1::NativeDashboardService::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_dashboard_chart_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dashboard_chart_path project: "value0", location: "value1", instance: "value2", chart: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dashboardCharts/value3", path - end - end - - def test_dashboard_query_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dashboard_query_path project: "value0", location: "value1", instance: "value2", query: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dashboardQueries/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_native_dashboard_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.native_dashboard_path project: "value0", location: "value1", instance: "value2", dashboard: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/nativeDashboards/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb deleted file mode 100644 index bd590a79cb52..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_rest_test.rb +++ /dev/null @@ -1,765 +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/chronicle/v1/native_dashboard_pb" -require "google/cloud/chronicle/v1/native_dashboard_service/rest" - - -class ::Google::Cloud::Chronicle::V1::NativeDashboardService::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_native_dashboard - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - native_dashboard = {} - - create_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_create_native_dashboard_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_native_dashboard parent: parent, native_dashboard: native_dashboard do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_native_dashboard ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_native_dashboard(::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_native_dashboard_client_stub.call_count - end - end - end - - def test_get_native_dashboard - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED - - get_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_get_native_dashboard_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_native_dashboard({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_native_dashboard name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_native_dashboard ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_native_dashboard({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_native_dashboard(::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_native_dashboard_client_stub.call_count - end - end - end - - def test_list_native_dashboards - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED - - list_native_dashboards_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_list_native_dashboards_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_native_dashboards_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_native_dashboards parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_native_dashboards ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_native_dashboards(::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_native_dashboards_client_stub.call_count - end - end - end - - def test_update_native_dashboard - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - native_dashboard = {} - update_mask = {} - - update_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_update_native_dashboard_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_native_dashboard({ native_dashboard: native_dashboard, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_native_dashboard native_dashboard: native_dashboard, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_native_dashboard ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_native_dashboard({ native_dashboard: native_dashboard, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_native_dashboard(::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_native_dashboard_client_stub.call_count - end - end - end - - def test_duplicate_native_dashboard - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - native_dashboard = {} - - duplicate_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_duplicate_native_dashboard_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, duplicate_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.duplicate_native_dashboard name: name, native_dashboard: native_dashboard do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.duplicate_native_dashboard ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.duplicate_native_dashboard(::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, duplicate_native_dashboard_client_stub.call_count - end - end - end - - def test_delete_native_dashboard - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_native_dashboard_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_delete_native_dashboard_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_native_dashboard({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_native_dashboard name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_native_dashboard ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_native_dashboard({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_native_dashboard(::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_native_dashboard_client_stub.call_count - end - end - end - - def test_add_chart - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::AddChartResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - dashboard_query = {} - dashboard_chart = {} - chart_layout = {} - - add_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_add_chart_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, add_chart_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.add_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.add_chart ::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.add_chart(::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, add_chart_client_stub.call_count - end - end - end - - def test_remove_chart - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::NativeDashboard.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - dashboard_chart = "hello world" - - remove_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_remove_chart_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, remove_chart_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.remove_chart({ name: name, dashboard_chart: dashboard_chart }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.remove_chart name: name, dashboard_chart: dashboard_chart do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.remove_chart ::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.remove_chart({ name: name, dashboard_chart: dashboard_chart }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.remove_chart(::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, remove_chart_client_stub.call_count - end - end - end - - def test_edit_chart - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::EditChartResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - dashboard_query = {} - dashboard_chart = {} - edit_mask = {} - language_features = [:LANGUAGE_FEATURE_UNSPECIFIED] - - edit_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_edit_chart_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, edit_chart_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.edit_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.edit_chart ::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.edit_chart(::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, edit_chart_client_stub.call_count - end - end - end - - def test_duplicate_chart - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DuplicateChartResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - dashboard_chart = "hello world" - - duplicate_chart_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_duplicate_chart_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, duplicate_chart_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.duplicate_chart name: name, dashboard_chart: dashboard_chart do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.duplicate_chart ::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.duplicate_chart(::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, duplicate_chart_client_stub.call_count - end - end - end - - def test_export_native_dashboards - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - names = ["hello world"] - - export_native_dashboards_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_export_native_dashboards_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_native_dashboards_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_native_dashboards({ parent: parent, names: names }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_native_dashboards parent: parent, names: names do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_native_dashboards ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_native_dashboards({ parent: parent, names: names }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_native_dashboards(::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_native_dashboards_client_stub.call_count - end - end - end - - def test_import_native_dashboards - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - source = {} - - import_native_dashboards_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::Chronicle::V1::NativeDashboardService::Rest::ServiceStub.stub :transcode_import_native_dashboards_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_native_dashboards_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_native_dashboards({ parent: parent, source: source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_native_dashboards parent: parent, source: source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_native_dashboards ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_native_dashboards({ parent: parent, source: source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_native_dashboards(::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_native_dashboards_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::Chronicle::V1::NativeDashboardService::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::Chronicle::V1::NativeDashboardService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb deleted file mode 100644 index bd48a08485da..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/native_dashboard_service_test.rb +++ /dev/null @@ -1,841 +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/chronicle/v1/native_dashboard_pb" -require "google/cloud/chronicle/v1/native_dashboard_service" - -class ::Google::Cloud::Chronicle::V1::NativeDashboardService::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_native_dashboard - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" - native_dashboard = {} - - create_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_native_dashboard, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::NativeDashboard), request["native_dashboard"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_native_dashboard parent: parent, native_dashboard: native_dashboard do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_native_dashboard ::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_native_dashboard({ parent: parent, native_dashboard: native_dashboard }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_native_dashboard(::Google::Cloud::Chronicle::V1::CreateNativeDashboardRequest.new(parent: parent, native_dashboard: native_dashboard), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_native_dashboard_client_stub.call_rpc_count - end - end - - def test_get_native_dashboard - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" - view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED - - get_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_native_dashboard, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest, request - assert_equal "hello world", request["name"] - assert_equal :NATIVE_DASHBOARD_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_native_dashboard({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_native_dashboard name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_native_dashboard ::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_native_dashboard({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_native_dashboard(::Google::Cloud::Chronicle::V1::GetNativeDashboardRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_native_dashboard_client_stub.call_rpc_count - end - end - - def test_list_native_dashboards - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListNativeDashboardsResponse.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" - page_size = 42 - page_token = "hello world" - view = :NATIVE_DASHBOARD_VIEW_UNSPECIFIED - - list_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_native_dashboards, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :NATIVE_DASHBOARD_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_native_dashboards_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_native_dashboards parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_native_dashboards ::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) 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 - client.list_native_dashboards({ parent: parent, page_size: page_size, page_token: page_token, view: view }, 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 - client.list_native_dashboards(::Google::Cloud::Chronicle::V1::ListNativeDashboardsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), 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_native_dashboards_client_stub.call_rpc_count - end - end - - def test_update_native_dashboard - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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. - native_dashboard = {} - update_mask = {} - - update_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_native_dashboard, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::NativeDashboard), request["native_dashboard"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_native_dashboard({ native_dashboard: native_dashboard, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_native_dashboard native_dashboard: native_dashboard, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_native_dashboard ::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_native_dashboard({ native_dashboard: native_dashboard, 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 - client.update_native_dashboard(::Google::Cloud::Chronicle::V1::UpdateNativeDashboardRequest.new(native_dashboard: native_dashboard, 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_native_dashboard_client_stub.call_rpc_count - end - end - - def test_duplicate_native_dashboard - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" - native_dashboard = {} - - duplicate_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :duplicate_native_dashboard, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::NativeDashboard), request["native_dashboard"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, duplicate_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.duplicate_native_dashboard name: name, native_dashboard: native_dashboard do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.duplicate_native_dashboard ::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.duplicate_native_dashboard({ name: name, native_dashboard: native_dashboard }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.duplicate_native_dashboard(::Google::Cloud::Chronicle::V1::DuplicateNativeDashboardRequest.new(name: name, native_dashboard: native_dashboard), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, duplicate_native_dashboard_client_stub.call_rpc_count - end - end - - def test_delete_native_dashboard - # 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_native_dashboard_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_native_dashboard, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_native_dashboard_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_native_dashboard({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_native_dashboard name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_native_dashboard ::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_native_dashboard({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_native_dashboard(::Google::Cloud::Chronicle::V1::DeleteNativeDashboardRequest.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_native_dashboard_client_stub.call_rpc_count - end - end - - def test_add_chart - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::AddChartResponse.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" - dashboard_query = {} - dashboard_chart = {} - chart_layout = {} - - add_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :add_chart, name - assert_kind_of ::Google::Cloud::Chronicle::V1::AddChartRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardQuery), request["dashboard_query"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardChart), request["dashboard_chart"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardDefinition::ChartConfig::ChartLayout), request["chart_layout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, add_chart_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.add_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.add_chart ::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.add_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.add_chart(::Google::Cloud::Chronicle::V1::AddChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, chart_layout: chart_layout), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, add_chart_client_stub.call_rpc_count - end - end - - def test_remove_chart - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::NativeDashboard.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" - dashboard_chart = "hello world" - - remove_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :remove_chart, name - assert_kind_of ::Google::Cloud::Chronicle::V1::RemoveChartRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["dashboard_chart"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, remove_chart_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.remove_chart({ name: name, dashboard_chart: dashboard_chart }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.remove_chart name: name, dashboard_chart: dashboard_chart do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.remove_chart ::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.remove_chart({ name: name, dashboard_chart: dashboard_chart }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.remove_chart(::Google::Cloud::Chronicle::V1::RemoveChartRequest.new(name: name, dashboard_chart: dashboard_chart), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, remove_chart_client_stub.call_rpc_count - end - end - - def test_edit_chart - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::EditChartResponse.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" - dashboard_query = {} - dashboard_chart = {} - edit_mask = {} - language_features = [:LANGUAGE_FEATURE_UNSPECIFIED] - - edit_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :edit_chart, name - assert_kind_of ::Google::Cloud::Chronicle::V1::EditChartRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardQuery), request["dashboard_query"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DashboardChart), request["dashboard_chart"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["edit_mask"] - assert_equal [:LANGUAGE_FEATURE_UNSPECIFIED], request["language_features"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, edit_chart_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.edit_chart name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.edit_chart ::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.edit_chart({ name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.edit_chart(::Google::Cloud::Chronicle::V1::EditChartRequest.new(name: name, dashboard_query: dashboard_query, dashboard_chart: dashboard_chart, edit_mask: edit_mask, language_features: language_features), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, edit_chart_client_stub.call_rpc_count - end - end - - def test_duplicate_chart - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DuplicateChartResponse.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" - dashboard_chart = "hello world" - - duplicate_chart_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :duplicate_chart, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DuplicateChartRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["dashboard_chart"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, duplicate_chart_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.duplicate_chart name: name, dashboard_chart: dashboard_chart do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.duplicate_chart ::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.duplicate_chart({ name: name, dashboard_chart: dashboard_chart }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.duplicate_chart(::Google::Cloud::Chronicle::V1::DuplicateChartRequest.new(name: name, dashboard_chart: dashboard_chart), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, duplicate_chart_client_stub.call_rpc_count - end - end - - def test_export_native_dashboards - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsResponse.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" - names = ["hello world"] - - export_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_native_dashboards, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["names"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_native_dashboards_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_native_dashboards({ parent: parent, names: names }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_native_dashboards parent: parent, names: names do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_native_dashboards ::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_native_dashboards({ parent: parent, names: names }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_native_dashboards(::Google::Cloud::Chronicle::V1::ExportNativeDashboardsRequest.new(parent: parent, names: names), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_native_dashboards_client_stub.call_rpc_count - end - end - - def test_import_native_dashboards - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsResponse.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" - source = {} - - import_native_dashboards_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_native_dashboards, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsInlineSource), request["source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_native_dashboards_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_native_dashboards({ parent: parent, source: source }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_native_dashboards parent: parent, source: source do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_native_dashboards ::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_native_dashboards({ parent: parent, source: source }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_native_dashboards(::Google::Cloud::Chronicle::V1::ImportNativeDashboardsRequest.new(parent: parent, source: source), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_native_dashboards_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::Chronicle::V1::NativeDashboardService::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::Chronicle::V1::NativeDashboardService::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::Chronicle::V1::NativeDashboardService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::NativeDashboardService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb deleted file mode 100644 index 0a3e0e6f9025..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb +++ /dev/null @@ -1,67 +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/chronicle/v1/reference_list_service" - -class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_reference_list_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb deleted file mode 100644 index e077a4322795..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb +++ /dev/null @@ -1,322 +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/chronicle/v1/reference_list_pb" -require "google/cloud/chronicle/v1/reference_list_service/rest" - - -class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_get_reference_list - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - get_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_get_reference_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_reference_list({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_reference_list name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_reference_list({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_reference_list_client_stub.call_count - end - end - end - - def test_list_reference_lists - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - list_reference_lists_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_list_reference_lists_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reference_lists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_reference_lists_client_stub.call_count - end - end - end - - def test_create_reference_list - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reference_list = {} - reference_list_id = "hello world" - - create_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_create_reference_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_reference_list_client_stub.call_count - end - end - end - - def test_update_reference_list - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - reference_list = {} - update_mask = {} - - update_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_update_reference_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_reference_list reference_list: reference_list, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb deleted file mode 100644 index 02598fddb1c6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb +++ /dev/null @@ -1,355 +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/chronicle/v1/reference_list_pb" -require "google/cloud/chronicle/v1/reference_list_service" - -class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_get_reference_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - get_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_reference_list, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, request - assert_equal "hello world", request["name"] - assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_reference_list({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_reference_list name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_reference_list({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_reference_list_client_stub.call_rpc_count - end - end - - def test_list_reference_lists - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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" - page_size = 42 - page_token = "hello world" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - list_reference_lists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reference_lists, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_reference_lists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) 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 - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, 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 - client.list_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), 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_reference_lists_client_stub.call_rpc_count - end - end - - def test_create_reference_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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" - reference_list = {} - reference_list_id = "hello world" - - create_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_reference_list, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] - assert_equal "hello world", request["reference_list_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_reference_list_client_stub.call_rpc_count - end - end - - def test_update_reference_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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. - reference_list = {} - update_mask = {} - - update_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_reference_list, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_reference_list reference_list: reference_list, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_reference_list({ reference_list: reference_list, 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 - client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, 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_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::ReferenceListService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb deleted file mode 100644 index 91602a5d5414..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_services_pb" -require "google/cloud/chronicle/v1/rule_service" - -class ::Google::Cloud::Chronicle::V1::RuleService::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 - client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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 - client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.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 - client.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 - client.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 - client = ::Google::Cloud::Chronicle::V1::RuleService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.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 - client.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 - client.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 - client.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 - client.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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb deleted file mode 100644 index cc40252d4fea..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb +++ /dev/null @@ -1,115 +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/chronicle/v1/rule_service" - -class ::Google::Cloud::Chronicle::V1::RuleService::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_data_access_scope_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_reference_list_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path - end - end - - def test_retrohunt_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.retrohunt_path project: "value0", location: "value1", instance: "value2", rule: "value3", retrohunt: "value4" - assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/retrohunts/value4", path - end - end - - def test_rule_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.rule_path project: "value0", location: "value1", instance: "value2", rule: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/rules/value3", path - end - end - - def test_rule_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.rule_deployment_path project: "value0", location: "value1", instance: "value2", rule: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/deployment", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb deleted file mode 100644 index 22d16284fac2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb +++ /dev/null @@ -1,766 +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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_service/rest" - - -class ::Google::Cloud::Chronicle::V1::RuleService::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_rule - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule = {} - - create_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_rule({ parent: parent, rule: rule }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_rule parent: parent, rule: rule do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_rule({ parent: parent, rule: rule }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_rule_client_stub.call_count - end - end - end - - def test_get_rule - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :RULE_VIEW_UNSPECIFIED - - get_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_rule({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_rule name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_rule({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_rule_client_stub.call_count - end - end - end - - def test_list_rules - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - view = :RULE_VIEW_UNSPECIFIED - filter = "hello world" - - list_rules_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_rules parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rules_client_stub.call_count - end - end - end - - def test_update_rule - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - rule = {} - update_mask = {} - - update_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_rule({ rule: rule, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_rule rule: rule, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_rule({ rule: rule, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_rule_client_stub.call_count - end - end - end - - def test_delete_rule - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_delete_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_rule({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_rule name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_rule({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_rule_client_stub.call_count - end - end - end - - def test_list_rule_revisions - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - view = :RULE_VIEW_UNSPECIFIED - - list_rule_revisions_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rule_revisions_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rule_revisions_client_stub.call_count - end - end - end - - def test_create_retrohunt - # 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" - retrohunt = {} - - create_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_retrohunt_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_retrohunt parent: parent, retrohunt: retrohunt do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_retrohunt_client_stub.call_count - end - end - end - - def test_get_retrohunt - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Retrohunt.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_retrohunt_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_retrohunt({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_retrohunt name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_retrohunt({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_retrohunt_client_stub.call_count - end - end - end - - def test_list_retrohunts - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_retrohunts_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_retrohunts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_retrohunts_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_retrohunts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_retrohunts_client_stub.call_count - end - end - end - - def test_get_rule_deployment - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_rule_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_rule_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_rule_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_rule_deployment_client_stub.call_count - end - end - end - - def test_list_rule_deployments - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_rule_deployments_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_deployments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rule_deployments_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_rule_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rule_deployments_client_stub.call_count - end - end - end - - def test_update_rule_deployment - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - rule_deployment = {} - update_mask = {} - - update_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb deleted file mode 100644 index 75d72ff1a561..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb +++ /dev/null @@ -1,877 +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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_service" - -class ::Google::Cloud::Chronicle::V1::RuleService::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_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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" - rule = {} - - create_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_rule({ parent: parent, rule: rule }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_rule parent: parent, rule: rule do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_rule({ parent: parent, rule: rule }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_rule_client_stub.call_rpc_count - end - end - - def test_get_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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" - view = :RULE_VIEW_UNSPECIFIED - - get_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleRequest, request - assert_equal "hello world", request["name"] - assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_rule({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_rule name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_rule({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_rule_client_stub.call_rpc_count - end - end - - def test_list_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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" - page_size = 42 - page_token = "hello world" - view = :RULE_VIEW_UNSPECIFIED - filter = "hello world" - - list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rules, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rules_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_rules parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter) 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 - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }, 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 - client.list_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter), 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_rules_client_stub.call_rpc_count - end - end - - def test_update_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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. - rule = {} - update_mask = {} - - update_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_rule({ rule: rule, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_rule rule: rule, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_rule({ rule: rule, 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 - client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, 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_rule_client_stub.call_rpc_count - end - end - - def test_delete_rule - # 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" - force = true - - delete_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_rule({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_rule name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_rule({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_rule_client_stub.call_rpc_count - end - end - - def test_list_rule_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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" - page_size = 42 - page_token = "hello world" - view = :RULE_VIEW_UNSPECIFIED - - list_rule_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rule_revisions, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rule_revisions_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) 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 - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, 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 - client.list_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), 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_rule_revisions_client_stub.call_rpc_count - end - end - - def test_create_retrohunt - # 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" - retrohunt = {} - - create_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_retrohunt, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Retrohunt), request["retrohunt"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) 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 - client.create_retrohunt parent: parent, retrohunt: retrohunt 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 - client.create_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) 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 - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }, 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 - client.create_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), 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_retrohunt_client_stub.call_rpc_count - end - end - - def test_get_retrohunt - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_retrohunt, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_retrohunt({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_retrohunt name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_retrohunt({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.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_retrohunt_client_stub.call_rpc_count - end - end - - def test_list_retrohunts - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_retrohunts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_retrohunts, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_retrohunts_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_retrohunts parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_retrohunts({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_retrohunts_client_stub.call_rpc_count - end - end - - def test_get_rule_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_rule_deployment, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_rule_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_rule_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_rule_deployment({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.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_rule_deployment_client_stub.call_rpc_count - end - end - - def test_list_rule_deployments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_rule_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rule_deployments, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rule_deployments_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_rule_deployments parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_rule_deployments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_rule_deployments_client_stub.call_rpc_count - end - end - - def test_update_rule_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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. - rule_deployment = {} - update_mask = {} - - update_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_rule_deployment, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::RuleDeployment), request["rule_deployment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_rule_deployment({ rule_deployment: rule_deployment, 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 - client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, 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_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb +++ /dev/null @@ -1,26 +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 "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"